From: Dominik Csapak <d.csapak@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH pve-manager 1/2] ui: storage wizard: sort storages by id
Date: Thu, 26 Nov 2026 11:57:02 +0100 [thread overview]
Message-ID: <20261126105712.1420361-1-d.csapak@proxmox.com> (raw)
otherwise the later comparison of which storages are in use can be
confused, as the backend does not return the list sorted in any way.
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Reported-by: Mira Limbeck <m.limbeck@proxmox.com>
---
www/manager6/storage/wizard/Target.js | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/www/manager6/storage/wizard/Target.js b/www/manager6/storage/wizard/Target.js
index c9c0bc39..4143a44b 100644
--- a/www/manager6/storage/wizard/Target.js
+++ b/www/manager6/storage/wizard/Target.js
@@ -162,6 +162,12 @@ Ext.define('PVE.storage.wizard.Target', {
field.setHideTrigger(!suggestions.length);
},
+ setStorages: function (data) {
+ let me = this;
+ me.storages = data ?? [];
+ me.storages.sort((a, b) => (a?.storage ?? '').localeCompare(b?.storage ?? ''));
+ },
+
onSubmit: function () {
let me = this;
let nvme = me.storageType === 'nvmeof';
@@ -233,7 +239,7 @@ Ext.define('PVE.storage.wizard.Target', {
if (wizard.destroyed) {
return;
}
- me.storages = response.result.data;
+ me.setStorages(response.result.data);
me.updateConnectionField();
me.updatePortalSuggestions();
if (me.existingConnection()?.storage !== shown) {
@@ -495,7 +501,7 @@ Ext.define('PVE.storage.wizard.Target', {
},
success: function (response) {
if (!me.destroyed) {
- me.storages = response.result.data;
+ me.setStorages(response.result.data);
me.updateConnectionField();
me.updatePortalSuggestions();
me.down('field[name=storage]').validate();
--
2.47.3
next reply other threads:[~2026-11-26 10:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 10:57 Dominik Csapak [this message]
2026-11-26 10:57 ` [PATCH pve-manager 2/2] ui: storage wizard: ignore disabled storages when reusing a target Dominik Csapak
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=20261126105712.1420361-1-d.csapak@proxmox.com \
--to=d.csapak@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