diff options
author | Kurkó Mihály <kurkomisi@users.noreply.github.com> | 2018-03-08 16:22:21 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2018-03-08 16:22:21 +0800 |
commit | 704840a8ad9e75d4a00e734f901cac21c51b7eb5 (patch) | |
tree | e2b012c052986bb40053f09394aefb5c23474a5a /dashboard/assets/components/CustomTooltip.jsx | |
parent | 3ec1b9a92dc09ff33f6fae2e8daa7862d4c51bb1 (diff) | |
download | go-tangerine-704840a8ad9e75d4a00e734f901cac21c51b7eb5.tar go-tangerine-704840a8ad9e75d4a00e734f901cac21c51b7eb5.tar.gz go-tangerine-704840a8ad9e75d4a00e734f901cac21c51b7eb5.tar.bz2 go-tangerine-704840a8ad9e75d4a00e734f901cac21c51b7eb5.tar.lz go-tangerine-704840a8ad9e75d4a00e734f901cac21c51b7eb5.tar.xz go-tangerine-704840a8ad9e75d4a00e734f901cac21c51b7eb5.tar.zst go-tangerine-704840a8ad9e75d4a00e734f901cac21c51b7eb5.zip |
cmd, dashboard: use webpack dev server, remove custom assets (#16263)
* cmd, dashboard: remove custom assets, webpack dev server
* dashboard: yarn commands, small fixes
Diffstat (limited to 'dashboard/assets/components/CustomTooltip.jsx')
-rw-r--r-- | dashboard/assets/components/CustomTooltip.jsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/dashboard/assets/components/CustomTooltip.jsx b/dashboard/assets/components/CustomTooltip.jsx index be7c624cf..3405f9305 100644 --- a/dashboard/assets/components/CustomTooltip.jsx +++ b/dashboard/assets/components/CustomTooltip.jsx @@ -38,15 +38,15 @@ export const percentPlotter = <T>(text: string, mapper: (T => T) = multiplier(1) }; // unit contains the units for the bytePlotter. -const unit = ['B', 'KB', 'MB', 'GB', 'TB', 'PB']; +const unit = ['', 'Ki', 'Mi', 'Gi', 'Ti', 'Pi', 'Ei', 'Zi', 'Yi']; // simplifyBytes returns the simplified version of the given value followed by the unit. const simplifyBytes = (x: number) => { let i = 0; - for (; x > 1024 && i < 5; i++) { + for (; x > 1024 && i < 8; i++) { x /= 1024; } - return x.toFixed(2).toString().concat(' ', unit[i]); + return x.toFixed(2).toString().concat(' ', unit[i], 'B'); }; // bytePlotter renders a tooltip, which displays the payload as a byte value. |