[pve-devel] [PATCH manager 3/7] ui: VMSelector: change from filter to load parameters

Dominik Csapak d.csapak at proxmox.com
Mon Mar 6 15:23:31 CET 2023


so that we can modify the filters without having to consider filtering
for the type. Note that 'vm' for the 'type' parameter also returns
containers.

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 www/manager6/form/VMSelector.js | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/www/manager6/form/VMSelector.js b/www/manager6/form/VMSelector.js
index bb670f930..fb54e4835 100644
--- a/www/manager6/form/VMSelector.js
+++ b/www/manager6/form/VMSelector.js
@@ -15,12 +15,7 @@ Ext.define('PVE.form.VMSelector', {
 
     store: {
 	model: 'PVEResources',
-	autoLoad: true,
 	sorters: 'vmid',
-	filters: [{
-	    property: 'type',
-	    value: /lxc|qemu/,
-	}],
     },
 
     columnsDeclaration: [
@@ -189,6 +184,8 @@ Ext.define('PVE.form.VMSelector', {
 
 	me.callParent();
 
+	me.getStore().load({ params: { type: 'vm' } });
+
 	if (me.nodename) {
 	    me.store.filters.add({
 		property: 'node',
-- 
2.30.2






More information about the pve-devel mailing list