fix #6109: node network view: fix sorting by active state
The API only sets 'active' for active interfaces, so it is either 1 or missing. As 1 compares neither greater nor less than undefined, sorting by the 'Active' column kept the previous order. The same applies to the 'Autostart' and 'VLAN aware' columns. Declare those fields as booleans, so that missing values get converted to false and the interfaces can be sorted by them. The shown values do not change, as missing values were already rendered as 'No'. Signed-off-by: Michal Fox <me@dualfroz.com>
This commit is contained in:
1 parent
ffb09fb652
commit
7823b35e66
1 file changed
+3
-2
@@ -1,12 +1,13 @@
|
||||
Ext.define('proxmox-networks', {
|
||||
extend: 'Ext.data.Model',
|
||||
fields: [
|
||||
'active',
|
||||
{ name: 'active', type: 'boolean' },
|
||||
'address',
|
||||
'address6',
|
||||
'altnames',
|
||||
'autostart',
|
||||
{ name: 'autostart', type: 'boolean' },
|
||||
'bridge_ports',
|
||||
{ name: 'bridge_vlan_aware', type: 'boolean' },
|
||||
'cidr',
|
||||
'cidr6',
|
||||
'comments',
|
||||
|
||||
Reference in new issue
Block a user