From: Thomas Lamprecht Date: Wed, 23 Jun 2021 13:55:00 +0000 (+0200) Subject: node/services: show masked and some unknown units as disabled (greyed out) X-Git-Url: https://git.proxmox.com/?p=proxmox-widget-toolkit.git;a=commitdiff_plain;h=89de7ec504f59501397b3bd9dd6d119c4e6310c3;hp=b6eedbba041f755e30ef1f9cf59729a0971716be node/services: show masked and some unknown units as disabled (greyed out) Signed-off-by: Thomas Lamprecht --- diff --git a/src/css/ext6-pmx.css b/src/css/ext6-pmx.css index 08e10cb..74c48bc 100644 --- a/src/css/ext6-pmx.css +++ b/src/css/ext6-pmx.css @@ -10,6 +10,11 @@ text-align: center; } +.proxmox-disabled-row, .proxmox-disabled-row td { + /*color: #a0a0a0;*/ + color: #666665; +} + .proxmox-invalid-row { background-color: #f3d6d7; } diff --git a/src/node/ServiceView.js b/src/node/ServiceView.js index ae02ed4..d55c57a 100644 --- a/src/node/ServiceView.js +++ b/src/node/ServiceView.js @@ -147,6 +147,25 @@ Ext.define('Proxmox.node.ServiceView', { Proxmox.Utils.monStoreErrors(me, rstore); 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, stateful: false, tbar: [start_btn, stop_btn, restart_btn, syslog_btn],