]> git.proxmox.com Git - pve-manager-legacy.git/commitdiff
filter templates in bulk start/stop
authorDominik Csapak <d.csapak@proxmox.com>
Wed, 19 Apr 2017 12:45:22 +0000 (14:45 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 20 Apr 2017 04:22:22 +0000 (06:22 +0200)
because we cannot start/stop templates

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

index 81093f1e569acc594415c386441a6f42a79803cf..59d2b587595848dd5c0bcbf583509720134c01a7 100644 (file)
@@ -179,24 +179,26 @@ Ext.define('PVE.form.VMSelector', {
 
        // only show the relevant guests by default
        if (me.action) {
+           var statusfilter = '';
            switch (me.action) {
                case 'startall':
-                   me.store.filters.add({
-                       id: 'x-gridfilter-status',
-                       operator: 'in',
-                       property: 'status',
-                       value: ['stopped']
-                   });
+                   statusfilter = 'stopped';
                    break;
                case 'stopall':
-                   me.store.filters.add({
-                       id: 'x-gridfilter-status',
-                       operator: 'in',
-                       property: 'status',
-                       value: ['running']
-                   });
+                   statusfilter = 'running';
                    break;
            }
+           if (statusfilter !== '') {
+               me.store.filters.add({
+                   property: 'template',
+                   value: 0
+               },{
+                   id: 'x-gridfilter-status',
+                   operator: 'in',
+                   property: 'status',
+                   value: [statusfilter]
+               });
+           }
        }
 
        var store = me.getStore();