Move humanize and truncate functions to horizon.quota.js
Bug #1480106 reported by
Rajat Vig
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Dashboard (Horizon) |
Fix Released
|
Low
|
Rajat Vig |
Bug Description
As commented on the review for
https:/
here
the functions humanize and truncate are only used in horizon.quota.js and should be located there.
Also, no code uses capitalize which should be deleted
Changed in horizon: | |
assignee: | nobody → Rajat Vig (rajatv) |
status: | New → In Progress |
Changed in horizon: | |
assignee: | Rajat Vig (rajatv) → Richard Jones (r1chardj0n3s) |
Changed in horizon: | |
assignee: | Richard Jones (r1chardj0n3s) → Rajat Vig (rajatv) |
Changed in horizon: | |
importance: | Undecided → Low |
milestone: | none → mitaka-1 |
To post a comment you must log in.
Looking more broadly at this patch, I don't think it's moving in the right direction.
If we had a working humanizeNumbers function I'd expect it to be broadly used, the same way Django's humanize filter is. It shouldn't be specifically associated with the quotas panel. If this weren't in a directory called "tech-debt" which is completely inappropriate I'd have given the patch a -2. However, the code shouldn't stay like it is.
We should either yank the broken humanizeNumbers function entirely, or place it appropriately for reuse
humanizeNumbers bug: https:/ /bugs.launchpad .net/horizon/ +bug/1384462