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

ui: Ensure Service Instance pages account for nodes #5933

Merged
merged 2 commits into from
Jun 11, 2019

Conversation

johncowen
Copy link
Contributor

Previously we were using ServiceIds as a unique identifier/slug for linking to Service Instance Detail pages (/:dc/services/:servicename/:serviceid). ServiceIds are not unique per datacenter, only per Node.

This PR includes the node name into the unique identifier/slug (/:dc/services/:servicename/:nodename/:serviceid) and then instead of just looking for the first piece of data in the API response that has a matching ServiceId, we also check for a matching Node name.

This means we then show the correct information on the Service Detail page

Fixes #5853

There is similar work to come that applies a similar fix when linking to Sidecar Proxies (but not 'normal' proxies)

@johncowen johncowen requested a review from a team June 7, 2019 12:28
@johncowen johncowen added the theme/ui Anything related to the UI label Jun 7, 2019
Copy link

@backspace backspace left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This all looks sensible, 👍🏻

This sort of change makes me yearn for being able to use Typescript or the like.

@johncowen johncowen added this to the 1.5.2 milestone Jun 10, 2019
@johncowen johncowen merged commit a41c13a into master Jun 11, 2019
johncowen pushed a commit that referenced this pull request Jun 11, 2019
Folllowing on from #5933 we
noticed that 'normal' proxies should link to the service, rather than
the service instance. Additionally sideproxy 'searching' within the
repository should take into account the name of the node that the
originating service is on (sidecar proxies are generally co-located)

Added an additiojnal test here to prove that a sidecar-proxy with the
same service id but on a different node does not show the sidecar proxy
link.
@johncowen johncowen deleted the bugfix/ui-gh5853-unique-node-service branch June 11, 2019 09:45
johncowen pushed a commit that referenced this pull request Jun 17, 2019
Folllowing on from #5933 we
noticed that 'normal' proxies should link to the service, rather than
the service instance. Additionally sideproxy 'searching' within the
repository should take into account the name of the node that the
originating service is on (sidecar proxies are generally co-located)

Added an additiojnal test here to prove that a sidecar-proxy with the
same service id but on a different node does not show the sidecar proxy
link.
johncowen added a commit that referenced this pull request Jun 20, 2019
* ui: Normal proxies line to services, sidecars to instances

Following on from #5933 we
noticed that 'normal' proxies should link to the service, rather than
the service instance. Additionally proxy 'searching' within the
repository should take into account the name of the node that the
originating service is on (sidecar proxies are generally co-located)

Added an additional test here to prove that a sidecar-proxy with the
same service id but on a different node does not show the sidecar proxy
link.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme/ui Anything related to the UI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[ui] wrong node when clicking on service
2 participants