node/services: disable start/stop for masked and unknown units-states

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

View 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();