-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Only show + icon when we have at least one connected CF #3211
Conversation
✅ Hey nwmac! The commit authors and yourself have already signed the CLA. |
Codecov Report
@@ Coverage Diff @@
## v2-master #3211 +/- ##
============================================
+ Coverage 71.09% 71.1% +<.01%
============================================
Files 632 632
Lines 27752 27753 +1
Branches 6314 6315 +1
============================================
+ Hits 19731 19734 +3
+ Misses 8021 8019 -2 |
|
||
this.haveConnectedCf$ = cloudFoundryService.cFEndpoints$.pipe( | ||
map(endpoints => endpoints.map(endpoint => endpoint.connectionStatus === 'connected')), | ||
map(connected => connected.reduce((a, v) => a || v, false)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something like !!connected.find(isConnected => isConnected)
would be more efficient.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or even just !!endpoints.find(endpoint => endpoint.connectionStatus === 'connected'))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah - I just used what we had in the CF page - but can have a look at simplifying
Fixes #2714