]> git.proxmox.com Git - proxmox-widget-toolkit.git/commitdiff
node/services: show masked and some unknown units as disabled (greyed out)
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 23 Jun 2021 13:55:00 +0000 (15:55 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 23 Jun 2021 13:55:00 +0000 (15:55 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/css/ext6-pmx.css
src/node/ServiceView.js

index 08e10cb6d01f8a35c0f74e0fb64fec47a03cecb1..74c48bc7c51a07efa2410817948dd9f788a6f636 100644 (file)
     text-align: center;
 }
 
+.proxmox-disabled-row, .proxmox-disabled-row td {
+    /*color: #a0a0a0;*/
+    color: #666665;
+}
+
 .proxmox-invalid-row {
     background-color: #f3d6d7;
 }
index ae02ed48af74bda0867a06b1a407e71085b13f52..d55c57adda76bbc5664b4aded0a183499aaea66c 100644 (file)
@@ -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],