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;h=028223f2812c6538035c835e70e54b4d1b4d2e35;hb=710011b4fb147bf100c52c4b0425160bba88a0fd;hp=02c31486b2ce4211cdc33a300d12e9e535f167e4;hpb=84b95a134c61217667b7eb7b7e774a485d2406ba;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 02c31486b..028223f28 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 @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP Policy Engine * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017, 2019 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,6 +24,13 @@ angular.module('abs').controller('brmsParamPolicyController', ['$scope', '$windo $scope.savebutton = true; $scope.refreshCheck = false; + if(!$scope.temp.policy.editPolicy && !$scope.temp.policy.readOnly){ + $scope.temp.policy = { + policyType : "Config", + configPolicyType : "BRMS_Param" + } + } + $scope.refresh = function(){ if($scope.refreshCheck){ $scope.policyNavigator.refresh(); @@ -230,13 +237,6 @@ angular.module('abs').controller('brmsParamPolicyController', ['$scope', '$windo }); }; - function extend(obj, src) { - for (var key in src) { - if (src.hasOwnProperty(key)) obj[key] = src[key]; - } - return obj; - } - if(!$scope.temp.policy.editPolicy && !$scope.temp.policy.readOnly){ $scope.temp.policy.attributes = []; }else{ @@ -254,4 +254,4 @@ angular.module('abs').controller('brmsParamPolicyController', ['$scope', '$windo var lastItem = $scope.temp.policy.attributes.length-1; $scope.temp.policy.attributes.splice(lastItem); }; -}]); \ No newline at end of file +}]);