spiceshell: ['', gettext('Shell') + ' (Spice)'],
startall: ['', gettext('Bulk start VMs and Containers')],
stopall: ['', gettext('Bulk shutdown VMs and Containers')],
+ suspendall: ['', gettext('Suspend all VMs')],
unknownimgdel: ['', gettext('Destroy image from unknown guest')],
wipedisk: ['Device', gettext('Wipe Disk')],
vncproxy: ['VM/CT', gettext('Console')],
});
},
},
+ {
+ text: gettext('Bulk Suspend'),
+ itemId: 'bulksuspend',
+ iconCls: 'fa fa-fw fa-download',
+ handler: function() {
+ Ext.create('PVE.window.BulkAction', {
+ nodename: this.up('menu').nodename,
+ title: gettext('Bulk Suspend'),
+ btnText: gettext('Suspend'),
+ action: 'suspendall',
+ autoShow: true,
+ });
+ },
+ },
{
text: gettext('Bulk Migrate'),
itemId: 'bulkmigrate',
if (!caps.vms['VM.PowerMgmt']) {
me.getComponent('bulkstart').setDisabled(true);
me.getComponent('bulkstop').setDisabled(true);
+ me.getComponent('bulksuspend').setDisabled(true);
}
if (!caps.nodes['Sys.PowerMgmt']) {
me.getComponent('wakeonlan').setDisabled(true);
});
},
},
+ {
+ text: gettext('Bulk Suspend'),
+ iconCls: 'fa fa-fw fa-download',
+ disabled: !caps.vms['VM.PowerMgmt'],
+ handler: function() {
+ Ext.create('PVE.window.BulkAction', {
+ autoShow: true,
+ nodename: nodename,
+ title: gettext('Bulk Suspend'),
+ btnText: gettext('Suspend'),
+ action: 'suspendall',
+ });
+ },
+ },
{
text: gettext('Bulk Migrate'),
iconCls: 'fa fa-fw fa-send-o',
},
border: false,
- // the action to set, currently there are: `startall`, `migrateall`, `stopall`
+ // the action to set, currently there are: `startall`, `migrateall`, `stopall`, `suspendall`
action: undefined,
submit: function(params) {
};
let defaultStatus = me.action === 'migrateall' ? '' : me.action === 'startall' ? 'stopped' : 'running';
+ let defaultType = me.action === 'suspendall' ? 'qemu' : '';
let statusMap = [];
let poolMap = [];
fieldLabel: gettext("Type"),
emptyText: gettext('All'),
editable: false,
- value: '',
+ value: defaultType,
store: [
['', gettext('All')],
['lxc', gettext('CT')],