[pve-devel] [PATCH manager 7/8] ui: lxc: remove obsolete unmount button

Thomas Lamprecht t.lamprecht at proxmox.com
Tue Oct 17 11:48:05 CEST 2017


This button was hidden by default and was intended to show up when a
CT is mounted only.

The check if mounted, was done for OpenVZ and may not become true
currently also we only have CLI helpers for mount/unmount but no API
– so just remove it.

Signed-off-by: Thomas Lamprecht <t.lamprecht at proxmox.com>
---

new patch

 www/manager6/lxc/Config.js | 22 +---------------------
 1 file changed, 1 insertion(+), 21 deletions(-)

diff --git a/www/manager6/lxc/Config.js b/www/manager6/lxc/Config.js
index d5a6ff7c..3a8783a9 100644
--- a/www/manager6/lxc/Config.js
+++ b/www/manager6/lxc/Config.js
@@ -50,15 +50,6 @@ Ext.define('PVE.lxc.Config', {
 	    iconCls: 'fa fa-play'
 	});
 
-	var umountBtn = Ext.create('Ext.Button', {
-	    text: gettext('Unmount'),
-	    disabled: true,
-	    hidden: true,
-	    handler: function() {
-		vm_command('umount');
-	    }
-	});
-
 	var stopBtn = Ext.create('Ext.menu.Item',{
 	    text: gettext('Stop'),
 	    disabled: !caps.vms['VM.PowerMgmt'],
@@ -124,8 +115,7 @@ Ext.define('PVE.lxc.Config', {
 	Ext.apply(me, {
 	    title: Ext.String.format(gettext("Container {0} on node '{1}'"), vm.text, nodename),
 	    hstateid: 'lxctab',
-	    tbar: [ startBtn, shutdownBtn, umountBtn, removeBtn,
-		    migrateBtn, consoleBtn ],
+	    tbar: [ startBtn, shutdownBtn, removeBtn, migrateBtn, consoleBtn ],
 	    defaults: { statusStore: me.statusStore },
 	    items: [
 		{
@@ -285,16 +275,6 @@ Ext.define('PVE.lxc.Config', {
 	    stopBtn.setDisabled(!caps.vms['VM.PowerMgmt'] || status === 'stopped');
 	    removeBtn.setDisabled(!caps.vms['VM.Allocate'] || status !== 'stopped');
 	    consoleBtn.setDisabled(template);
-
-	    if (status === 'mounted') {
-		umountBtn.setDisabled(false);
-		umountBtn.setVisible(true);
-		stopBtn.setDisabled(true);
-	    } else {
-		umountBtn.setDisabled(true);
-		umountBtn.setVisible(false);
-		stopBtn.setDisabled(false);
-	    }
 	});
 
 	me.on('afterrender', function() {
-- 
2.11.0





More information about the pve-devel mailing list