diff options
Diffstat (limited to 'POLICY-SDK-APP/src')
3 files changed, 30 insertions, 20 deletions
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryController/MSHeaderDefaultValuesDictController.js b/POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryController/MSHeaderDefaultValuesDictController.js index 883ac2508..960d76bd4 100644 --- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryController/MSHeaderDefaultValuesDictController.js +++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryController/MSHeaderDefaultValuesDictController.js @@ -112,12 +112,13 @@ app.controller('editMSHeaderDefaultValuesController' , function ($scope, $modal data: JSON.stringify(postData), success : function(data){ $scope.$apply(function(){ - $scope.microServiceAttributeDictionaryDatas=data.microServiceHeaderDefaultDatas;}); + $scope.microServiceHeaderDefaultDatas=data.microServiceHeaderDefaultDatas;}); + console.log("microServiceHeaderDefaultDatas returned after saved: " + $scope.microServiceHeaderDefaultDatas); if($scope.microServiceAttributeDictionaryDatas == "Duplicate"){ Notification.error("Model Attribute Dictionary exists with Same Attribute Name.") }else{ - console.log($scope.microServiceAttributeDictionaryDatas); - $modalInstance.close({microServiceAttributeDictionaryDatas:$scope.microServiceAttributeDictionaryDatas}); + console.log($scope.microServiceHeaderDefaultDatas); + $modalInstance.close({microServiceHeaderDefaultDatas:$scope.microServiceHeaderDefaultDatas}); } }, error : function(data){ diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryGridController/MSHeaderDefaultValuesDictGridController.js b/POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryGridController/MSHeaderDefaultValuesDictGridController.js index 5a86c14d5..4e6b9696b 100644 --- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryGridController/MSHeaderDefaultValuesDictGridController.js +++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryGridController/MSHeaderDefaultValuesDictGridController.js @@ -143,7 +143,7 @@ app.controller('msHeaderDefaultValuesDictGridController', function ($scope, Poli }; $scope.deleteModelAttribute = function(data) { - modalService.popupConfirmWin("Confirm","You are about to delete the Header Default Values : "+data.name+". Do you want to continue?", + modalService.popupConfirmWin("Confirm","You are about to delete the Header Default Values : "+data.modelName+". Do you want to continue?", function(){ var uuu = "deleteDictionary/ms_dictionary/remove_headerDefaults"; var postData={data: data}; 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 = {}; |