X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=POLICY-SDK-APP%2Fsrc%2Fmain%2Fwebapp%2Fapp%2FpolicyApp%2Fcontroller%2FdictionaryController%2FEnforcerDictController.js;h=2c6a6703c57675f93da4281d84a99385f00c0db8;hb=a61c10945456dde51397d354379257c7d0d01fb2;hp=6481a93c8ea38a7df3cff54ea7879a65345bad4f;hpb=e0addf5b588a1244f9679becd90999dfcb4c3a94;p=policy%2Fengine.git diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryController/EnforcerDictController.js b/POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryController/EnforcerDictController.js index 6481a93c8..2c6a6703c 100644 --- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryController/EnforcerDictController.js +++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryController/EnforcerDictController.js @@ -1,8 +1,8 @@ /*- * ============LICENSE_START======================================================= - * ECOMP Policy Engine + * 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. @@ -17,7 +17,7 @@ * limitations under the License. * ============LICENSE_END========================================================= */ -var editEnforcerTypeController = function ($scope, $modalInstance, message, UserInfoServiceDS2){ +var editEnforcerTypeController = function ($scope, $modalInstance, message, UserInfoServiceDS2, Notification){ if(message.enforcerDictionaryData==null) $scope.label='Add Enforcing Type' else{ @@ -25,14 +25,14 @@ var editEnforcerTypeController = function ($scope, $modalInstance, message, Use $scope.disableCd=true; } $scope.editEnforcerType = message.enforcerDictionaryData; - - /*getting user info from session*/ - var userid = null; - UserInfoServiceDS2.getFunctionalMenuStaticDetailSession() - .then(function (response) { - userid = response.userid; - }); - + + /*getting user info from session*/ + var userid = null; + UserInfoServiceDS2.getFunctionalMenuStaticDetailSession() + .then(function (response) { + userid = response.userid; + }); + $scope.saveEnforcerType = function(enforcerDictionaryData) { var uuu = "saveDictionary/enforcer_dictionary/save_enforcerType"; var postData={enforcerDictionaryData: enforcerDictionaryData, userid: userid}; @@ -49,7 +49,7 @@ var editEnforcerTypeController = function ($scope, $modalInstance, message, Use $modalInstance.close({enforcerDictionaryDatas:$scope.enforcerDictionaryDatas}); }, error : function(data){ - alert("Error while saving."); + Notification.error("Error while saving."); } }); };