all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH widget-toolkit] ServiceView: fix start/stop/restart button behavior
@ 2021-07-13 11:03 ` Oguz Bektas
  0 siblings, 0 replies; 4+ messages in thread
From: Oguz Bektas @ 2021-07-13 11:03 UTC (permalink / raw)
  To: pbs-devel, pve-devel

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@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





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-07-13 16:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-13 11:03 [pve-devel] [PATCH widget-toolkit] ServiceView: fix start/stop/restart button behavior Oguz Bektas
2021-07-13 11:03 ` [pbs-devel] " Oguz Bektas
2021-07-13 16:38 ` [pve-devel] applied: " Thomas Lamprecht
2021-07-13 16:38   ` [pbs-devel] applied: [pve-devel] " Thomas Lamprecht

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal