]> git.proxmox.com Git - pve-manager.git/commitdiff
fix pending changes with boot order
authorDominik Csapak <d.csapak@proxmox.com>
Tue, 26 Apr 2016 12:41:57 +0000 (14:41 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Tue, 3 May 2016 04:44:02 +0000 (06:44 +0200)
this patch checks if only the bootdisk changed,
using the multikey funcionality

also use this in the revert button handler,
to revert the bootdisk also

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
www/manager6/qemu/Options.js

index 9585fe78ce7ecd9f13c8d91cbaddbe4e03d3d724..6918949ea79611d3e082f1965ecd129a9308c402 100644 (file)
@@ -74,6 +74,7 @@ Ext.define('PVE.qemu.Options', {
                header: gettext('Boot order'),
                defaultValue: 'cdn',
                editor: caps.vms['VM.Config.Disk'] ? 'PVE.qemu.BootOrderEdit' : undefined,
+               multiKey: ['boot', 'bootdisk'],
                renderer: function(order, metaData, record, rowIndex, colIndex, store, pending) {
                    var i;
                    var text = '';
@@ -336,12 +337,16 @@ Ext.define('PVE.qemu.Options', {
                    return;
                }
 
+               var rowdef = me.rows[rec.data.key] || {};
+               var keys = rowdef.multiKey ||  [ rec.data.key ];
+               var revert = keys.join(',');
+
                 PVE.Utils.API2Request({
                     url: '/api2/extjs/' + baseurl,
                     waitMsgTarget: me,
                     method: 'PUT',
                     params: {
-                        'revert': rec.data.key
+                        'revert': revert
                     },
                     callback: function() {
                         reload();