mirror of https://github.com/apache/cloudstack.git
metrics: fix sorting regression in case of state columns
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
parent
3f9b6b1c6f
commit
1634dd4533
|
|
@ -166,9 +166,6 @@
|
|||
sortData.push($(this));
|
||||
});
|
||||
|
||||
if (hasAllRowsSameValue) {
|
||||
return;
|
||||
}
|
||||
|
||||
var stringComparator = function(a,b) {
|
||||
return a.html().localeCompare(b.html());
|
||||
|
|
@ -186,8 +183,13 @@
|
|||
var comparator = stringComparator;
|
||||
if ($($elems[0]).hasClass('state')) {
|
||||
comparator = stateComparator;
|
||||
} else if (columnIndex != 0 && isNumeric($($elems[0]).children().html())) {
|
||||
comparator = numericComparator;
|
||||
} else {
|
||||
if (hasAllRowsSameValue) {
|
||||
return;
|
||||
}
|
||||
if (columnIndex != 0 && isNumeric($($elems[0]).children().html())) {
|
||||
comparator = numericComparator;
|
||||
}
|
||||
}
|
||||
|
||||
sortData.sort(comparator);
|
||||
|
|
|
|||
Loading…
Reference in New Issue