mirror of
https://github.com/weaveworks/scope.git
synced 2026-05-11 03:38:18 +00:00
Merge pull request #3760 from sarataha/issues/3741-open-files-format
Remove trailing zeros in large numbers in UI
This commit is contained in:
@@ -10,6 +10,11 @@ describe('StringUtils', () => {
|
||||
it('it should render 0', () => {
|
||||
expect(f(0)).toBe('0.00');
|
||||
});
|
||||
it('it should render get rid of trailing zeros', () => {
|
||||
expect(f(2104)).toBe('2.104k');
|
||||
expect(f(21100)).toBe('21.1k');
|
||||
expect(f(2120001)).toBe('2.12M');
|
||||
});
|
||||
});
|
||||
|
||||
describe('longestCommonPrefix', () => {
|
||||
|
||||
@@ -5,7 +5,7 @@ import { isoFormat } from 'd3-time-format';
|
||||
import LCP from 'lcp';
|
||||
import moment from 'moment';
|
||||
|
||||
const formatLargeValue = d3Format('s');
|
||||
const formatLargeValue = d3Format('~s');
|
||||
|
||||
|
||||
function renderHtml(text, unit) {
|
||||
|
||||
Reference in New Issue
Block a user