]> git.proxmox.com Git - pve-manager.git/commitdiff
ui: guest selector: switch from post-filter to query param for API call
authorDominik Csapak <d.csapak@proxmox.com>
Mon, 6 Mar 2023 14:23:31 +0000 (15:23 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Sat, 11 Mar 2023 17:47:34 +0000 (18:47 +0100)
So that we can modify any filters without always having to consider
filtering for the type too. Note that the 'vm' tyoe here is slightly
confusing and should actually be 'guest', as this also returns
containers. Reduces transmission size a bit as nice side effect.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
www/manager6/form/VMSelector.js

index bb670f9302bc61352534337fd6bfa1456f169b7f..fb54e48353ed86737b2e1de4383cb9a189df9cca 100644 (file)
@@ -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',