Fix #7092
UI: Format PG Status Active/Clean for small values
Source:
other
Tags:
Backport:
Reviewed:
Affected Versions:
ceph-qa-suite:
Crash signature (v1):
Crash signature (v2):
Description
UI is using humanize.filesize instead of numberFormat. This leads to quirky output.
Associated revisions
Fix #7092: Fix number formatting for small values
humanize.filesize attempts to add byte, kb and mb to the formatting.
This isn't going to work for small values as they're not file sizes.
Write a small shim to add 'K' and 'B' and use humanize.numerFormat to
truncate the digits to 1 decimal place. Use an '_' uTemplate to sanitize the
values.
History
#1 Updated by Yan-Fa Li about 10 years ago
- Status changed from In Progress to Resolved
Resolved by 445924f234c4128bd9981798b2a08695c02562f6