[pve-devel] [PATCH manager] add help buttons to migration windows

Dominik Csapak d.csapak at proxmox.com
Thu Dec 1 17:23:01 CET 2016


Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 www/manager6/window/Migrate.js    | 20 +++++++++++++++++++-
 www/manager6/window/MigrateAll.js |  8 +++++++-
 2 files changed, 26 insertions(+), 2 deletions(-)

diff --git a/www/manager6/window/Migrate.js b/www/manager6/window/Migrate.js
index 5f76589..108fd16 100644
--- a/www/manager6/window/Migrate.js
+++ b/www/manager6/window/Migrate.js
@@ -94,6 +94,24 @@ Ext.define('PVE.window.Migrate', {
 	    }
 	});
 
+	var helpBtnConfig = {};
+
+	if (me.vmtype === 'qemu') {
+	    helpBtnConfig = {
+		onlineHelp: 'qm_migration',
+		hidden: false,
+		listenToGlobalEvent: false
+	    };
+	} else if (me.vmtype === 'lxc') {
+	    helpBtnConfig = {
+		onlineHelp: 'pct_migration',
+		hidden: false,
+		listenToGlobalEvent: false
+	    };
+	}
+
+	var helpBtn = Ext.create('PVE.button.Help',helpBtnConfig);
+
 	Ext.apply(me, {
 	    title: gettext('Migrate') + ((me.vmtype === 'qemu')?' VM ':' CT ') + me.vmid,
 	    width: 350,
@@ -101,7 +119,7 @@ Ext.define('PVE.window.Migrate', {
 	    layout: 'auto',
 	    border: false,
 	    items: [ me.formPanel ],
-	    buttons: [ submitBtn ]
+	    buttons: [ helpBtn, '->', submitBtn ]
 	});
 
 	me.callParent();
diff --git a/www/manager6/window/MigrateAll.js b/www/manager6/window/MigrateAll.js
index 4f97144..919328a 100644
--- a/www/manager6/window/MigrateAll.js
+++ b/www/manager6/window/MigrateAll.js
@@ -79,6 +79,12 @@ Ext.define('PVE.window.MigrateAll', {
 	    }
 	});
 
+	var helpBtn = Ext.create('PVE.button.Help', {
+	    onlineHelp: 'pvecm_migrate_all',
+	    hidden: false,
+	    listenToGlobalEvent: false
+	});
+
 	Ext.apply(me, {
 	    title: "Migrate All VMs",
 	    width: 450,
@@ -86,7 +92,7 @@ Ext.define('PVE.window.MigrateAll', {
 	    layout: 'auto',
 	    border: false,
 	    items: [ me.formPanel ],
-	    buttons: [ submitBtn ]
+	    buttons: [ helpBtn, '->', submitBtn ]
 	});
 
 	me.callParent();
-- 
2.1.4





More information about the pve-devel mailing list