-
Notifications
You must be signed in to change notification settings - Fork 900
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
feat(ui): Show health check url beside target group #7520
feat(ui): Show health check url beside target group #7520
Conversation
The following commits need their title changed:
Please format your commit title into the form:
This allows us to easily generate changelogs & determine semantic version numbers when cutting releases. You can read more about commit conventions here. |
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.
few minor things, otherwise lgtm
|
||
export const getAllTargetGroups = loadBalancers => { | ||
const allTargetGroups = loadBalancers.map(d => d.targetGroups); | ||
const targetGroups = flatten(allTargetGroups).reduce((groups, tg) => { |
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.
could use keyBy
from lodash instead of a custom reducer here
|
||
// augment with target group healthcheck data | ||
const targetGroups = getAllTargetGroups(app.loadBalancers.data); | ||
getTargetGroupHealthCheckInfo(displayableMetrics, targetGroups); |
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.
if we are going to mutate data in a function, I'd like the function name to indicate this. I was confused because there was a get
method but I didn't see the return value used.
Perhaps something like applyHealthcheckInfoToTargetGroups
?
@@ -145,6 +145,15 @@ <h3 class="horizontal middle space-between flex-1" select-on-dbl-click> | |||
ng-repeat="targetGroup in metric.targetGroups" | |||
> | |||
<instance-load-balancer-health load-balancer="targetGroup"></instance-load-balancer-health> | |||
<span class="pad-left small"> |
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.
Would it be possible to move this markup into the instanceLoadBalancerHealth
component?
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.
Yes definitely possible. This component is also used for LoadBalancer type health metrics, so I will hide this segment if the url is not present.
66a3e9a
to
18ff930
Compare
</OverlayTrigger> | ||
); | ||
} | ||
|
||
return healthDiv; | ||
return ( | ||
<React.Fragment> |
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.
I think we generally only use <React.Fragment>
if we need to add a key
prop. We use the short version most other places: <>
@@ -31,7 +31,8 @@ | |||
"paths": { | |||
"@spinnaker/core": ["."], | |||
"core/*": ["*"], | |||
"core": ["."] | |||
"core": ["."], | |||
"@spinnaker/amazon": ["../../amazon/lib"] |
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.
this dependency should be removed
ed7dfe7
to
4940f6a
Compare
c8c06e4 fix(artifact/bitbucket): Bitbucket Use Default Artifact (spinnaker#7523) ed7c445 feat(ui): Show health check url beside target group (spinnaker#7520)
ed7c445 feat(ui): Show health check url beside target group (spinnaker#7520)
c8c06e4 fix(artifact/bitbucket): Bitbucket Use Default Artifact (spinnaker#7523) ed7c445 feat(ui): Show health check url beside target group (spinnaker#7520)
ed7c445 feat(ui): Show health check url beside target group (spinnaker#7520)
ed7c445 feat(ui): Show health check url beside target group (spinnaker#7520)
Turns out that the `<OverlayTrigger>` component needs whatever you give it as children to be a single node. With the change introduced in #7520, the code path that runs when the health status is `UP` works fine, but any non-UP status hits the `<OverlayTrigger>` path and blows up/fails to render because there's two root nodes. This just wraps those two nodes in a fragment.
Turns out that the `<OverlayTrigger>` component needs whatever you give it as children to be a single node. With the change introduced in #7520, the code path that runs when the health status is `UP` works fine, but any non-UP status hits the `<OverlayTrigger>` path and blows up/fails to render because there's two root nodes. This just wraps those two nodes in a fragment.
c8c06e4 fix(artifact/bitbucket): Bitbucket Use Default Artifact (spinnaker#7523) ed7c445 feat(ui): Show health check url beside target group (spinnaker#7520)
ed7c445 feat(ui): Show health check url beside target group (spinnaker#7520)
ed7c445 feat(ui): Show health check url beside target group (spinnaker#7520)
…r#7555) Turns out that the `<OverlayTrigger>` component needs whatever you give it as children to be a single node. With the change introduced in spinnaker#7520, the code path that runs when the health status is `UP` works fine, but any non-UP status hits the `<OverlayTrigger>` path and blows up/fails to render because there's two root nodes. This just wraps those two nodes in a fragment.
Introduce a health check link next to the Target Group in Status section of the instance's details.
After:
![Screen Shot 2019-10-11 at 1 35 01 PM](https://user-images.githubusercontent.com/26560152/66683342-1665d780-ec2c-11e9-91af-e6f74c651db1.png)