[pve-devel] [PATCH pve-manager 2/2] ui: add bulk suspend support

Thomas Lamprecht t.lamprecht at proxmox.com
Mon Nov 6 19:32:18 CET 2023


Am 18/10/2023 um 12:34 schrieb Hannes Laimer:

> diff --git a/www/manager6/form/VMSelector.js b/www/manager6/form/VMSelector.js
> index d59847f2..ad0bfc03 100644
> --- a/www/manager6/form/VMSelector.js
> +++ b/www/manager6/form/VMSelector.js
> @@ -233,6 +233,10 @@ Ext.define('PVE.form.VMSelector', {
>  		case 'stopall':
>  		    statusfilter = 'running';
>  		    break;
> +		case 'suspendall':
> +		    statusfilter = 'running';
> +		    me.getStore().addFilter({ property: 'type', value: /qemu/ });

@Dominik: this (as a whole) clashes a bit with your filter-rework for bulk-actions,
would you prefer to get that in earlier or is adapting to this not much work anyway?

> +		    break;
>  	    }
>  	    if (statusfilter !== '') {
>  		me.getStore().addFilter([{
> diff --git a/www/manager6/node/CmdMenu.js b/www/manager6/node/CmdMenu.js
> index dc56ef08..c64a54d2 100644
> --- a/www/manager6/node/CmdMenu.js
> +++ b/www/manager6/node/CmdMenu.js
> @@ -56,6 +56,20 @@ Ext.define('PVE.node.CmdMenu', {
>  		});
>  	    },
>  	},
> +	{
> +	    text: gettext('Bulk Suspend'),
> +	    itemId: 'bulkstop',

wrong itemId, and the duplication with the one from Stop results in that getting
hidden. FWICT, that id isn't even needed here, so just dropping that would fix
this.

> +	    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',





More information about the pve-devel mailing list