]> git.proxmox.com Git - proxmox-widget-toolkit.git/commitdiff
node/services: disable start/stop for masked and unknown units-states
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 23 Jun 2021 13:54:17 +0000 (15:54 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 23 Jun 2021 13:54:17 +0000 (15:54 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
src/node/ServiceView.js

index 3d4814cb38eae96393588c251012ba347cbeae9b..ae02ed48af74bda0867a06b1a407e71085b13f52 100644 (file)
@@ -119,12 +119,16 @@ Ext.define('Proxmox.node.ServiceView', {
            }
            let service = rec.data.service;
            let state = rec.data.state;
+           let unit = rec.data['unit-state'];
 
            syslog_btn.enable();
 
            if (state === 'running') {
                start_btn.disable();
                restart_btn.enable();
+           } else if (unit !== undefined && (unit === 'masked' || unit === 'unknown')) {
+               start_btn.disable();
+               restart_btn.disable();
            } else {
                start_btn.enable();
                restart_btn.disable();