[pve-devel] [PATCH manager] lxc: disable remove button for pending resource changes

Oguz Bektas o.bektas at proxmox.com
Tue Nov 26 16:37:07 CET 2019


for a pending change, it's 'revert's job to do this. pressing remove
doesn't do anything and it might be confusing for users.

Signed-off-by: Oguz Bektas <o.bektas at proxmox.com>
---
 www/manager6/lxc/Resources.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/www/manager6/lxc/Resources.js b/www/manager6/lxc/Resources.js
index 1114c051..dde920bf 100644
--- a/www/manager6/lxc/Resources.js
+++ b/www/manager6/lxc/Resources.js
@@ -243,7 +243,7 @@ Ext.define('PVE.lxc.RessourceView', {
 	    }
 	    edit_btn.setDisabled(noedit);
 
-	    remove_btn.setDisabled(!isDisk || rec.data.key === 'rootfs' || !diskCap);
+	    remove_btn.setDisabled(!isDisk || rec.data.key === 'rootfs' || !diskCap || pending);
 	    resize_btn.setDisabled(!isDisk || !diskCap);
 	    move_btn.setDisabled(!isDisk || !diskCap);
 	    revert_btn.setDisabled(!pending);
-- 
2.20.1




More information about the pve-devel mailing list