diff options
author | 2018-02-26 18:04:46 -0500 | |
---|---|---|
committer | 2018-02-27 09:56:31 -0500 | |
commit | ccc932599675c927519040399b031ff1d10d9510 (patch) | |
tree | 83b43e211d982e2c80eee09e355844dd1b7c8145 /POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryController/MSConfigNameDictController.js | |
parent | 47c1630d48e40e1fbc051fa6eae251ffbe1d4945 (diff) |
Code Clean Up for Policy PAP-REST
Cleaned the duplicate code for all dictionary controllers and created
Utils class.
Issue-ID: POLICY-600
Change-Id: I65b8574d9f667758407515a5c55bc28f636be477
Signed-off-by: rb7147 <rb7147@att.com>
Diffstat (limited to 'POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryController/MSConfigNameDictController.js')
-rw-r--r-- | POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryController/MSConfigNameDictController.js | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryController/MSConfigNameDictController.js b/POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryController/MSConfigNameDictController.js index 1065da508..a1b703880 100644 --- a/POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryController/MSConfigNameDictController.js +++ b/POLICY-SDK-APP/src/main/webapp/app/policyApp/controller/dictionaryController/MSConfigNameDictController.js @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP Policy Engine * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017-2018 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. @@ -18,7 +18,7 @@ * ============LICENSE_END========================================================= */ app.controller('editMSConfigController' , function ($scope, $modalInstance, message, UserInfoServiceDS2, Notification){ - if(message.microServiceCongigNameDictionaryData==null) + if(message.microServiceConfigNameDictionaryData==null) $scope.label='Add Config Name' else{ $scope.label='Edit Config Name' @@ -33,15 +33,15 @@ app.controller('editMSConfigController' , function ($scope, $modalInstance, mes userid = response.userid; }); - $scope.editMSConfig = message.microServiceCongigNameDictionaryData; + $scope.editMSConfig = message.microServiceConfigNameDictionaryData; - $scope.saveMSConfig = function(microServiceCongigNameDictionaryData) { + $scope.saveMSConfig = function(microServiceConfigNameDictionaryData) { var regex = new RegExp("^[a-zA-Z0-9_]*$"); - if(!regex.test(microServiceCongigNameDictionaryData.name)) { + if(!regex.test(microServiceConfigNameDictionaryData.name)) { Notification.error("Enter Valid Config Name without spaces or special characters"); }else{ var uuu = "saveDictionary/ms_dictionary/save_configName"; - var postData={microServiceCongigNameDictionaryData: microServiceCongigNameDictionaryData, userid: userid}; + var postData={microServiceConfigNameDictionaryData: microServiceConfigNameDictionaryData, userid: userid}; $.ajax({ type : 'POST', url : uuu, @@ -50,12 +50,12 @@ app.controller('editMSConfigController' , function ($scope, $modalInstance, mes data: JSON.stringify(postData), success : function(data){ $scope.$apply(function(){ - $scope.microServiceCongigNameDictionaryDatas=data.microServiceCongigNameDictionaryDatas;}); - if($scope.microServiceCongigNameDictionaryDatas == "Duplicate"){ + $scope.microServiceConfigNameDictionaryDatas=data.microServiceConfigNameDictionaryDatas;}); + if($scope.microServiceConfigNameDictionaryDatas == "Duplicate"){ Notification.error("MS ConfigName Dictionary exists with Same Config Name.") }else{ - console.log($scope.microServiceCongigNameDictionaryDatas); - $modalInstance.close({microServiceCongigNameDictionaryDatas:$scope.microServiceCongigNameDictionaryDatas}); + console.log($scope.microServiceConfigNameDictionaryDatas); + $modalInstance.close({microServiceConfigNameDictionaryDatas:$scope.microServiceConfigNameDictionaryDatas}); } }, error : function(data){ |