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:
dualfroz committed 2026-10-02 16:50:56 +02:00
1 parent ffb09fb652
commit 7823b35e66
1 file changed
+3 -2
+3 -2
View File
@@ -1,12 +1,13 @@
Ext.define('proxmox-networks', { Ext.define('proxmox-networks', {
extend: 'Ext.data.Model', extend: 'Ext.data.Model',
fields: [ fields: [
'active', { name: 'active', type: 'boolean' },
'address', 'address',
'address6', 'address6',
'altnames', 'altnames',
'autostart', { name: 'autostart', type: 'boolean' },
'bridge_ports', 'bridge_ports',
{ name: 'bridge_vlan_aware', type: 'boolean' },
'cidr', 'cidr',
'cidr6', 'cidr6',
'comments', 'comments',