[pve-devel] [PATCH manager] fix pending changes with boot order

Dominik Csapak d.csapak at proxmox.com
Tue Apr 26 14:41:57 CEST 2016


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 at proxmox.com>
---
 www/manager6/qemu/Options.js | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/www/manager6/qemu/Options.js b/www/manager6/qemu/Options.js
index 9585fe7..6918949 100644
--- a/www/manager6/qemu/Options.js
+++ b/www/manager6/qemu/Options.js
@@ -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();
-- 
2.1.4





More information about the pve-devel mailing list