[pve-devel] [PATCH manager] LXC: Disable resize button when volume is unusued
Oguz Bektas
o.bektas at proxmox.com
Wed Nov 27 14:30:15 CET 2019
good to go
Tested-by: Oguz Bektas <o.bektas at proxmox.com>
On Wed, Nov 27, 2019 at 01:01:48PM +0100, Fabian Ebner wrote:
> The size of an unused volume is not visible to the user and trying to resize
> an unused volume runs into a 'parameter verification failed' anyways.
>
> Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
> ---
> www/manager6/lxc/Resources.js | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/www/manager6/lxc/Resources.js b/www/manager6/lxc/Resources.js
> index dde920bf..bd85c716 100644
> --- a/www/manager6/lxc/Resources.js
> +++ b/www/manager6/lxc/Resources.js
> @@ -233,6 +233,7 @@ Ext.define('PVE.lxc.RessourceView', {
>
> var pending = rec.data['delete'] || me.hasPendingChanges(key);
> var isDisk = (rowdef.tdCls == 'pve-itype-icon-storage');
> + var isUnusedDisk = key.match(/^unused\d+/);
>
> var noedit = rec.data['delete'] || !rowdef.editor;
> if (!noedit && Proxmox.UserName !== 'root at pam' && key.match(/^mp\d+$/)) {
> @@ -244,7 +245,7 @@ Ext.define('PVE.lxc.RessourceView', {
> edit_btn.setDisabled(noedit);
>
> remove_btn.setDisabled(!isDisk || rec.data.key === 'rootfs' || !diskCap || pending);
> - resize_btn.setDisabled(!isDisk || !diskCap);
> + resize_btn.setDisabled(!isDisk || !diskCap || isUnusedDisk);
> move_btn.setDisabled(!isDisk || !diskCap);
> revert_btn.setDisabled(!pending);
>
> --
> 2.20.1
>
>
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
>
More information about the pve-devel
mailing list