ui: [BUGFIX] Ensure we show the correct count of instances for each node #9749
+12
−5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In our node listing page we show the a number for the amount of Service Instances on each node.
Before this PR, this count included any proxies on the Node, essentially doubling the service count. This was probably correct in a previous version of the UI when we used to show all the proxies across the catalog as well as the services, but since we merged proxies into the services themselves, essentially making the an implementation detail and therefore invisible in the UI, this count should not include proxies.
This PR adds a
MeshServiceInstances
property to the node model, 'mesh' here meaning 'services that have a proxy assigned to them, and therefore not a proxy itself'. We then use this property to show the instance count, meaning we omit proxy instances from the final count.We also noticed that we weren't showing an 'empty' icon for services where the check count for either service or node checks was zero. So fixed that here also 🐦 🐦 🥧
This is how consul looks in the node listing after this fix (the consul service only has node checks, no service checks)