]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr/dashboard: Format small numbers correctly 21980/head
authorStephan Müller <smueller@suse.com>
Mon, 14 May 2018 13:11:27 +0000 (15:11 +0200)
committerStephan Müller <smueller@suse.com>
Mon, 14 May 2018 13:11:27 +0000 (15:11 +0200)
commitb8ecac3603c01764d83e2b8862f3b6f847321e85
treea299085824da924841abfcd3986a37fdd1e7876a
parente095b08da7317658a0d7d8d57bad5ab468b6dcad
mgr/dashboard: Format small numbers correctly

The issue was triggered by numbers that a lower than 1.
Doing a logarithm with a number lower than 1 leads to
negative value that is not handled anywhere in The formatter service as
a result the final value will be quirky.
The negative number will also be used as index in the units array, where
it will return "undefined".

Fixes #24081

Signed-off-by: Stephan Müller <smueller@suse.com>
src/pybind/mgr/dashboard/frontend/src/app/shared/services/formatter.service.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/shared/services/formatter.service.ts