[pve-devel] [PATCH widget-toolkit] ServiceView: fix start/stop/restart button behavior
Oguz Bektas
o.bektas at proxmox.com
Tue Jul 13 13:03:15 CEST 2021
fix an issue where the stop button stays enabled for elements in
'startOnlyServices' after clicking a service that's not start-only
Signed-off-by: Oguz Bektas <o.bektas at proxmox.com>
---
src/node/ServiceView.js | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/src/node/ServiceView.js b/src/node/ServiceView.js
index 4344c63..32d3e8a 100644
--- a/src/node/ServiceView.js
+++ b/src/node/ServiceView.js
@@ -124,22 +124,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);
--
2.30.2
More information about the pve-devel
mailing list