]> git.proxmox.com Git - pve-manager.git/commitdiff
adds a help button to the migration window
authorDominik Csapak <d.csapak@proxmox.com>
Fri, 2 Dec 2016 13:20:45 +0000 (14:20 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 2 Dec 2016 15:35:09 +0000 (16:35 +0100)
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.csapak@proxmox.com>
www/manager6/window/Migrate.js

index bba9b4123754160df128c172effc31a0a49bcb41..b1a03f5b0c4a057e361f90c9f08b8e52c5997b2b 100644 (file)
@@ -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();