[pve-devel] [PATCH manager v2 7/8] ui: cpu flag selector: use simpler method to get all records of the store
Fiona Ebner
f.ebner at proxmox.com
Fri Nov 7 15:43:45 CET 2025
The Ext.data.Store class has a getData() method for getting all
records, which is simpler than doing queryBy(Ext.returnTrue).
Suggested-by: Daniel Kral <d.kral at proxmox.com>
Signed-off-by: Fiona Ebner <f.ebner at proxmox.com>
---
New in v2.
www/manager6/form/VMCPUFlagSelector.js | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/www/manager6/form/VMCPUFlagSelector.js b/www/manager6/form/VMCPUFlagSelector.js
index 2dbc21dc..630f79f5 100644
--- a/www/manager6/form/VMCPUFlagSelector.js
+++ b/www/manager6/form/VMCPUFlagSelector.js
@@ -70,8 +70,7 @@ Ext.define('PVE.form.VMCPUFlagSelector', {
let store = me.getStore();
let flags = '';
- // ExtJS does not has a nice getAllRecords interface for stores :/
- store.queryBy(Ext.returnTrue).each(function (rec) {
+ store.getData().each(function (rec) {
let s = rec.get('state');
if (s && s !== '=') {
let f = rec.get('flag');
@@ -96,11 +95,7 @@ Ext.define('PVE.form.VMCPUFlagSelector', {
me.unkownFlags = [];
- me.getStore()
- .queryBy(Ext.returnTrue)
- .each(function (rec) {
- rec.set('state', '=');
- });
+ me.getStore().getData().each((rec) => rec.set('state', '='));
let flags = value ? value.split(';') : [];
flags.forEach(function (flag) {
--
2.47.3
More information about the pve-devel
mailing list