X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=POLICY-SDK-APP%2Fsrc%2Fmain%2Fwebapp%2Fapp%2FpolicyApp%2Fpolicy-models%2FEditor%2FPolicyTemplateController%2FBRMSParamPolicyController.js;fp=POLICY-SDK-APP%2Fsrc%2Fmain%2Fwebapp%2Fapp%2FpolicyApp%2Fpolicy-models%2FEditor%2FPolicyTemplateController%2FBRMSParamPolicyController.js;h=323a9bfa0a7e1b8938e9e9a9603aed44a1dc84f2;hb=87c95be02a8a4d77e165dede90777e811b59dcae;hp=b376857393bf5e9ce26f70219e43332ea79ed2a8;hpb=7e547eaa55920dfbc9691eab33bb728395b50cf2;p=policy%2Fengine.git diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/BRMSParamPolicyController.js b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/BRMSParamPolicyController.js index b37685739..323a9bfa0 100644 --- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/BRMSParamPolicyController.js +++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/BRMSParamPolicyController.js @@ -29,6 +29,7 @@ angular.module('abs').controller('brmsParamPolicyController', ['$scope', '$windo $scope.policyNavigator.refresh(); } $scope.modal('createNewPolicy', true); + $scope.temp.policy = ""; }; $scope.modal = function(id, hide) { @@ -106,6 +107,8 @@ angular.module('abs').controller('brmsParamPolicyController', ['$scope', '$windo } }; + $scope.showbrmsrule = true; + $scope.ShowRule = function(policy){ console.log(policy); var uuu = "policyController/ViewBRMSParamPolicyRule.htm"; @@ -117,21 +120,10 @@ angular.module('abs').controller('brmsParamPolicyController', ['$scope', '$windo contentType: 'application/json', data: JSON.stringify(postData), success : function(data){ + $scope.showbrmsrule = false; + $scope.validateSuccess = true; $scope.$apply(function(){ $scope.datarule = data.policyData; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'app/policyApp/policy-models/Editor/PolicyTemplates/BRMSShowParamRuleModal.html', - controller: 'showrulecontroller', - resolve: { - message: function () { - var message = { - datas: $scope.datarule - }; - return message; - } - } - }); }); }, error : function(data){ @@ -140,6 +132,12 @@ angular.module('abs').controller('brmsParamPolicyController', ['$scope', '$windo }); }; + $scope.hideRule = function(){ + $scope.showbrmsrule = true; + $scope.validateSuccess = false; + $scope.apply(); + }; + $scope.saveBrmsParamPolicy = function(policy){ if(policy.itemContent != undefined){ $scope.refreshCheck = true; @@ -247,15 +245,4 @@ angular.module('abs').controller('brmsParamPolicyController', ['$scope', '$windo var lastItem = $scope.temp.policy.attributes.length-1; $scope.temp.policy.attributes.splice(lastItem); }; -}]); - -app.controller('showrulecontroller' , function ($scope, $modalInstance, message){ - if(message.datas!=null){ - $scope.datarule=message.datas; - } - - $scope.close = function() { - $modalInstance.close(); - }; - -}); \ No newline at end of file +}]); \ No newline at end of file