From: Oguz Bektas <o.bektas@proxmox.com>
To: pbs-devel@lists.proxmox.com, pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH widget-toolkit] ServiceView: fix start/stop/restart button behavior
Date: Tue, 13 Jul 2021 13:03:15 +0200 [thread overview]
Message-ID: <20210713110314.646267-1-o.bektas@proxmox.com> (raw)
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
next reply other threads:[~2021-07-13 11:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-13 11:03 Oguz Bektas [this message]
2021-07-13 16:38 ` [pve-devel] applied: " Thomas Lamprecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210713110314.646267-1-o.bektas@proxmox.com \
--to=o.bektas@proxmox.com \
--cc=pbs-devel@lists.proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox