From: Daniel Kral <d.kral@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager] ha: rule edit: fix enabling ha rules which are disabled
Date: Mon, 1 Sep 2025 10:29:22 +0200 [thread overview]
Message-ID: <20250901082956.40297-1-d.kral@proxmox.com> (raw)
Setting the `disable` property to 0 does not make a HA rule being
enabled anymore since a change in the HA Manager, so explicitly delete
the `disable` property when the HA rule should be enabled.
Reported-by: Friedrich Weber <f.weber@proxmox.com>
Signed-off-by: Daniel Kral <d.kral@proxmox.com>
---
www/manager6/ha/RuleEdit.js | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/www/manager6/ha/RuleEdit.js b/www/manager6/ha/RuleEdit.js
index 9ecebd6d..c65c5c97 100644
--- a/www/manager6/ha/RuleEdit.js
+++ b/www/manager6/ha/RuleEdit.js
@@ -27,7 +27,13 @@ Ext.define('PVE.ha.RuleInputPanel', {
values.rule = 'ha-rule-' + Ext.data.identifier.Uuid.Global.generate().slice(0, 13);
}
- values.disable = values.enable ? 0 : 1;
+ if (values.enable) {
+ if (!me.isCreate) {
+ Proxmox.Utils.assemble_field_data(values, { delete: 'disable' });
+ }
+ } else {
+ values.disable = 1;
+ }
delete values.enable;
values.resources = me.formatResourceListString(values.resources);
--
2.47.2
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
next reply other threads:[~2025-09-01 8:29 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-01 8:29 Daniel Kral [this message]
2025-09-02 12:32 ` [pve-devel] applied: " Fabian Grünbichler
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=20250901082956.40297-1-d.kral@proxmox.com \
--to=d.kral@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 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.