A custom parser is needed for sorting of
custom type columns like the 'Size' columns.
The 'KB', 'MB', 'GB'... values break the sorter
logic and need to be parsed manually.
The custom parser works on all 'Size'/'RAM'/'Memory'
columns. It works also on flavor-info columns like:
`m1.tiny | 512MB RAM | 1 VCPU | 0 Disk`
The custom parser sorts these lines based on the RAM value.
Note: as seen in horizon.tables.js file, an workaround was
added as there is one more <th> in the <thead> (incl. the table_caption)
than the <td>'s in <tbody>. Thus the custom parser needs
to be added to [i-1] header, while the header itself needs [i],
as the parser is processed in <tbody>, while headers are processed
including the table_caption... This might be a problem at some time,
although currently it works...
Reviewed: https:/ /review. openstack. org/10137 github. com/openstack/ horizon/ commit/ ba27042d65c1bf4 7556cfecfbe492d ab9dc88b3b
Committed: http://
Submitter: Jenkins
Branch: master
commit ba27042d65c1bf4 7556cfecfbe492d ab9dc88b3b
Author: Tihomir Trifonov <email address hidden>
Date: Mon Jul 23 18:59:51 2012 +0300
Added custom parser for tablesorter.js
A custom parser is needed for sorting of
custom type columns like the 'Size' columns.
The 'KB', 'MB', 'GB'... values break the sorter
logic and need to be parsed manually.
The custom parser works on all 'Size'/ 'RAM'/' Memory'
columns. It works also on flavor-info columns like:
`m1.tiny | 512MB RAM | 1 VCPU | 0 Disk`
The custom parser sorts these lines based on the RAM value.
Note: as seen in horizon.tables.js file, an workaround was
added as there is one more <th> in the <thead> (incl. the table_caption)
than the <td>'s in <tbody>. Thus the custom parser needs
to be added to [i-1] header, while the header itself needs [i],
as the parser is processed in <tbody>, while headers are processed
including the table_caption... This might be a problem at some time,
although currently it works...
Fixes bug 1013475
Change-Id: I793ae330c33fde 4e625f96e55fdda 3748c84b8c3