Merge "Fixes sorting on IP Address columns in tables."
This commit is contained in:
commit
4aeb8fc72a
@ -252,6 +252,10 @@ $(parent).find("table.datatable").each(function () {
|
||||
// set as [i-1] as there is one more <th> in <thead>
|
||||
// than <td>'s in <tbody>
|
||||
header_options[i-1] = {sorter: 'sizeSorter'};
|
||||
} else if ($th.data('type') == 'ip'){
|
||||
// set as [i-1] as there is one more <th> in <thead>
|
||||
// than <td>'s in <tbody>
|
||||
header_options[i-1] = {sorter: 'ipAddress'};
|
||||
}
|
||||
});
|
||||
$table.tablesorter({
|
||||
|
@ -97,7 +97,9 @@ class AdminInstancesTable(tables.DataTable):
|
||||
name = tables.Column("name",
|
||||
link=("horizon:admin:instances:detail"),
|
||||
verbose_name=_("Name"))
|
||||
ip = tables.Column(get_ips, verbose_name=_("IP Address"))
|
||||
ip = tables.Column(get_ips,
|
||||
verbose_name=_("IP Address"),
|
||||
attrs={'data-type': "ip"})
|
||||
size = tables.Column(get_size,
|
||||
verbose_name=_("Size"),
|
||||
classes=('nowrap-col',),
|
||||
|
@ -111,7 +111,9 @@ def get_instance_link(datum):
|
||||
|
||||
|
||||
class FloatingIPsTable(tables.DataTable):
|
||||
ip = tables.Column("ip", verbose_name=_("IP Address"))
|
||||
ip = tables.Column("ip",
|
||||
verbose_name=_("IP Address"),
|
||||
attrs={'data-type': "ip"})
|
||||
instance = tables.Column(get_instance_info,
|
||||
link=get_instance_link,
|
||||
verbose_name=_("Instance"),
|
||||
|
@ -462,7 +462,9 @@ class InstancesTable(tables.DataTable):
|
||||
name = tables.Column("name",
|
||||
link=("horizon:project:instances:detail"),
|
||||
verbose_name=_("Instance Name"))
|
||||
ip = tables.Column(get_ips, verbose_name=_("IP Address"))
|
||||
ip = tables.Column(get_ips,
|
||||
verbose_name=_("IP Address"),
|
||||
attrs={'data-type': "ip"})
|
||||
size = tables.Column(get_size,
|
||||
verbose_name=_("Size"),
|
||||
attrs={'data-type': 'size'})
|
||||
|
@ -136,7 +136,8 @@ def get_member_link(member):
|
||||
class MembersTable(tables.DataTable):
|
||||
address = tables.Column('address',
|
||||
verbose_name=_("IP Address"),
|
||||
link=get_member_link)
|
||||
link=get_member_link,
|
||||
attrs={'data-type': "ip"})
|
||||
protocol_port = tables.Column('protocol_port',
|
||||
verbose_name=_("Protocol Port"))
|
||||
pool_name = tables.Column("pool_name",
|
||||
|
Loading…
Reference in New Issue
Block a user