Project

General

Profile

Fix #7092

UI: Format PG Status Active/Clean for small values

Added by Yan-Fa Li over 7 years ago. Updated over 7 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
UI
Target version:
% Done:

0%

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.

resource.png View (408 KB) Yan-Fa Li, 01/03/2014 11:35 AM

Associated revisions

Revision 445924f2 (diff)
Added by Yan-Fa Li over 7 years ago

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 over 7 years ago

  • Status changed from In Progress to Resolved

Resolved by 445924f234c4128bd9981798b2a08695c02562f6

Also available in: Atom PDF