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>
The interface list was sorted by comparing the names as plain strings,
so 'eno10' and 'eno11' came before 'eno2', and 'vmbr10' before 'vmbr2'.
Sort by name with a comparison that orders numbers in the names by
their value instead. Use the same sorter for the initial order of the
store and for the name column, so that the column header still shows
the initial sort order and the first click on it reverses it, like
before.
The 'Ports/Slaves' column uses the type as data index, so sorting by it
just sorted by type. Sort it by the shown ports or slaves instead, also
in natural order.
Signed-off-by: Michal Fox <me@dualfroz.com>