-
Notifications
You must be signed in to change notification settings - Fork 15
fix(ClusterMetricsCores): format value and capacity same way #1532
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
* @returns size to format value to get required number of digits | ||
* | ||
* By default value converted to the next size when it's above 1000, | ||
* so we have 900mb and 1gb. To extend it additional significantDigits could be set |
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.
I suppose mb and gb are not accurate examples as gb is 1024mb
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.
oh this terrible copy-paste -_-
@@ -1,8 +0,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.
why?
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.
Time ago decided not to support /ru localization and if change en keysets, remove ru version
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.
As far as I remember we decided to support ru localization
@@ -0,0 +1,107 @@ | |||
import {formatNumber, roundToPrecision} from '../dataFormatters/dataFormatters'; |
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.
I suppose formatNumber shouldn't be in bytesParsers as it has small relevance to bytes operations logics
export const getNumberWithSignificantDigits = (value: number, significantDigits: number) => { | ||
const multiplier = 10 ** significantDigits; | ||
|
||
const thousandLevel = sizes.million.value * multiplier; |
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.
thousand.value
Stand
CI Results
Test Status: ✅ PASSED
📊 Full Report
Bundle Size: 🔺
Current: 79.11 MB | Main: 79.10 MB
Diff: +0.01 MB (0.01%)
ℹ️ CI Information