-
Notifications
You must be signed in to change notification settings - Fork 15
feat(Versions): show overall version info in Versions tab #1442
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
Conversation
return { | ||
title: version, | ||
version: version, | ||
color: versionsToColor?.get(getMinorVersion(version)), | ||
value: (versionsCount[version] / nodes.length) * 100, | ||
value: value < MIN_VALUE ? MIN_VALUE : value, |
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.
Why MIN_VALUE is 0.5 ?
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.
It was kinda a shot in the dark. It looks nice - not wide, but sufficient to hove a mouse.
@@ -25,7 +24,7 @@ export const COLORS = [ | |||
'#b22222', // firebrick | |||
]; | |||
|
|||
export const GREY_COLOR = '#bfbfbf'; | |||
export const DEFAULT_COLOR = '#008000'; // green |
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.
discussed with @adameat and decided to set green color as defaut.
import type {VersionToColorMap} from '../../types/versions'; | ||
import {parseNodeGroupsToVersionsValues, parseNodesToVersionsValues} from '../../utils/versions'; | ||
|
||
export const useGetVersionValues = (cluster?: TClusterInfo, versionToColor?: VersionToColorMap) => { |
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.
Why don't you reuse the same hook from /containers/Cluster/ClusterInfo/utils.ts
?
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.
Cause very soon it will be removed from /containers/Cluster/ClusterInfo/utils.ts
. Currently in #1473 .
} | ||
}); | ||
const result = [...data]; | ||
result[maximumIndex] = {...data[maximumIndex], value: maximum + 100 - total}; |
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.
Why do you need such normalization? If my most common version is 24-3 and I have 1000 nodes out of 1300 with such version, its value will be -200 (converted to 0.5)? So most common version will have least space on the bar?
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.
Discussed in pm, I've added a comment, for what this normalization is needed.
Stand
CI Results
Test Status: ✅ PASSED
📊 Full Report
Bundle Size: 🔺
Current: 78.97 MB | Main: 78.96 MB
Diff: +0.01 MB (0.01%)
ℹ️ CI Information