ui: standardize the display of node name in legend#45665
ui: standardize the display of node name in legend#45665craig[bot] merged 3 commits intocockroachdb:masterfrom girishramnani:ui-node-id
Conversation
|
@girishramnani Thank you for the contribution! The underlying issue referred to in #45622 and #45551 is that instead of maintaining the display of node names in where they occur, we could use a standard function to control this display wherever they occur. The most likely place to standardize around is the getDisplayName(node: INodeStatus, livenessStatus = LivenessStatus.LIVE)which takes an So the work would be to reconcile the two. Off the top of my head I don't know how many things are referencing |
|
@nathanstilwell so essentially change the signature of and then have a type guards on it for both |
|
@girishramnani That is a good start. If we find that we are using this function in lots of other places with various types and have to keep changing that signature, we may consider doing something else. I was imagining a way to prevent that issue, but I suppose there's no use in preoptimizing for the time being. The important point is that we want to have a single function that controls the format of displaying nodes. |
|
sure, will do this change |
|
@nathanstilwell changed the code as discussed |
nathanstilwell
left a comment
There was a problem hiding this comment.
One tiny nitpick, before the final LGTM. Thank you for your contribution and being patient with my reviews.
|
@girishramnani Due to Cockroach being in a stability period ahead of the 20.1 release, I may not merge this in until we cut our release branch. Thank you for the contribution! |
|
No problem, I will keep rebasing if there are any conflicts |
|
@nathanstilwell any update on this? |
|
@girishramnani Thanks for the nudge. I will try to merge now, but we'll see if we get any conflicts. |
|
bors r+ |
Build succeeded |
|
@girishramnani Looks like we're good. Thank you for the contribution! |
|
@girishramnani Thank you for contributing to CockroachDB this year. As a token of our appreciation, we would like to send you a gift. Please DM me on our community Slack @amruta so I can send you a link. (If you don’t want a gift, we also have a charitable contribution choice.) All orders need to be in by December 13, so please contact me as soon as possible :) |
|
@girishramnani LAST DAY TO ORDER!!! |
Standardize the display of node names in report -> legend
Fixes #45622
Release note: none