mirror of
https://git.proxmox.com/git/proxmox-widget-toolkit
synced 2025-07-06 03:00:52 +00:00
service view: fix stale stop/restart button enabled behavior
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>
This commit is contained in:
parent
ae6a1cc908
commit
0c15c08eee
@ -115,22 +115,22 @@ Ext.define('Proxmox.node.ServiceView', {
|
||||
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();
|
||||
stop_btn.disable();
|
||||
restart_btn.disable();
|
||||
}
|
||||
if (!me.startOnlyServices[service]) {
|
||||
if (state === 'running') {
|
||||
stop_btn.enable();
|
||||
} else {
|
||||
stop_btn.disable();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
me.mon(store, 'refresh', set_button_status);
|
||||
|
Loading…
Reference in New Issue
Block a user