Skip to content
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

Merged

Conversation

caseyhebebrand
Copy link
Contributor

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

@spinnakerbot
Copy link
Contributor

The following commits need their title changed:

  • 6c1ba82: Add health check link to other providers

Please format your commit title into the form:

<type>(<scope>): <subject>, e.g. fix(kubernetes): address NPE in status check

This allows us to easily generate changelogs & determine semantic version numbers when cutting releases. You can read more about commit conventions here.

Copy link
Contributor

@christopherthielen christopherthielen left a 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) => {
Copy link
Contributor

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);
Copy link
Contributor

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">
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@caseyhebebrand caseyhebebrand force-pushed the target-group-health branch 2 times, most recently from 66a3e9a to 18ff930 Compare October 15, 2019 17:44
</OverlayTrigger>
);
}

return healthDiv;
return (
<React.Fragment>
Copy link
Contributor

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"]
Copy link
Contributor

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

@christopherthielen christopherthielen merged commit ed7c445 into spinnaker:master Oct 15, 2019
caseyhebebrand added a commit to caseyhebebrand/deck that referenced this pull request Oct 16, 2019
c8c06e4 fix(artifact/bitbucket): Bitbucket Use Default Artifact (spinnaker#7523)
ed7c445 feat(ui): Show health check url beside target group (spinnaker#7520)
caseyhebebrand added a commit to caseyhebebrand/deck that referenced this pull request Oct 16, 2019
ed7c445 feat(ui): Show health check url beside target group (spinnaker#7520)
caseyhebebrand added a commit to caseyhebebrand/deck that referenced this pull request Oct 16, 2019
c8c06e4 fix(artifact/bitbucket): Bitbucket Use Default Artifact (spinnaker#7523)
ed7c445 feat(ui): Show health check url beside target group (spinnaker#7520)
caseyhebebrand added a commit to caseyhebebrand/deck that referenced this pull request Oct 16, 2019
ed7c445 feat(ui): Show health check url beside target group (spinnaker#7520)
caseyhebebrand added a commit to caseyhebebrand/deck that referenced this pull request Oct 16, 2019
ed7c445 feat(ui): Show health check url beside target group (spinnaker#7520)
christopherthielen pushed a commit that referenced this pull request Oct 16, 2019
c8c06e4 fix(artifact/bitbucket): Bitbucket Use Default Artifact (#7523)
ed7c445 feat(ui): Show health check url beside target group (#7520)
christopherthielen pushed a commit that referenced this pull request Oct 16, 2019
ed7c445 feat(ui): Show health check url beside target group (#7520)
christopherthielen pushed a commit that referenced this pull request Oct 16, 2019
ed7c445 feat(ui): Show health check url beside target group (#7520)
erikmunson pushed a commit that referenced this pull request Oct 23, 2019
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.
mergify bot pushed a commit that referenced this pull request Oct 23, 2019
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.
@caseyhebebrand caseyhebebrand deleted the target-group-health branch November 20, 2019 19:03
yunzhangit pushed a commit to yunzhangit/deck that referenced this pull request Mar 28, 2021
yunzhangit pushed a commit to yunzhangit/deck that referenced this pull request Mar 28, 2021
c8c06e4 fix(artifact/bitbucket): Bitbucket Use Default Artifact (spinnaker#7523)
ed7c445 feat(ui): Show health check url beside target group (spinnaker#7520)
yunzhangit pushed a commit to yunzhangit/deck that referenced this pull request Mar 28, 2021
ed7c445 feat(ui): Show health check url beside target group (spinnaker#7520)
yunzhangit pushed a commit to yunzhangit/deck that referenced this pull request Mar 28, 2021
ed7c445 feat(ui): Show health check url beside target group (spinnaker#7520)
yunzhangit pushed a commit to yunzhangit/deck that referenced this pull request Mar 28, 2021
…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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants