for now we have to explicitely define the
    onlineHelp: 'blockid'
string, so that the parser picks it up

in the future we should refactor that window, so that we define the
blockid when declaring the component

Signed-off-by: Dominik Csapak <d.csa...@proxmox.com>
---
 www/manager6/window/Migrate.js | 23 ++++++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)

diff --git a/www/manager6/window/Migrate.js b/www/manager6/window/Migrate.js
index bba9b41..b1a03f5 100644
--- a/www/manager6/window/Migrate.js
+++ b/www/manager6/window/Migrate.js
@@ -94,6 +94,27 @@ Ext.define('PVE.window.Migrate', {
            }
        });
 
+       var helpConfig;
+       // fixme:
+       // the onlinehelp parser needs
+       // that every id is explicitely written
+       // can we do this better?
+       if (me.vmtype === 'qemu') {
+           helpConfig = {
+               onlineHelp: 'qm_migration',
+               listenToGlobalEvent: false,
+               hidden: false
+           };
+       } else {
+           helpConfig = {
+               onlineHelp: 'pct_migration',
+               listenToGlobalEvent: false,
+               hidden: false
+           };
+       }
+
+       var helpBtn = Ext.create('PVE.button.Help', helpConfig);
+
        Ext.apply(me, {
            title: gettext('Migrate') + ((me.vmtype === 'qemu')?' VM ':' CT ') 
+ me.vmid,
            width: 350,
@@ -101,7 +122,7 @@ Ext.define('PVE.window.Migrate', {
            layout: 'auto',
            border: false,
            items: [ me.formPanel ],
-           buttons: [ submitBtn ]
+           buttons: [ helpBtn, '->', submitBtn ]
        });
 
        me.callParent();
-- 
2.1.4


_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
http://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to