-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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: indicate direction on node latency table #33299
Conversation
Release note: None
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.
Thanks for knocking this out @tbg! I've always forgotten which direction is which on that table.
cc @piyush-singh let's take this into account when we bring this into the main pages
function createHeaderCell(staleIDs: Set<number>, id: Identity, key: string) { | ||
const node = `n${id.nodeID.toString()}`; | ||
function createHeaderCell(staleIDs: Set<number>, id: Identity, key: string, titlePrefix: string) { | ||
const node = titlePrefix + `n${id.nodeID.toString()}`; |
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.
style nit: add to the interpolated string:
const node = `${titlePrefix}n${id.nodeID.toString()}`
@@ -285,14 +285,15 @@ class Network extends React.Component<NetworkProps, {}> { | |||
staleIDs, | |||
identity, | |||
`0-${identity.nodeID}`, | |||
`to `, |
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.
style nit: just use a plain string: 'to '
)) | ||
} | ||
</tr> | ||
{ | ||
_.map(displayIdentities, (identityA) => ( | ||
<tr key={identityA.nodeID} className="network-table__row"> | ||
{ | ||
createHeaderCell(staleIDs, identityA, `${identityA.nodeID}-0`) | ||
createHeaderCell(staleIDs, identityA, `${identityA.nodeID}-0`, ``) |
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.
style nit: maybe a default parameter, or at least use a plain string: ''
?
Release note: None