public inbox for pve-devel@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
  2021-07-13 16:38 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ 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] 2+ messages in thread

* [pve-devel] applied: [PATCH widget-toolkit] ServiceView: fix start/stop/restart button behavior
  2021-07-13 11:03 [pve-devel] [PATCH widget-toolkit] ServiceView: fix start/stop/restart button behavior Oguz Bektas
@ 2021-07-13 16:38 ` Thomas Lamprecht
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Lamprecht @ 2021-07-13 16:38 UTC (permalink / raw)
  To: Proxmox VE development discussion, Oguz Bektas, pbs-devel

commit subject mentions start, stop, restart, message only stop, but it
was stop and restart.

On 13.07.21 13:03, Oguz Bektas wrote:
> fix an issue where the stop button stays enabled for elements in
> 'startOnlyServices' after clicking a service that's not start-only
> 

I added a note that the backend already refused stopping that services

> Signed-off-by: Oguz Bektas <o.bektas@proxmox.com>
> ---
> 
>  src/node/ServiceView.js | 18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)
> 
>

applied, thanks!

FYI: There was still a wrong case for masked or unknown units, handled in a
followup.




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

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

Thread overview: 2+ 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 16:38 ` [pve-devel] applied: " Thomas Lamprecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal