summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2015-12-01 00:41:08 +0000
committerGerrit Code Review <review@openstack.org>2015-12-01 00:41:08 +0000
commit492607bd0eb9c12bd5ae8c3b44d968cd615a713e (patch)
tree0a1d041e0fb4c4126cd38649eda8632a8e1de52a
parent95e5e5d3530be3e69940a1825dbe4f329686a05f (diff)
parent437b59794cc880f8e39104563d8d3c99f052759e (diff)
downloadhorizon-492607bd0eb9c12bd5ae8c3b44d968cd615a713e.tar.gz
Merge "Stop using naturalSort in hypervisors table" into stable/kilo
-rw-r--r--horizon/static/horizon/js/horizon.tables.js24
-rw-r--r--openstack_dashboard/dashboards/admin/hypervisors/tables.py1
2 files changed, 0 insertions, 25 deletions
diff --git a/horizon/static/horizon/js/horizon.tables.js b/horizon/static/horizon/js/horizon.tables.js
index f2f6776d4..cc512fb43 100644
--- a/horizon/static/horizon/js/horizon.tables.js
+++ b/horizon/static/horizon/js/horizon.tables.js
@@ -306,28 +306,6 @@ $.tablesorter.addParser({
});
$.tablesorter.addParser({
- id: 'naturalSort',
- is: function(s) {
- return false;
- },
- // compare int values, non-integers use the ordinal value of the first byte
- format: function(s) {
- result = parseInt(s);
- if (isNaN(result)) {
- m = s.match(/\d+/);
- if (m && m.length) {
- return parseInt(m[0]);
- } else {
- return s.charCodeAt(0);
- }
- } else {
- return result;
- }
- },
- type: 'numeric'
-});
-
-$.tablesorter.addParser({
id: 'IPv4Address',
is: function(s, table, cell) {
// the first arg to this function is a string of all the cell's
@@ -466,8 +444,6 @@ horizon.datatables.set_table_sorting = function (parent) {
header_options[i] = {sorter: 'timesinceSorter'};
} else if ($th.data('type') === 'timestamp'){
header_options[i] = {sorter: 'timestampSorter'};
- } else if ($th.data('type') == 'naturalSort'){
- header_options[i] = {sorter: 'naturalSort'};
} else if ($th.data('type') == 'uuid'){
header_options[i] = {sorter: 'uuid'};
}
diff --git a/openstack_dashboard/dashboards/admin/hypervisors/tables.py b/openstack_dashboard/dashboards/admin/hypervisors/tables.py
index ca99f4622..59933416e 100644
--- a/openstack_dashboard/dashboards/admin/hypervisors/tables.py
+++ b/openstack_dashboard/dashboards/admin/hypervisors/tables.py
@@ -21,7 +21,6 @@ from horizon.templatetags import sizeformat
class AdminHypervisorsTable(tables.DataTable):
hostname = tables.Column("hypervisor_hostname",
link="horizon:admin:hypervisors:detail",
- attrs={'data-type': 'naturalSort'},
verbose_name=_("Hostname"))
hypervisor_type = tables.Column("hypervisor_type",