node/services: show masked and some unknown units as disabled (greyed out)

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2021-06-23 15:55:00 +02:00
parent b6eedbba04
commit 89de7ec504
2 changed files with 24 additions and 0 deletions

View File

@ -10,6 +10,11 @@
text-align: center; text-align: center;
} }
.proxmox-disabled-row, .proxmox-disabled-row td {
/*color: #a0a0a0;*/
color: #666665;
}
.proxmox-invalid-row { .proxmox-invalid-row {
background-color: #f3d6d7; background-color: #f3d6d7;
} }

View File

@ -147,6 +147,25 @@ Ext.define('Proxmox.node.ServiceView', {
Proxmox.Utils.monStoreErrors(me, rstore); Proxmox.Utils.monStoreErrors(me, rstore);
Ext.apply(me, { Ext.apply(me, {
viewConfig: {
trackOver: false,
stripeRows: false, // does not work with getRowClass()
getRowClass: function(record, index) {
let unitState = record.get('unit-state');
if (!unitState) {
return '';
}
if (unitState === 'masked') {
return "proxmox-disabled-row";
} else if (unitState === 'unknown') {
if (record.get('name') === 'syslog') {
return "proxmox-disabled-row"; // replaced by journal on most hosts
}
return "proxmox-warning-row";
}
return '';
},
},
store: store, store: store,
stateful: false, stateful: false,
tbar: [start_btn, stop_btn, restart_btn, syslog_btn], tbar: [start_btn, stop_btn, restart_btn, syslog_btn],