fix an issue where the stop or restart button stays enabled for
elements in 'startOnlyServices' after switching selection from a
service that was not restricted to start-only
note: front-end change only as the backend already refused to stop a
start-only service.
Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
syslog_btn.enable();
if (state === 'running') {
syslog_btn.enable();
if (state === 'running') {
- start_btn.disable();
- restart_btn.enable();
+ if (me.startOnlyServices[service]) {
+ stop_btn.disable();
+ restart_btn.enable();
+ } else {
+ stop_btn.enable();
+ restart_btn.enable();
+ start_btn.disable();
+ }
} else if (unit !== undefined && (unit === 'masked' || unit === 'unknown')) {
start_btn.disable();
restart_btn.disable();
} else {
start_btn.enable();
} else if (unit !== undefined && (unit === 'masked' || unit === 'unknown')) {
start_btn.disable();
restart_btn.disable();
} else {
start_btn.enable();
- if (!me.startOnlyServices[service]) {
- if (state === 'running') {
- stop_btn.enable();
- } else {
- stop_btn.disable();
- }
- }
};
me.mon(store, 'refresh', set_button_status);
};
me.mon(store, 'refresh', set_button_status);