diff options
author | Jorge Hernandez <jorge.hernandez-herrero@att.com> | 2018-11-07 01:51:34 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2018-11-07 01:51:34 +0000 |
commit | 16f2e75067a9c738d5f7ed46fcbb0743e3e6a6bf (patch) | |
tree | c6346c2b1ce62aa46c0fafec75258091c4543e25 | |
parent | e0af9242cd2e1d37f8fa2512643cbcdb43240c5e (diff) | |
parent | 32d9ca08e62acee4239a2b02464bc332bebbaf32 (diff) |
Merge "Fix issue with rendering 'identity' key in GUI" into casablanca
4 files changed, 14 insertions, 5 deletions
diff --git a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateDcaeMicroServiceController.java b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateDcaeMicroServiceController.java index c4c822005..e7ed57add 100644 --- a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateDcaeMicroServiceController.java +++ b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateDcaeMicroServiceController.java @@ -582,7 +582,11 @@ public class CreateDcaeMicroServiceController extends RestrictedBaseController { //Get element order info String dataOrderInfo = returnModel.getDataOrderInfo(); - + if(dataOrderInfo != null && !dataOrderInfo.startsWith("\"")){ + dataOrderInfo = "\"" + dataOrderInfo + "\""; + } + LOGGER.info("dataOrderInfo : " + dataOrderInfo); + String allManyTrueKeys = ""; if(allkeys != null){ allManyTrueKeys = allkeys.toString(); diff --git a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateOptimizationController.java b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateOptimizationController.java index a45bfed57..e3ce8780b 100644 --- a/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateOptimizationController.java +++ b/POLICY-SDK-APP/src/main/java/org/onap/policy/controller/CreateOptimizationController.java @@ -234,6 +234,10 @@ public class CreateOptimizationController extends RestrictedBaseController { //Get element order info String dataOrderInfo = returnModel.getDataOrderInfo(); + if(dataOrderInfo != null && !dataOrderInfo.startsWith("\"")){ + dataOrderInfo = "\"" + dataOrderInfo + "\""; + } + String nameOfTrueKeys = ""; if(allkeys != null){ nameOfTrueKeys = allkeys.toString(); diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/DCAEMicroServicePolicyController.js b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/DCAEMicroServicePolicyController.js index d53a9198e..5a3c62e3c 100644 --- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/DCAEMicroServicePolicyController.js +++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/DCAEMicroServicePolicyController.js @@ -1381,9 +1381,10 @@ angular.module('abs').controller('dcaeMicroServiceController', ['$scope', '$wind } for (i=0; i < listemunerateValues.length; i += 1) { - if(listemunerateValues[i].includes("equal-sign")){ + if(typeof listemunerateValues[i] == "string" && listemunerateValues[i].includes("equal-sign")){ listemunerateValues[i] = listemunerateValues[i].replace('equal-sign','='); } + option = document.createElement('option'); option.setAttribute('value', listemunerateValues[i]); option.appendChild(document.createTextNode(listemunerateValues[i])); diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/OptimizationPolicyController.js b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/OptimizationPolicyController.js index cbd011f2e..cdeaefdea 100644 --- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/OptimizationPolicyController.js +++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/OptimizationPolicyController.js @@ -1159,11 +1159,11 @@ angular.module('abs').controller('optimizationController', ['$scope', '$window', listField.appendChild(optionFirst); } - for (i=0; i < listemunerateValues.length; i += 1) { - if(listemunerateValues[i].includes("equal-sign")){ + for (var i=0; i < listemunerateValues.length; i += 1) { + if(typeof listemunerateValues[i] == "string" && listemunerateValues[i].includes("equal-sign")){ listemunerateValues[i] = listemunerateValues[i].replace('equal-sign','='); } - option = document.createElement('option'); + var option = document.createElement('option'); option.setAttribute('value', listemunerateValues[i]); option.appendChild(document.createTextNode(listemunerateValues[i])); option.setAttribute('value', listemunerateValues[i]); |