[pve-devel] [PATCH manager 1/3] ui: Utils: refactor refreshing the the resource store/tree
Dominik Csapak
d.csapak at proxmox.com
Wed Feb 1 16:49:15 CET 2023
we'll need it elsewhere too, and it was rather hidden in the
updateTagSettings call.
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
www/manager6/Utils.js | 3 +++
www/manager6/dc/OptionView.js | 1 +
2 files changed, 4 insertions(+)
diff --git a/www/manager6/Utils.js b/www/manager6/Utils.js
index fcc668c3a..ee9e4bd5d 100644
--- a/www/manager6/Utils.js
+++ b/www/manager6/Utils.js
@@ -1871,6 +1871,7 @@ Ext.define('PVE.Utils', {
PVE.Utils.updateTagList(PVE.UIOptions['allowed-tags']);
PVE.Utils.updateTagSettings(PVE.UIOptions?.['tag-style']);
+ PVE.Utils.fireUIUpdate();
},
});
},
@@ -1920,7 +1921,9 @@ Ext.define('PVE.Utils', {
}
Ext.ComponentQuery.query('pveResourceTree')[0].setUserCls(`proxmox-tags-${shape}`);
+ },
+ fireUIUpdate: function() {
if (!PVE.data.ResourceStore.isLoading() && PVE.data.ResourceStore.isLoaded()) {
PVE.data.ResourceStore.fireEvent('load');
}
diff --git a/www/manager6/dc/OptionView.js b/www/manager6/dc/OptionView.js
index 9c803beef..2e4f76263 100644
--- a/www/manager6/dc/OptionView.js
+++ b/www/manager6/dc/OptionView.js
@@ -566,6 +566,7 @@ Ext.define('PVE.dc.OptionView', {
PVE.UIOptions['tag-style'] = store.getById('tag-style')?.data?.value;
PVE.Utils.updateTagSettings(PVE.UIOptions['tag-style']);
+ PVE.Utils.fireUIUpdate();
});
me.on('activate', me.rstore.startUpdate);
--
2.30.2
More information about the pve-devel
mailing list