From: Hannes Laimer <h.laimer@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH pve-manager] fixup! ui: ha: consider status/presence of qdevice for warning
Date: Mon, 15 Sep 2025 08:51:15 +0200 [thread overview]
Message-ID: <20250915065115.12569-1-h.laimer@proxmox.com> (raw)
In-Reply-To: <20250912101646.21362-1-h.laimer@proxmox.com>
Signed-off-by: Hannes Laimer <h.laimer@proxmox.com>
---
www/manager6/ha/ResourceEdit.js | 24 +++++++++++-------------
1 file changed, 11 insertions(+), 13 deletions(-)
diff --git a/www/manager6/ha/ResourceEdit.js b/www/manager6/ha/ResourceEdit.js
index 04795da7..ae94f002 100644
--- a/www/manager6/ha/ResourceEdit.js
+++ b/www/manager6/ha/ResourceEdit.js
@@ -45,7 +45,7 @@ Ext.define('PVE.ha.VMResourceInputPanel', {
failure: function (response) {
Ext.Msg.alert(gettext('Error'), response.htmlStatus);
},
- success: function (response) {
+ success: async function (response) {
var nodes = response.result.data;
var votes = 0;
Ext.Array.forEach(nodes, function (node) {
@@ -54,18 +54,16 @@ Ext.define('PVE.ha.VMResourceInputPanel', {
});
if (votes < MIN_QUORUM_VOTES) {
- Proxmox.Utils.API2Request({
- url: '/cluster/config/qdevice',
- method: 'GET',
- failure: function (response) {
- fewVotesHint.setVisible(true);
- },
- success: function (response) {
- let qdeviceStatus = response.result.data;
- let qdeviceConnected = qdeviceStatus.State === 'Connected';
- fewVotesHint.setVisible(!qdeviceConnected);
- },
- });
+ try {
+ let { result: qres } = await Proxmox.Async.api2({
+ url: '/cluster/config/qdevice',
+ method: 'GET',
+ });
+ let qdeviceConnected = qres.data.State === 'Connected';
+ fewVotesHint.setVisible(!qdeviceConnected);
+ } catch (_) {
+ fewVotesHint.setVisible(true);
+ }
}
},
});
--
2.47.3
_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
prev parent reply other threads:[~2025-09-15 6:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-12 10:16 [pve-devel] [PATCH pve-manager] " Hannes Laimer
2025-09-12 16:36 ` Thomas Lamprecht
2025-09-15 6:52 ` Hannes Laimer
2025-09-15 10:25 ` Thomas Lamprecht
2025-09-15 10:29 ` Hannes Laimer
2025-09-15 6:51 ` Hannes Laimer [this message]
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=20250915065115.12569-1-h.laimer@proxmox.com \
--to=h.laimer@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