filter templates in bulk start/stop

because we cannot start/stop templates

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak
2017-04-19 14:45:22 +02:00
committed by Dietmar Maurer
parent a75f696f5b
commit 20565f0c36

View 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();