From: Dominik Csapak <d.csapak@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager v3 4/6] ui: refactor refreshing the the resource store/tree
Date: Wed, 22 Feb 2023 08:51:50 +0100 [thread overview]
Message-ID: <20230222075152.982943-5-d.csapak@proxmox.com> (raw)
In-Reply-To: <20230222075152.982943-1-d.csapak@proxmox.com>
we'll need it elsewhere too, and it was rather hidden in the
updateTagSettings call.
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
www/manager6/UIOptions.js | 13 ++++++++-----
www/manager6/dc/OptionView.js | 1 +
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/www/manager6/UIOptions.js b/www/manager6/UIOptions.js
index c80a7c859..dcdf01ee1 100644
--- a/www/manager6/UIOptions.js
+++ b/www/manager6/UIOptions.js
@@ -16,6 +16,7 @@ Ext.define('PVE.UIOptions', {
PVE.UIOptions.updateTagList(PVE.UIOptions.options['allowed-tags']);
PVE.UIOptions.updateTagSettings(PVE.UIOptions.options['tag-style']);
+ PVE.UIOptions.fireUIConfigChanged();
},
});
},
@@ -65,11 +66,6 @@ Ext.define('PVE.UIOptions', {
}
Ext.ComponentQuery.query('pveResourceTree')[0].setUserCls(`proxmox-tags-${shape}`);
-
- if (!PVE.data.ResourceStore.isLoading() && PVE.data.ResourceStore.isLoaded()) {
- PVE.data.ResourceStore.fireEvent('load');
- }
- Ext.GlobalEvents.fireEvent('loadedUiOptions');
},
tagTreeStyles: {
@@ -89,4 +85,11 @@ Ext.define('PVE.UIOptions', {
shouldSortTags: function() {
return !(PVE.UIOptions.options['tag-style']?.ordering === 'config');
},
+
+ fireUIConfigChanged: function() {
+ if (!PVE.data.ResourceStore.isLoading() && PVE.data.ResourceStore.isLoaded()) {
+ PVE.data.ResourceStore.fireEvent('load');
+ }
+ Ext.GlobalEvents.fireEvent('loadedUiOptions');
+ },
});
diff --git a/www/manager6/dc/OptionView.js b/www/manager6/dc/OptionView.js
index 4435876dd..f36a68560 100644
--- a/www/manager6/dc/OptionView.js
+++ b/www/manager6/dc/OptionView.js
@@ -566,6 +566,7 @@ Ext.define('PVE.dc.OptionView', {
PVE.UIOptions.options['tag-style'] = store.getById('tag-style')?.data?.value;
PVE.UIOptions.updateTagSettings(PVE.UIOptions.options['tag-style']);
+ PVE.UIOptions.fireUIConfigChanged();
});
me.on('activate', me.rstore.startUpdate);
--
2.30.2
next prev parent reply other threads:[~2023-02-22 7:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-22 7:51 [pve-devel] [PATCH manager v3 0/6] fix #1408: ui: make tree sorting configurable Dominik Csapak
2023-02-22 7:51 ` [pve-devel] [PATCH manager v3 1/6] ui: remove 'Storage View' Dominik Csapak
2023-02-22 7:51 ` [pve-devel] [PATCH manager v3 2/6] ui: remove unused booleanfield Dominik Csapak
2023-02-22 7:51 ` [pve-devel] [PATCH manager v3 3/6] ui: refactor ui option related methods into UIOptions Dominik Csapak
2023-02-22 7:51 ` Dominik Csapak [this message]
2023-02-22 7:51 ` [pve-devel] [PATCH manager v3 5/6] ui: add window for changing tree related options Dominik Csapak
2023-02-22 7:51 ` [pve-devel] [PATCH manager v3 6/6] fix #1408: ui: ResourceTree: sort the tree according to tree-sorting options Dominik Csapak
2023-02-22 10:43 ` [pve-devel] applied-series: [PATCH manager v3 0/6] fix #1408: ui: make tree sorting configurable Thomas Lamprecht
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=20230222075152.982943-5-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