diff options
author | Wang,Frank(gw1218) <gw1218@att.com> | 2018-04-12 11:59:00 -0500 |
---|---|---|
committer | Wang,Frank(gw1218) <gw1218@att.com> | 2018-04-12 11:59:16 -0500 |
commit | 36e8f5e2c625cd76f183757942db9a80a30251ab (patch) | |
tree | 1e47f85b6c58b8af338d4510b7b9614d4b6281ad /POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models | |
parent | da09b036ff8f3c927e552e33e1476be4ba488efa (diff) |
Fix Wrong Data Names
Fix wrong data names due to reponse changes
Issue-ID: POLICY-740
Change-Id: I28db745f88ccecd67f3daa30adf70cc69645b496
Signed-off-by: Wang,Frank(gw1218) <gw1218@att.com>
Diffstat (limited to 'POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models')
-rw-r--r-- | POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/DCAEMicroServicePolicyController.js | 41 |
1 files changed, 25 insertions, 16 deletions
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 1b4337033..2105ab213 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 @@ -748,23 +748,32 @@ angular.module('abs').controller('dcaeMicroServiceController', ['$scope', '$wind var subAttributes = $scope.dcaeModelData.sub_attributes; - if(subAttributes){ - var jsonObject = JSON.parse(subAttributes); - var allkeys = Object.keys(jsonObject); - if(allkeys){ - for (var k = 0; k < allkeys.length; k++) { - var keyValue = allkeys[k]; - console.log(" keyValue:jsonObject["+keyValue+ "]: " + jsonObject[keyValue]); - if(jsonObject[keyValue]){ - var tempObject = jsonObject[keyValue]; - if(tempObject && tempObject[key]){ - if (tempObject[key].includes('required-true')){ + if(subAttributes){ + var jsonObject = JSON.parse(subAttributes); + + var lablInfo = findVal(jsonObject, attributekey); + console.log("deconstructJSON:findValue : " + attributekey +": "+ lablInfo); + if (lablInfo){ + if(lablInfo.includes('required-true')){ + isRequired = true; + } + }else{ + var allkeys = Object.keys(jsonObject); + if(allkeys){ + for (var k = 0; k < allkeys.length; k++) { + var keyValue = allkeys[k]; + console.log(" keyValue:jsonObject["+keyValue+ "]: " + jsonObject[keyValue]); + if(jsonObject[keyValue]){ + var tempObject = jsonObject[keyValue]; + if(tempObject && tempObject[key]){ + if (tempObject[key].includes('required-true')){ isRequired = true; - } - } - } - } - } + } + } + } + } + } + } } var elementObject = {}; |