From 57e3fff9147d5157a58ac8cdc5cebbd9e6427069 Mon Sep 17 00:00:00 2001 From: balamurugang Date: Fri, 26 Feb 2016 21:20:04 +0530 Subject: [PATCH] Shared Network was not getting selected in Port edit. The shared network was not geting selected in the dropdown of the network in Port page. When we do a edit of a port with shared network it was getting edited with the shared network not getting selected but the network was disabled. and also fixed "Port creation fails with shared network" issue Reason: The function formatCurrentFQName was modifing the value passed to the function because of that the variable in the parent function is modified. Fixed: Made a clone of the function so the the parent function values are safe and not changed. Change-Id: Id4a66b03c65a5b2b8b9cf5ed56d63bc504c45afe Closes-Bug: #1550385 --- webroot/common/ui/js/controller.utils.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/webroot/common/ui/js/controller.utils.js b/webroot/common/ui/js/controller.utils.js index 6300d9cb3..68ebad6b4 100644 --- a/webroot/common/ui/js/controller.utils.js +++ b/webroot/common/ui/js/controller.utils.js @@ -513,8 +513,9 @@ define([ // currentDomainProject as string format domain:project // if currentDomainProject is empty it will try taking utilVariable // Output will be in the format "element(domain:project)" - this.formatCurrentFQName = function(fqname, currentDomainProject){ + this.formatCurrentFQName = function(argFqname, currentDomainProject){ var domain = "", project = ""; + var fqname = _.clone(argFqname) if(currentDomainProject != null && currentDomainProject != ""){ var domainProjectArr = currentDomainProject.split(":"); if(domainProjectArr == 2) {