node/services: optionally show unit/active states

show unit state by default for PVE, with a bit of an hack

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2021-06-23 15:53:29 +02:00
parent ab34f5b215
commit 6607de47e8

View File

@ -1,6 +1,6 @@
Ext.define('proxmox-services', { Ext.define('proxmox-services', {
extend: 'Ext.data.Model', extend: 'Ext.data.Model',
fields: ['service', 'name', 'desc', 'state'], fields: ['service', 'name', 'desc', 'state', 'unit-state', 'active-state'],
idProperty: 'service', idProperty: 'service',
}); });
@ -158,6 +158,23 @@ Ext.define('Proxmox.node.ServiceView', {
width: 100, width: 100,
sortable: true, sortable: true,
dataIndex: 'state', dataIndex: 'state',
renderer: (v, meta, rec) => rec.get('unit-state') === 'masked'
? gettext('disabled')
: v,
},
{
header: gettext('Active'),
width: 100,
sortable: true,
hidden: true,
dataIndex: 'active-state',
},
{
header: gettext('Unit'),
width: 120,
sortable: true,
hidden: typeof PVE === 'object', // FIXME currently only PVE supports it
dataIndex: 'unit-state',
}, },
{ {
header: gettext('Description'), header: gettext('Description'),