[pve-devel] [PATCH manager] filter templates in bulk start/stop
Dominik Csapak
d.csapak at proxmox.com
Wed Apr 19 14:45:22 CEST 2017
because we cannot start/stop templates
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
www/manager6/form/VMSelector.js | 26 ++++++++++++++------------
1 file changed, 14 insertions(+), 12 deletions(-)
diff --git a/www/manager6/form/VMSelector.js b/www/manager6/form/VMSelector.js
index 81093f1e..59d2b587 100644
--- a/www/manager6/form/VMSelector.js
+++ b/www/manager6/form/VMSelector.js
@@ -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();
--
2.11.0
More information about the pve-devel
mailing list