From: Dominik Csapak <d.csapak@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [RFC PATCH pve-manager 1/2] ui: iso selector: add 'reload' button
Date: Mon, 13 Jul 2026 13:36:59 +0200 [thread overview]
Message-ID: <20260713114205.2382258-2-d.csapak@proxmox.com> (raw)
In-Reply-To: <20260713114205.2382258-1-d.csapak@proxmox.com>
so a user can manually reload the storage list as well as the file list.
This sometimes comes up when e.g. creating a new guest and a user
uploads a new ISO in a different tab.
The new button is added in a new row beneath the file selector and shows
the loading progress until the storage as well as the file selector are
done loading.
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
www/manager6/form/FileSelector.js | 12 ++++++++++++
www/manager6/form/IsoSelector.js | 27 +++++++++++++++++++++++++++
www/manager6/form/StorageSelector.js | 11 +++++++++--
3 files changed, 48 insertions(+), 2 deletions(-)
diff --git a/www/manager6/form/FileSelector.js b/www/manager6/form/FileSelector.js
index b8f6a8c2..af4e4be8 100644
--- a/www/manager6/form/FileSelector.js
+++ b/www/manager6/form/FileSelector.js
@@ -15,6 +15,18 @@ Ext.define('PVE.form.FileSelector', {
},
},
+ reload: function (finishCb) {
+ let me = this;
+ finishCb ??= Ext.emptyFn;
+ if (!me.storage || !me.nodename || me.isDisabled()) {
+ finishCb();
+ return;
+ }
+ me.store.load(() => {
+ finishCb();
+ });
+ },
+
setStorage: function (storage, nodename) {
var me = this;
diff --git a/www/manager6/form/IsoSelector.js b/www/manager6/form/IsoSelector.js
index b2d94ed3..48c10427 100644
--- a/www/manager6/form/IsoSelector.js
+++ b/www/manager6/form/IsoSelector.js
@@ -110,5 +110,32 @@ Ext.define('PVE.form.IsoSelector', {
},
},
},
+ {
+ xtype: 'container',
+ layout: 'hbox',
+ items: [
+ { xtype: 'box', flex: 1 }, // just a spacer
+ {
+ xtype: 'button',
+ reference: 'reloadBtn',
+ iconCls: 'fa fa-refresh',
+ text: gettext('Reload'),
+ handler: function () {
+ let me = this;
+ me.setDisabled(true);
+ me.setIconCls('fa fa-refresh fa-spin');
+ let selector = me.up('pveIsoSelector');
+ let storage = selector.lookup('storage');
+ let fileSelector = selector.lookup('file');
+ storage.reloadStorageList(() => {
+ fileSelector.reload(() => {
+ me.setDisabled(false);
+ me.setIconCls('fa fa-refresh');
+ });
+ });
+ },
+ },
+ ],
+ },
],
});
diff --git a/www/manager6/form/StorageSelector.js b/www/manager6/form/StorageSelector.js
index 0b5e10da..42961f72 100644
--- a/www/manager6/form/StorageSelector.js
+++ b/www/manager6/form/StorageSelector.js
@@ -68,9 +68,11 @@ Ext.define(
],
},
- reloadStorageList: function () {
+ reloadStorageList: function (finishCb) {
let me = this;
+ finishCb ??= Ext.emptyFn;
+
if (me.clusterView) {
me.getStore().setProxy({
type: 'proxmox',
@@ -97,6 +99,7 @@ Ext.define(
me.getStore().setFilters(filters);
} else {
if (!me.nodename) {
+ finishCb();
return;
}
@@ -117,7 +120,11 @@ Ext.define(
});
}
- me.store.load(() => me.validate());
+ me.store.load(() => {
+ let result = me.validate();
+ finishCb();
+ return result;
+ });
},
setTargetNode: function (targetNode) {
--
2.47.3
next prev parent reply other threads:[~2026-07-13 11:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-13 11:36 [RFC PATCH pve-manager 0/2] add reload/upload buttons to iso selector Dominik Csapak
2026-07-13 11:36 ` Dominik Csapak [this message]
2026-07-13 11:37 ` [RFC PATCH pve-manager 2/2] ui: iso selector: add 'upload' button in the create VM wizard 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=20260713114205.2382258-2-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