[pve-devel] [PATCH manager] use correct vmid for id when in vm replication panel

Dominik Csapak d.csapak at proxmox.com
Wed Jun 14 08:52:59 CEST 2017


values.guest is only available when the field 'guest' is not a
displayfield (e.g. when in vm replication panel), so we have to
use the given vmid first and only when this is not available, fall back
to the value of the field

Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 www/manager6/grid/Replication.js | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/www/manager6/grid/Replication.js b/www/manager6/grid/Replication.js
index 99c7ccc5..942c7263 100644
--- a/www/manager6/grid/Replication.js
+++ b/www/manager6/grid/Replication.js
@@ -67,12 +67,13 @@ Ext.define('PVE.window.ReplicaEdit', {
 
 		    if (me.isCreate) {
 			values.type = 'local';
+			var vm = vmid || values.guest;
 			var id = -1;
-			if (me.highestids[values.guest] !== undefined) {
-			    id = me.highestids[values.guest];
+			if (me.highestids[vm] !== undefined) {
+			    id = me.highestids[vm];
 			}
 			id++;
-			values.id = values.guest + '-' + id.toString();
+			values.id = vm + '-' + id.toString();
 			delete values.guest;
 		    }
 		    return values;
-- 
2.11.0





More information about the pve-devel mailing list