From e0addf5b588a1244f9679becd90999dfcb4c3a94 Mon Sep 17 00:00:00 2001 From: "ITSERVICES\\rb7147" Date: Tue, 25 Apr 2017 11:46:00 -0400 Subject: Policy 1707 commit to LF Change-Id: Ibe6f01d92f9a434c040abb05d5386e89d675ae65 Signed-off-by: ITSERVICES\rb7147 --- .../BRMSParamDictGridController.js | 127 -------------- .../CLPepOptionsDictGridController.js | 183 -------------------- .../CLServiceDictGridController.js | 161 ------------------ .../CLSiteDictGridController.js | 161 ------------------ .../CLVarbindDictGridController.js | 184 --------------------- .../CLVnfTypeDictGridController.js | 181 -------------------- .../CLVsclActionDictGridController.js | 183 -------------------- .../DecisionSettingsDictGridController.js | 151 ----------------- .../DescriptiveScopeDictGridController.js | 150 ----------------- .../EnforcerTypeDictGridController.js | 126 -------------- .../FWActionListDictGridController.js | 145 ---------------- .../FWAddressGroupDictGridController.js | 146 ---------------- .../FWParentListDictGridController.js | 149 ----------------- .../FWPortListDictGridController.js | 132 --------------- .../FWPrefixListDictGridController.js | 148 ----------------- .../FWProtocolListDictGridController.js | 157 ------------------ .../FWSecurityZoneDictGridController.js | 147 ---------------- .../FWServiceGroupDictGridController.js | 147 ---------------- .../FWServiceListDictGridController.js | 162 ------------------ .../FWTermListDictGridController.js | 159 ------------------ .../FWZoneDictGridController.js | 148 ----------------- .../MSConfigNameDictGridController.js | 124 -------------- .../MSDcaeUUIDDictGridController.js | 124 -------------- .../MSLocationDictGridController.js | 124 -------------- .../MSModelDictGridController.js | 124 -------------- .../PSClosedLoopDictGridController.js | 123 -------------- .../PSGroupPolicyScopeDictGridController.js | 127 -------------- .../PSResourceDictGridController.js | 123 -------------- .../PSServiceDictGridController.js | 122 -------------- .../PSTypeDictGridController.js | 122 -------------- .../RiskTypeDictGridController.js | 152 ----------------- .../SafePolicyWarningDictGridController.js | 127 -------------- .../actionPolicyDictGridController.js | 161 ------------------ .../attributeDictGridController.js | 159 ------------------ .../ecompNameDictGridController.js | 152 ----------------- 35 files changed, 5111 deletions(-) delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/BRMSParamDictGridController.js delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/CLPepOptionsDictGridController.js delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/CLServiceDictGridController.js delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/CLSiteDictGridController.js delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/CLVarbindDictGridController.js delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/CLVnfTypeDictGridController.js delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/CLVsclActionDictGridController.js delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/DecisionSettingsDictGridController.js delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/DescriptiveScopeDictGridController.js delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/EnforcerTypeDictGridController.js delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/FWActionListDictGridController.js delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/FWAddressGroupDictGridController.js delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/FWParentListDictGridController.js delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/FWPortListDictGridController.js delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/FWPrefixListDictGridController.js delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/FWProtocolListDictGridController.js delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/FWSecurityZoneDictGridController.js delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/FWServiceGroupDictGridController.js delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/FWServiceListDictGridController.js delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/FWTermListDictGridController.js delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/FWZoneDictGridController.js delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/MSConfigNameDictGridController.js delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/MSDcaeUUIDDictGridController.js delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/MSLocationDictGridController.js delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/MSModelDictGridController.js delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/PSClosedLoopDictGridController.js delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/PSGroupPolicyScopeDictGridController.js delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/PSResourceDictGridController.js delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/PSServiceDictGridController.js delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/PSTypeDictGridController.js delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/RiskTypeDictGridController.js delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/SafePolicyWarningDictGridController.js delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/actionPolicyDictGridController.js delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/attributeDictGridController.js delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/ecompNameDictGridController.js (limited to 'ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController') diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/BRMSParamDictGridController.js b/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/BRMSParamDictGridController.js deleted file mode 100644 index 642fca248..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/BRMSParamDictGridController.js +++ /dev/null @@ -1,127 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ECOMP Policy Engine - * ================================================================================ - * Copyright (C) 2017 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -/** - */ -app.controller('brmsParamDictGridController', function ($scope, DictionaryService,modalService, $modal, PapUrlService){ - $( "#dialog" ).hide(); - - var papUrl; - PapUrlService.getPapUrl().then(function(data) { - var config = data; - papUrl = config.PAP_URL; - console.log(papUrl); - - DictionaryService.getBRMSParamDictionaryData(papUrl).then(function (data) { - var j = data; - $scope.data = JSON.parse(j.data); - console.log($scope.data); - $scope.brmsParamDictionaryDatas = JSON.parse($scope.data.brmsParamDictionaryDatas); - console.log($scope.brmsParamDictionaryDatas); - }, function (error) { - console.log("failed"); - }); - - }); - - $scope.brmsParamDictionaryGrid = { - data : 'brmsParamDictionaryDatas', - enableFiltering: true, - exporterCsvFilename: 'BRMSParamDictionary.csv', - enableGridMenu: true, - enableSelectAll: true, - columnDefs: [{ - field: 'id', enableFiltering: false, headerCellTemplate: '' + - '', - cellTemplate: - ' ', width: '8%' - }, - { field: 'ruleName', displayName : 'Rule Name'}, - { field: 'description'}, - {field: 'userCreatedBy.userName', displayName : 'Created By'}, - {field: 'createdDate',type: 'date', cellFilter: 'date:\'yyyy-MM-dd\'' } - ], - exporterPdfDefaultStyle: {fontSize: 9}, - exporterPdfTableStyle: {margin: [30, 30, 30, 30]}, - exporterPdfTableHeaderStyle: {fontSize: 10, bold: true, italics: true, color: 'red'}, - exporterPdfHeader: { text: "My Header", style: 'headerStyle' }, - exporterPdfFooter: function ( currentPage, pageCount ) { - return { text: currentPage.toString() + ' of ' + pageCount.toString(), style: 'footerStyle' }; - }, - exporterPdfCustomFormatter: function ( docDefinition ) { - docDefinition.styles.headerStyle = { fontSize: 22, bold: true }; - docDefinition.styles.footerStyle = { fontSize: 10, bold: true }; - return docDefinition; - }, - exporterPdfOrientation: 'portrait', - exporterPdfPageSize: 'LETTER', - exporterPdfMaxGridWidth: 500, - exporterCsvLinkElement: angular.element(document.querySelectorAll(".custom-csv-link-location")), - onRegisterApi: function(gridApi){ - $scope.gridApi = gridApi; - } - }; - - $scope.editBRMSParam = null; - $scope.createNewBRMSParamWindow = function(){ - $scope.editBRMSParam = null; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'add_brmsParam_popup.html', - controller: 'editBRMSParamController', - resolve: { - message: function () { - var message = { - brmsParamDictionaryDatas: $scope.editBRMSParam - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.brmsParamDictionaryDatas=response.brmsParamDictionaryDatas; - }); - }; - - $scope.deleteBRMSParam = function(data) { - modalService.popupConfirmWin("Confirm","You are about to delete the BRMS Param Name "+data.ruleName+". \n Do you want to continue?", - function(){ - var uuu = papUrl + "/ecomp/brms_dictionary/remove_brmsParam.htm"; - var postData={data: data}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){$scope.brmsParamDictionaryDatas=data.brmsParamDictionaryDatas;}); - }, - error : function(data){ - console.log(data); - modalService.showFailure("Fail","Error while deleting: "+ data.responseText); - } - }); - - }) - }; - -}); \ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/CLPepOptionsDictGridController.js b/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/CLPepOptionsDictGridController.js deleted file mode 100644 index 5600ed16b..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/CLPepOptionsDictGridController.js +++ /dev/null @@ -1,183 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ECOMP Policy Engine - * ================================================================================ - * Copyright (C) 2017 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -/** - */ -app.controller('pepOptionsDictGridController', function ($scope, PapUrlService, CLDictionaryService,modalService, $modal){ - $( "#dialog" ).hide(); - - var papUrl; - PapUrlService.getPapUrl().then(function(data) { - var config = data; - papUrl = config.PAP_URL; - console.log(papUrl); - - CLDictionaryService.getPepOptionsDictionaryData(papUrl).then(function (data) { - var j = data; - $scope.data = JSON.parse(j.data); - console.log($scope.data); - $scope.pepOptionsDictionaryDatas = JSON.parse($scope.data.pepOptionsDictionaryDatas); - console.log($scope.pepOptionsDictionaryDatas); - }, function (error) { - console.log("failed"); - }); - - }); - - $scope.pepOptionsDictionaryGrid = { - data : 'pepOptionsDictionaryDatas', - enableFiltering: true, - exporterCsvFilename: 'PEPOptions.csv', - enableGridMenu: true, - enableSelectAll: true, - columnDefs: [{ - field: 'id', enableFiltering: false, headerCellTemplate: '' + - '', - cellTemplate: - ' ' + - ' ', width: '8%' - }, - { field: 'pepName', displayName : 'PEP Name'}, - { field: 'actions', displayName : 'Actions'}, - { field: 'description'}, - {field: 'userCreatedBy.userName', displayName : 'Created By'}, - {field: 'userModifiedBy.userName', displayName : 'Modified By'}, - {field: 'createdDate',type: 'date', cellFilter: 'date:\'yyyy-MM-dd\'' }, - {field: 'modifiedDate',type: 'date', cellFilter: 'date:\'yyyy-MM-dd\'' } - ], - exporterPdfDefaultStyle: {fontSize: 9}, - exporterPdfTableStyle: {margin: [30, 30, 30, 30]}, - exporterPdfTableHeaderStyle: {fontSize: 10, bold: true, italics: true, color: 'red'}, - exporterPdfHeader: { text: "My Header", style: 'headerStyle' }, - exporterPdfFooter: function ( currentPage, pageCount ) { - return { text: currentPage.toString() + ' of ' + pageCount.toString(), style: 'footerStyle' }; - }, - exporterPdfCustomFormatter: function ( docDefinition ) { - docDefinition.styles.headerStyle = { fontSize: 22, bold: true }; - docDefinition.styles.footerStyle = { fontSize: 10, bold: true }; - return docDefinition; - }, - exporterPdfOrientation: 'portrait', - exporterPdfPageSize: 'LETTER', - exporterPdfMaxGridWidth: 500, - exporterCsvLinkElement: angular.element(document.querySelectorAll(".custom-csv-link-location")), - onRegisterApi: function(gridApi){ - $scope.gridApi = gridApi; - } - }; - - $scope.editPEPOptions = null; - $scope.createNewPEPOptionsWindow = function(){ - $scope.editEcompName = null; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'add_PEPOptions_popup.html', - controller: 'editPEPOptionsController', - resolve: { - message: function () { - var message = { - pepOptionsDictionaryDatas: $scope.editPEPOptions - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.pepOptionsDictionaryDatas=response.pepOptionsDictionaryDatas; - }); - }; - - $scope.editPEPOptionsWindow = function(pepOptionsDictionaryData) { - $scope.editPEPOptions = pepOptionsDictionaryData; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'add_PEPOptions_popup.html', - controller: 'editPEPOptionsController', - resolve: { - message: function () { - var message = { - pepOptionsDictionaryData: $scope.editPEPOptions - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.pepOptionsDictionaryDatas = response.pepOptionsDictionaryDatas; - }); - }; - - $scope.deletePEPOptions = function(data) { - var uuu = "searchDictionary.htm"; - var postData={data: data, type: "pepOptions"}; - var searchString = "\n"; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(resultList){ - $scope.$apply(function(){ - $scope.list =resultList.result;}); - $scope.searchData = JSON.stringify(resultList.result); - $scope.searchDatas = JSON.parse($scope.searchData); - $scope.success = true; - var i; - if($scope.searchDatas.length > 0){ - for(i = 0 ; i < $scope.searchDatas.length; i++){ - searchString += $scope.searchDatas[i].name + "\n"; - } - }else{ - searchString += "No Policies is Using this Value" - } - - console.log($scope.list); - if($scope.success){ - modalService.popupConfirmWin("Confirm","You are about to delete the PEP Options : "+data.pepName+". \n "+searchString+" \n Do you want to continue?", - function(){ - var uuu = papUrl + "/ecomp/cl_dictionary/remove_pepOptions.htm"; - var postData={data: data}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){$scope.pepOptionsDictionaryDatas=data.pepOptionsDictionaryDatas;}); - }, - error : function(data){ - console.log(data); - modalService.showFailure("Fail","Error while deleting: "+ data.responseText); - } - }); - - })} - }, - error : function(data){ - alert("Error while Searching."); - } - }); - }; - -}); \ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/CLServiceDictGridController.js b/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/CLServiceDictGridController.js deleted file mode 100644 index 8f5893da9..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/CLServiceDictGridController.js +++ /dev/null @@ -1,161 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ECOMP Policy Engine - * ================================================================================ - * Copyright (C) 2017 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -/** - */ -app.controller('serviceDictGridController', function ($scope, PapUrlService, CLDictionaryService,modalService, $modal){ - $( "#dialog" ).hide(); - - var papUrl; - PapUrlService.getPapUrl().then(function(data) { - var config = data; - papUrl = config.PAP_URL; - console.log(papUrl); - - CLDictionaryService.getServiceDictionaryData(papUrl).then(function (data) { - var j = data; - $scope.data = JSON.parse(j.data); - console.log($scope.data); - $scope.closedLoopServiceDictionaryDatas = JSON.parse($scope.data.closedLoopServiceDictionaryDatas); - console.log($scope.closedLoopServiceDictionaryDatas); - }, function (error) { - console.log("failed"); - }); - - }); - - $scope.serviceDictionaryGrid = { - data : 'closedLoopServiceDictionaryDatas', - enableFiltering: true, - columnDefs: [{ - field: 'id', enableFiltering: false, headerCellTemplate: '' + - '', - cellTemplate: - ' ' + - ' ', width: '8%' - }, - { field: 'serviceName', displayName : 'Service Name'}, - { field: 'description'}, - {field: 'userCreatedBy.userName', displayName : 'Created By'}, - {field: 'userModifiedBy.userName', displayName : 'Modified By'}, - {field: 'createdDate',type: 'date', cellFilter: 'date:\'yyyy-MM-dd\'' }, - {field: 'modifiedDate',type: 'date', cellFilter: 'date:\'yyyy-MM-dd\'' } - ] - }; - - $scope.editCLService = null; - $scope.createNewServiceDictWindow = function(){ - $scope.editCLService = null; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'add_CLService_popup.html', - controller: 'editCLServiceController', - resolve: { - message: function () { - var message = { - closedLoopServiceDictionaryDatas: $scope.editCLService - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.closedLoopServiceDictionaryDatas=response.closedLoopServiceDictionaryDatas; - }); - }; - - $scope.editServiceDictWindow = function(closedLoopServiceDictionaryData) { - $scope.editCLService = closedLoopServiceDictionaryData; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'add_CLService_popup.html', - controller: 'editCLServiceController', - resolve: { - message: function () { - var message = { - closedLoopServiceDictionaryData: $scope.editCLService - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.closedLoopServiceDictionaryDatas = response.closedLoopServiceDictionaryDatas; - }); - }; - - $scope.deleteServiceDict = function(data) { - var uuu = "searchDictionary.htm"; - var postData={data: data, type: "clService"}; - var searchString = "\n"; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(resultList){ - $scope.$apply(function(){ - $scope.list =resultList.result;}); - $scope.searchData = JSON.stringify(resultList.result); - $scope.searchDatas = JSON.parse($scope.searchData); - $scope.success = true; - var i; - if($scope.searchDatas.length > 0){ - for(i = 0 ; i < $scope.searchDatas.length; i++){ - searchString += $scope.searchDatas[i].name + "\n"; - } - }else{ - searchString += "No Policies is Using this Value" - } - - console.log($scope.list); - if($scope.success){ - modalService.popupConfirmWin("Confirm","You are about to delete the Service Dictionary "+data.serviceName+". \n "+searchString+" \n Do you want to continue?", - function(){ - var uuu = papUrl + "/ecomp/cl_dictionary/remove_Service.htm"; - var postData={data: data}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){$scope.closedLoopServiceDictionaryDatas=data.closedLoopServiceDictionaryDatas;}); - }, - error : function(data){ - console.log(data); - modalService.showFailure("Fail","Error while deleting: "+ data.responseText); - } - }); - - })} - }, - error : function(data){ - alert("Error while Searching."); - } - }); - }; - - -}); \ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/CLSiteDictGridController.js b/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/CLSiteDictGridController.js deleted file mode 100644 index 0a0e72a7f..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/CLSiteDictGridController.js +++ /dev/null @@ -1,161 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ECOMP Policy Engine - * ================================================================================ - * Copyright (C) 2017 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -/** - */ -app.controller('siteDictGridController', function ($scope, PapUrlService, CLDictionaryService,modalService, $modal){ - $( "#dialog" ).hide(); - - var papUrl; - PapUrlService.getPapUrl().then(function(data) { - var config = data; - papUrl = config.PAP_URL; - console.log(papUrl); - - CLDictionaryService.getSiteDictionaryData(papUrl).then(function (data) { - var j = data; - $scope.data = JSON.parse(j.data); - console.log($scope.data); - $scope.closedLoopSiteDictionaryDatas = JSON.parse($scope.data.closedLoopSiteDictionaryDatas); - console.log($scope.closedLoopSiteDictionaryDatas); - }, function (error) { - console.log("failed"); - }); - - }); - - $scope.siteDictionaryGrid = { - data : 'closedLoopSiteDictionaryDatas', - enableFiltering: true, - columnDefs: [{ - field: 'id', enableFiltering: false, headerCellTemplate: '' + - '', - cellTemplate: - ' ' + - ' ', width: '8%' - }, - { field: 'siteName', displayName : 'Site Name'}, - { field: 'description'}, - {field: 'userCreatedBy.userName', displayName : 'Created By'}, - {field: 'userModifiedBy.userName', displayName : 'Modified By'}, - {field: 'createdDate',type: 'date', cellFilter: 'date:\'yyyy-MM-dd\'' }, - {field: 'modifiedDate',type: 'date', cellFilter: 'date:\'yyyy-MM-dd\'' } - ] - }; - - $scope.editCLSite = null; - $scope.createNewSiteDictWindow = function(){ - $scope.editCLSite = null; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'add_CLSite_popup.html', - controller: 'editCLSiteController', - resolve: { - message: function () { - var message = { - closedLoopSiteDictionaryDatas: $scope.editCLSite - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.closedLoopSiteDictionaryDatas=response.closedLoopSiteDictionaryDatas; - }); - }; - - $scope.editSiteDictWindow = function(closedLoopSiteDictionaryData) { - $scope.editCLSite = closedLoopSiteDictionaryData; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'add_CLSite_popup.html', - controller: 'editCLSiteController', - resolve: { - message: function () { - var message = { - closedLoopSiteDictionaryData: $scope.editCLSite - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.closedLoopSiteDictionaryDatas = response.closedLoopSiteDictionaryDatas; - }); - }; - - $scope.deleteSiteDict = function(data) { - var uuu = "searchDictionary.htm"; - var postData={data: data, type: "clSite"}; - var searchString = "\n"; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(resultList){ - $scope.$apply(function(){ - $scope.list =resultList.result;}); - $scope.searchData = JSON.stringify(resultList.result); - $scope.searchDatas = JSON.parse($scope.searchData); - $scope.success = true; - var i; - if($scope.searchDatas.length > 0){ - for(i = 0 ; i < $scope.searchDatas.length; i++){ - searchString += $scope.searchDatas[i].name + "\n"; - } - }else{ - searchString += "No Policies is Using this Value" - } - - console.log($scope.list); - if($scope.success){ - modalService.popupConfirmWin("Confirm","You are about to delete the Site Dictionary : "+data.siteName+". \n "+searchString+" \n Do you want to continue?", - function(){ - var uuu = papUrl + "/ecomp/cl_dictionary/remove_site.htm"; - var postData={data: data}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){$scope.closedLoopSiteDictionaryDatas=data.closedLoopSiteDictionaryDatas;}); - }, - error : function(data){ - console.log(data); - modalService.showFailure("Fail","Error while deleting: "+ data.responseText); - } - }); - - })} - }, - error : function(data){ - alert("Error while Searching."); - } - }); - }; - - -}); \ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/CLVarbindDictGridController.js b/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/CLVarbindDictGridController.js deleted file mode 100644 index 87ccac953..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/CLVarbindDictGridController.js +++ /dev/null @@ -1,184 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ECOMP Policy Engine - * ================================================================================ - * Copyright (C) 2017 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -/** - */ -app.controller('varbindDictGridController', function ($scope, PapUrlService, CLDictionaryService,modalService, $modal){ - $( "#dialog" ).hide(); - - var papUrl; - PapUrlService.getPapUrl().then(function(data) { - var config = data; - papUrl = config.PAP_URL; - console.log(papUrl); - - CLDictionaryService.getVarbindDictionaryData(papUrl).then(function (data) { - var j = data; - $scope.data = JSON.parse(j.data); - console.log($scope.data); - $scope.varbindDictionaryDatas = JSON.parse($scope.data.varbindDictionaryDatas); - console.log($scope.varbindDictionaryDatas); - }, function (error) { - console.log("failed"); - }); - - }); - - $scope.varbindDictionaryGrid = { - data : 'varbindDictionaryDatas', - enableFiltering: true, - exporterCsvFilename: 'VarbindDictionary.csv', - enableGridMenu: true, - enableSelectAll: true, - columnDefs: [{ - field: 'id', enableFiltering: false, headerCellTemplate: '' + - '', - cellTemplate: - ' ' + - ' ', width: '8%' - }, - { field: 'varbindName', displayName : 'Varbind Name'}, - { field: 'varbindDescription', displayName : 'Varbind Description'}, - { field: 'varbindOID', displayName : 'Varbind OID'}, - {field: 'userCreatedBy.userName', displayName : 'Created By'}, - {field: 'userModifiedBy.userName', displayName : 'Modified By'}, - {field: 'createdDate',type: 'date', cellFilter: 'date:\'yyyy-MM-dd\'' }, - {field: 'modifiedDate',type: 'date', cellFilter: 'date:\'yyyy-MM-dd\'' } - ], - exporterPdfDefaultStyle: {fontSize: 9}, - exporterPdfTableStyle: {margin: [30, 30, 30, 30]}, - exporterPdfTableHeaderStyle: {fontSize: 10, bold: true, italics: true, color: 'red'}, - exporterPdfHeader: { text: "My Header", style: 'headerStyle' }, - exporterPdfFooter: function ( currentPage, pageCount ) { - return { text: currentPage.toString() + ' of ' + pageCount.toString(), style: 'footerStyle' }; - }, - exporterPdfCustomFormatter: function ( docDefinition ) { - docDefinition.styles.headerStyle = { fontSize: 22, bold: true }; - docDefinition.styles.footerStyle = { fontSize: 10, bold: true }; - return docDefinition; - }, - exporterPdfOrientation: 'portrait', - exporterPdfPageSize: 'LETTER', - exporterPdfMaxGridWidth: 500, - exporterCsvLinkElement: angular.element(document.querySelectorAll(".custom-csv-link-location")), - onRegisterApi: function(gridApi){ - $scope.gridApi = gridApi; - } - }; - - $scope.editCLVarbind = null; - $scope.createNewVarbindDictWindow = function(){ - $scope.editCLVarbind = null; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'add_varbind_popup.html', - controller: 'editCLVarbindController', - resolve: { - message: function () { - var message = { - varbindDictionaryDatas: $scope.editCLVarbind - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.varbindDictionaryDatas=response.varbindDictionaryDatas; - }); - }; - - $scope.editVarbindDictWindow = function(varbindDictionaryData) { - $scope.editCLVarbind = varbindDictionaryData; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'add_varbind_popup.html', - controller: 'editCLVarbindController', - resolve: { - message: function () { - var message = { - varbindDictionaryData: $scope.editCLVarbind - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.varbindDictionaryDatas = response.varbindDictionaryDatas; - }); - }; - - $scope.deleteVarbindDictionary = function(data) { - var uuu = "searchDictionary.htm"; - var postData={data: data, type: "clVarbind"}; - var searchString = "\n"; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(resultList){ - $scope.$apply(function(){ - $scope.list =resultList.result;}); - $scope.searchData = JSON.stringify(resultList.result); - $scope.searchDatas = JSON.parse($scope.searchData); - $scope.success = true; - var i; - if($scope.searchDatas.length > 0){ - for(i = 0 ; i < $scope.searchDatas.length; i++){ - searchString += $scope.searchDatas[i].name + "\n"; - } - }else{ - searchString += "No Policies is Using this Value" - } - - console.log($scope.list); - if($scope.success){ - modalService.popupConfirmWin("Confirm","You are about to delete the Varbind Dictionary "+data.varbindName+". \n "+searchString+" \n Do you want to continue?", - function(){ - var uuu = papUrl + "/ecomp/cl_dictionary/remove_varbindDict.htm"; - var postData={data: data}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){$scope.varbindDictionaryDatas=data.varbindDictionaryDatas;}); - }, - error : function(data){ - console.log(data); - modalService.showFailure("Fail","Error while deleting: "+ data.responseText); - } - }); - - })} - }, - error : function(data){ - alert("Error while Searching."); - } - }); - }; - - -}); \ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/CLVnfTypeDictGridController.js b/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/CLVnfTypeDictGridController.js deleted file mode 100644 index 4e5f27ca4..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/CLVnfTypeDictGridController.js +++ /dev/null @@ -1,181 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ECOMP Policy Engine - * ================================================================================ - * Copyright (C) 2017 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -/** - */ -app.controller('vnfTypeDictGridController', function ($scope, PapUrlService, CLDictionaryService,modalService, $modal){ - $( "#dialog" ).hide(); - - var papUrl; - PapUrlService.getPapUrl().then(function(data) { - var config = data; - papUrl = config.PAP_URL; - console.log(papUrl); - - CLDictionaryService.getVnfTypeDictionaryData(papUrl).then(function (data) { - var j = data; - $scope.data = JSON.parse(j.data); - console.log($scope.data); - $scope.vnfTypeDictionaryDatas = JSON.parse($scope.data.vnfTypeDictionaryDatas); - console.log($scope.vnfTypeDictionaryDatas); - }, function (error) { - console.log("failed"); - }); - - }); - - $scope.vnfTypeDictionaryGrid = { - data : 'vnfTypeDictionaryDatas', - enableFiltering: true, - exporterCsvFilename: 'VNFType.csv', - enableGridMenu: true, - enableSelectAll: true, - columnDefs: [{ - field: 'id', enableFiltering: false, headerCellTemplate: '' + - '', - cellTemplate: - ' ' + - ' ', width: '8%' - }, - { field: 'vnftype', displayName : 'VNF Type'}, - { field: 'description'}, - {field: 'userCreatedBy.userName', displayName : 'Created By'}, - {field: 'userModifiedBy.userName', displayName : 'Modified By'}, - {field: 'createdDate',type: 'date', cellFilter: 'date:\'yyyy-MM-dd\'' }, - {field: 'modifiedDate',type: 'date', cellFilter: 'date:\'yyyy-MM-dd\'' } - ], - exporterPdfDefaultStyle: {fontSize: 9}, - exporterPdfTableStyle: {margin: [30, 30, 30, 30]}, - exporterPdfTableHeaderStyle: {fontSize: 10, bold: true, italics: true, color: 'red'}, - exporterPdfHeader: { text: "My Header", style: 'headerStyle' }, - exporterPdfFooter: function ( currentPage, pageCount ) { - return { text: currentPage.toString() + ' of ' + pageCount.toString(), style: 'footerStyle' }; - }, - exporterPdfCustomFormatter: function ( docDefinition ) { - docDefinition.styles.headerStyle = { fontSize: 22, bold: true }; - docDefinition.styles.footerStyle = { fontSize: 10, bold: true }; - return docDefinition; - }, - exporterPdfOrientation: 'portrait', - exporterPdfPageSize: 'LETTER', - exporterPdfMaxGridWidth: 500, - exporterCsvLinkElement: angular.element(document.querySelectorAll(".custom-csv-link-location")), - onRegisterApi: function(gridApi){ - $scope.gridApi = gridApi; - } - }; - - $scope.editVnfType = null; - $scope.createNewVnfTypeWindow = function(){ - $scope.editVnfType = null; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'add_vnfType_popup.html', - controller: 'editVnfTypeController', - resolve: { - message: function () { - var message = { - vnfTypeDictionaryDatas: $scope.editVnfType - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.vnfTypeDictionaryDatas=response.vnfTypeDictionaryDatas; - }); - }; - - $scope.editVnfTypeWindow = function(vnfTypeDictionaryData) { - $scope.editVnfType = vnfTypeDictionaryData; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'add_vnfType_popup.html', - controller: 'editVnfTypeController', - resolve: { - message: function () { - var message = { - vnfTypeDictionaryData: $scope.editVnfType - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.vnfTypeDictionaryDatas = response.vnfTypeDictionaryDatas; - }); - }; - - $scope.deleteVnfType = function(data) { - var uuu = "searchDictionary.htm"; - var postData={data: data, type: "attribute"}; - var searchString = "\n"; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(resultList){ - $scope.$apply(function(){ - $scope.list =resultList.result;}); - $scope.searchData = JSON.stringify(resultList.result); - $scope.searchDatas = JSON.parse($scope.searchData); - $scope.success = true; - var i; - if($scope.searchDatas.length > 0){ - for(i = 0 ; i < $scope.searchDatas.length; i++){ - searchString += $scope.searchDatas[i].name + "\n"; - } - }else{ - searchString += "No Policies is Using this Value" - } - - console.log($scope.list); - if($scope.success){ - modalService.popupConfirmWin("Confirm","You are about to delete the Vnf Type Dictionary Item "+data.vnftype+". \n "+searchString+" \n Do you want to continue?", - function(){ - var uuu = papUrl + "/ecomp/cl_dictionary/remove_vnfType.htm"; - var postData={data: data}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){$scope.vnfTypeDictionaryDatas=data.vnfTypeDictionaryDatas;}); - }, - error : function(data){ - console.log(data); - modalService.showFailure("Fail","Error while deleting: "+ data.responseText); - } - }); - - })} - }, - error : function(data){ - alert("Error while Searching."); - } - }); - }; -}); \ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/CLVsclActionDictGridController.js b/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/CLVsclActionDictGridController.js deleted file mode 100644 index 1ff52f203..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/CLVsclActionDictGridController.js +++ /dev/null @@ -1,183 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ECOMP Policy Engine - * ================================================================================ - * Copyright (C) 2017 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -/** - */ -app.controller('vsclActionDictGridController', function ($scope, PapUrlService, CLDictionaryService,modalService, $modal){ - $( "#dialog" ).hide(); - - var papUrl; - PapUrlService.getPapUrl().then(function(data) { - var config = data; - papUrl = config.PAP_URL; - console.log(papUrl); - - CLDictionaryService.getVSCLActionDictionaryData(papUrl).then(function (data) { - var j = data; - $scope.data = JSON.parse(j.data); - console.log($scope.data); - $scope.vsclActionDictionaryDatas = JSON.parse($scope.data.vsclActionDictionaryDatas); - console.log($scope.vsclActionDictionaryDatas); - }, function (error) { - console.log("failed"); - }); - - }); - - $scope.vsclActionDictionaryGrid = { - data : 'vsclActionDictionaryDatas', - enableFiltering: true, - exporterCsvFilename: 'VSCLAction.csv', - enableGridMenu: true, - enableSelectAll: true, - columnDefs: [{ - field: 'id', enableFiltering: false, headerCellTemplate: '' + - '', - cellTemplate: - ' ' + - ' ', width: '8%' - }, - { field: 'vsclaction', displayName : 'VSCL Action'}, - { field: 'description'}, - {field: 'userCreatedBy.userName', displayName : 'Created By'}, - {field: 'userModifiedBy.userName', displayName : 'Modified By'}, - {field: 'createdDate',type: 'date', cellFilter: 'date:\'yyyy-MM-dd\'' }, - {field: 'modifiedDate',type: 'date', cellFilter: 'date:\'yyyy-MM-dd\'' } - ], - exporterPdfDefaultStyle: {fontSize: 9}, - exporterPdfTableStyle: {margin: [30, 30, 30, 30]}, - exporterPdfTableHeaderStyle: {fontSize: 10, bold: true, italics: true, color: 'red'}, - exporterPdfHeader: { text: "My Header", style: 'headerStyle' }, - exporterPdfFooter: function ( currentPage, pageCount ) { - return { text: currentPage.toString() + ' of ' + pageCount.toString(), style: 'footerStyle' }; - }, - exporterPdfCustomFormatter: function ( docDefinition ) { - docDefinition.styles.headerStyle = { fontSize: 22, bold: true }; - docDefinition.styles.footerStyle = { fontSize: 10, bold: true }; - return docDefinition; - }, - exporterPdfOrientation: 'portrait', - exporterPdfPageSize: 'LETTER', - exporterPdfMaxGridWidth: 500, - exporterCsvLinkElement: angular.element(document.querySelectorAll(".custom-csv-link-location")), - onRegisterApi: function(gridApi){ - $scope.gridApi = gridApi; - } - }; - - $scope.editvsclAction = null; - $scope.createvsclActionWindow = function(){ - $scope.editvsclAction = null; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'add_vsclAction_popup.html', - controller: 'editVsclActionController', - resolve: { - message: function () { - var message = { - vsclActionDictionaryDatas: $scope.editvsclAction - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.vsclActionDictionaryDatas=response.vsclActionDictionaryDatas; - }); - }; - - $scope.editvsclActionWindow = function(vsclActionDictionaryData) { - $scope.editvsclAction = vsclActionDictionaryData; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'add_vsclAction_popup.html', - controller: 'editVsclActionController', - resolve: { - message: function () { - var message = { - vsclActionDictionaryData: $scope.editvsclAction - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.vsclActionDictionaryDatas = response.vsclActionDictionaryDatas; - }); - }; - - $scope.success = false; - $scope.deletevsclAction = function(data) { - var uuu = "searchDictionary.htm"; - var postData={data: data, type: "clVSCL"}; - var searchString = "\n"; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(resultList){ - $scope.$apply(function(){ - $scope.list =resultList.result;}); - $scope.searchData = JSON.stringify(resultList.result); - $scope.searchDatas = JSON.parse($scope.searchData); - $scope.success = true; - var i; - if($scope.searchDatas.length > 0){ - for(i = 0 ; i < $scope.searchDatas.length; i++){ - searchString += $scope.searchDatas[i].name + "\n"; - } - }else{ - searchString += "No Policies is Using this Value" - } - - console.log($scope.list); - if($scope.success){ - modalService.popupConfirmWin("Confirm","You are about to delete the Vscl Action Item "+data.vsclaction+". \n "+searchString+" \n Do you want to continue?", - function(){ - var uuu = papUrl + "/ecomp/cl_dictionary/remove_VsclAction.htm"; - var postData={data: data}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){$scope.vsclActionDictionaryDatas=data.vsclActionDictionaryDatas;}); - }, - error : function(data){ - console.log(data); - modalService.showFailure("Fail","Error while deleting: "+ data.responseText); - } - }); - - })} - }, - error : function(data){ - alert("Error while Searching."); - } - }); - }; - -}); \ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/DecisionSettingsDictGridController.js b/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/DecisionSettingsDictGridController.js deleted file mode 100644 index 8a81853a6..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/DecisionSettingsDictGridController.js +++ /dev/null @@ -1,151 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ECOMP Policy Engine - * ================================================================================ - * Copyright (C) 2017 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -/** - */ -app.controller('decisionSettingsDictGridController', function ($scope, DictionaryService,modalService, $modal, PapUrlService){ - $( "#dialog" ).hide(); - var papUrl; - PapUrlService.getPapUrl().then(function(data) { - var config = data; - papUrl = config.PAP_URL; - console.log(papUrl); - - DictionaryService.getDecisionSettingsDictionaryData(papUrl).then(function (data) { - var j = data; - $scope.data = JSON.parse(j.data); - console.log($scope.data); - $scope.settingsDictionaryDatas = JSON.parse($scope.data.settingsDictionaryDatas); - console.log($scope.settingsDictionaryDatas); - }, function (error) { - console.log("failed"); - }); - - }); - - $scope.decisionSettingsDictionaryGrid = { - data : 'settingsDictionaryDatas', - enableFiltering: true, - exporterCsvFilename: 'Settings.csv', - enableGridMenu: true, - enableSelectAll: true, - columnDefs: [{ - field: 'id', enableFiltering: false, headerCellTemplate: '' + - '', - cellTemplate: - ' ' + - ' ', width: '8%' - },{ field: 'xacmlId', displayName : 'Settings ID'}, - { field: 'datatypeBean.shortName', displayName : 'Data Type' }, - { field: 'description' }, - {field: 'userCreatedBy.userName', displayName : 'Created By' }, - {field: 'userModifiedBy.userName', displayName : 'Modified By'}, - {field: 'createdDate',type: 'date', cellFilter: 'date:\'yyyy-MM-dd\'' }, - {field: 'modifiedDate',type: 'date', cellFilter: 'date:\'yyyy-MM-dd\'' } - ], - exporterPdfDefaultStyle: {fontSize: 9}, - exporterPdfTableStyle: {margin: [30, 30, 30, 30]}, - exporterPdfTableHeaderStyle: {fontSize: 10, bold: true, italics: true, color: 'red'}, - exporterPdfHeader: { text: "My Header", style: 'headerStyle' }, - exporterPdfFooter: function ( currentPage, pageCount ) { - return { text: currentPage.toString() + ' of ' + pageCount.toString(), style: 'footerStyle' }; - }, - exporterPdfCustomFormatter: function ( docDefinition ) { - docDefinition.styles.headerStyle = { fontSize: 22, bold: true }; - docDefinition.styles.footerStyle = { fontSize: 10, bold: true }; - return docDefinition; - }, - exporterPdfOrientation: 'portrait', - exporterPdfPageSize: 'LETTER', - exporterPdfMaxGridWidth: 500, - exporterCsvLinkElement: angular.element(document.querySelectorAll(".custom-csv-link-location")), - onRegisterApi: function(gridApi){ - $scope.gridApi = gridApi; - } - }; - - $scope.editSettingsDict = null; - $scope.createNewSettingsDictWindow = function(){ - $scope.editSettingsDict = null; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'add_SettingsDict_popup.html', - controller: 'editSettingsDictController', - resolve: { - message: function () { - var message = { - settingsDictionaryDatas: $scope.editSettingsDict - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.settingsDictionaryDatas=response.settingsDictionaryDatas; - }); - }; - - $scope.editSettingsDictWindow = function(settingsDictionaryData) { - $scope.editSettingsDict = settingsDictionaryData; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'add_SettingsDict_popup.html', - controller: 'editSettingsDictController', - resolve: { - message: function () { - var message = { - settingsDictionaryData: $scope.editSettingsDict - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.settingsDictionaryDatas = response.settingsDictionaryDatas; - }); - }; - - $scope.deleteSettingsDict = function(data) { - modalService.popupConfirmWin("Confirm","You are about to delete the Settings Dictionary "+data.xacmlId+". Do you want to continue?", - function(){ - var uuu = papUrl + "/ecomp/settings_dictionary/remove_settings.htm"; - var postData={data: data}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){$scope.settingsDictionaryDatas=data.settingsDictionaryDatas;}); - }, - error : function(data){ - console.log(data); - modalService.showFailure("Fail","Error while deleting: "+ data.responseText); - } - }); - - }) - }; - - -}); \ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/DescriptiveScopeDictGridController.js b/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/DescriptiveScopeDictGridController.js deleted file mode 100644 index b35a28de2..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/DescriptiveScopeDictGridController.js +++ /dev/null @@ -1,150 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ECOMP Policy Engine - * ================================================================================ - * Copyright (C) 2017 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -/** - */ -app.controller('descriptiveDictGridController', function ($scope, DictionaryService,modalService, $modal, PapUrlService){ - $( "#dialog" ).hide(); - - var papUrl; - PapUrlService.getPapUrl().then(function(data) { - var config = data; - papUrl = config.PAP_URL; - console.log(papUrl); - - DictionaryService.getDescriptiveDictionaryData(papUrl).then(function (data) { - var j = data; - $scope.data = JSON.parse(j.data); - console.log($scope.data); - $scope.descriptiveScopeDictionaryDatas = JSON.parse($scope.data.descriptiveScopeDictionaryDatas); - console.log($scope.descriptiveScopeDictionaryDatas); - }, function (error) { - console.log("failed"); - }); - - }); - - $scope.descriptiveDictionaryGrid = { - data : 'descriptiveScopeDictionaryDatas', - enableFiltering: true, - exporterCsvFilename: 'SearchCriteria.csv', - enableGridMenu: true, - enableSelectAll: true, - columnDefs: [{ - field: 'id', enableFiltering: false, headerCellTemplate: '' + - '', - cellTemplate: - ' ' + - ' ', width: '8%' - },{ field: 'scopeName', displayName : 'Descriptive Scope Name'}, - { field: 'search', displayName : 'Search Criteria' }, - { field: 'description' }, - {field: 'userCreatedBy.userName', displayName : 'Created By' }, - {field: 'userModifiedBy.userName', displayName : 'Modified By'}, - {field: 'createdDate',type: 'date', cellFilter: 'date:\'yyyy-MM-dd\'' }, - {field: 'modifiedDate',type: 'date', cellFilter: 'date:\'yyyy-MM-dd\'' } - ], - exporterPdfDefaultStyle: {fontSize: 9}, - exporterPdfTableStyle: {margin: [30, 30, 30, 30]}, - exporterPdfTableHeaderStyle: {fontSize: 10, bold: true, italics: true, color: 'red'}, - exporterPdfHeader: { text: "My Header", style: 'headerStyle' }, - exporterPdfFooter: function ( currentPage, pageCount ) { - return { text: currentPage.toString() + ' of ' + pageCount.toString(), style: 'footerStyle' }; - }, - exporterPdfCustomFormatter: function ( docDefinition ) { - docDefinition.styles.headerStyle = { fontSize: 22, bold: true }; - docDefinition.styles.footerStyle = { fontSize: 10, bold: true }; - return docDefinition; - }, - exporterPdfOrientation: 'portrait', - exporterPdfPageSize: 'LETTER', - exporterPdfMaxGridWidth: 500, - exporterCsvLinkElement: angular.element(document.querySelectorAll(".custom-csv-link-location")), - onRegisterApi: function(gridApi){ - $scope.gridApi = gridApi; - } - }; - - $scope.editDescriptiveScope = null; - $scope.createNewDescriptiveScopeWindow = function(){ - $scope.editDescriptiveScope = null; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'add_descriptiveScope_popup.html', - controller: 'editDescriptiveScopeController', - resolve: { - message: function () { - var message = { - descriptiveScopeDictionaryDatas: $scope.editDescriptiveScope - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.descriptiveScopeDictionaryDatas=response.descriptiveScopeDictionaryDatas; - }); - }; - - $scope.editDescriptiveScopeWindow = function(descriptiveScopeDictionaryData) { - $scope.editDescriptiveScope = descriptiveScopeDictionaryData; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'add_descriptiveScope_popup.html', - controller: 'editDescriptiveScopeController', - resolve: { - message: function () { - var message = { - descriptiveScopeDictionaryData: $scope.editDescriptiveScope - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.descriptiveScopeDictionaryDatas = response.descriptiveScopeDictionaryDatas; - }); - }; - - $scope.deleteDescriptiveScope = function(data) { - modalService.popupConfirmWin("Confirm","You are about to delete the Descriptive Scope : "+data.scopeName+". Do you want to continue?", - function(){ - var uuu = papUrl + "/ecomp/descriptive_dictionary/remove_descriptiveScope.htm"; - var postData={data: data}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){$scope.descriptiveScopeDictionaryDatas=data.descriptiveScopeDictionaryDatas;}); - }, - error : function(data){ - console.log(data); - modalService.showFailure("Fail","Error while deleting: "+ data.responseText); - } - }); - - }) - }; -}); \ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/EnforcerTypeDictGridController.js b/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/EnforcerTypeDictGridController.js deleted file mode 100644 index d5fceb8d6..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/EnforcerTypeDictGridController.js +++ /dev/null @@ -1,126 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ECOMP Policy Engine - * ================================================================================ - * Copyright (C) 2017 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -/** - */ -app.controller('enforcerDictGridController', function ($scope, DictionaryService,modalService, $modal, PapUrlService){ - $( "#dialog" ).hide(); - - var papUrl; - PapUrlService.getPapUrl().then(function(data) { - var config = data; - papUrl = config.PAP_URL; - console.log(papUrl); - - - DictionaryService.getEnforcerDictionaryData(papUrl).then(function (data) { - var j = data; - $scope.data = JSON.parse(j.data); - console.log($scope.data); - $scope.enforcerDictionaryDatas = JSON.parse($scope.data.enforcerDictionaryDatas); - console.log($scope.enforcerDictionaryDatas); - }, function (error) { - console.log("failed"); - }); - - }); - - $scope.enforcerDictionaryGrid = { - data : 'enforcerDictionaryDatas', - enableFiltering: true, - columnDefs: [{ - field: 'id', enableFiltering: false, headerCellTemplate: '' + - '', - cellTemplate: - ' ' + - ' ', width: '8%' - },{ field: 'enforcingType', displayName : 'Enforcing Type'}, - { field: 'script' , displayName : 'Script'}, - {field: 'connectionQuery', displayName : 'Connection Query' }, - {field: 'valueQuery', displayName : 'Value Query'} - ] - }; - - $scope.editEnforcerType = null; - $scope.createNewEnforcerTypeWindow = function(){ - $scope.editEnforcerType = null; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'add_EnforcerType_popup.html', - controller: 'editEnforcerTypeController', - resolve: { - message: function () { - var message = { - enforcerDictionaryDatas: $scope.editEnforcerType - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.enforcerDictionaryDatas=response.enforcerDictionaryDatas; - }); - }; - - $scope.editEnforcerTypeWindow = function(enforcerDictionaryData) { - $scope.editEnforcerType = enforcerDictionaryData; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'add_EnforcerType_popup.html', - controller: 'editEnforcerTypeController', - resolve: { - message: function () { - var message = { - enforcerDictionaryData: $scope.editEnforcerType - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.enforcerDictionaryDatas = response.enforcerDictionaryDatas; - }); - }; - - $scope.deleteEnforcerType = function(data) { - modalService.popupConfirmWin("Confirm","You are about to delete the Enforcing Type "+data.enforcingType+". Do you want to continue?", - function(){ - var uuu = papUrl + "/ecomp/enforcer_dictionary/remove_enforcer.htm"; - var postData={data: data}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){$scope.enforcerDictionaryDatas=data.enforcerDictionaryDatas;}); - }, - error : function(data){ - console.log(data); - modalService.showFailure("Fail","Error while deleting: "+ data.responseText); - } - }); - - }) - }; -}); \ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/FWActionListDictGridController.js b/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/FWActionListDictGridController.js deleted file mode 100644 index 6f8c0aad5..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/FWActionListDictGridController.js +++ /dev/null @@ -1,145 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ECOMP Policy Engine - * ================================================================================ - * Copyright (C) 2017 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -/** - */ -app.controller('actionListDictGridController', function ($scope, FWDictionaryService,modalService, $modal, PapUrlService){ - $( "#dialog" ).hide(); - - var papUrl; - PapUrlService.getPapUrl().then(function(data) { - var config = data; - papUrl = config.PAP_URL; - console.log(papUrl); - - FWDictionaryService.getActionListDictionaryData(papUrl).then(function (data) { - var j = data; - $scope.data = JSON.parse(j.data); - console.log($scope.data); - $scope.actionListDictionaryDatas = JSON.parse($scope.data.actionListDictionaryDatas); - console.log($scope.actionListDictionaryDatas); - }, function (error) { - console.log("failed"); - }); - - }); - - $scope.actionListDictionaryGrid = { - data : 'actionListDictionaryDatas', - enableFiltering: true, - exporterCsvFilename: 'ActionList.csv', - enableGridMenu: true, - enableSelectAll: true, - columnDefs: [{ - field: 'id', enableFiltering: false, headerCellTemplate: '' + - '', - cellTemplate: - ' ' + - ' ', width: '8%' - },{ field: 'actionName', displayName : 'Action Name'}, - { field: 'description' } - ], - exporterPdfDefaultStyle: {fontSize: 9}, - exporterPdfTableStyle: {margin: [30, 30, 30, 30]}, - exporterPdfTableHeaderStyle: {fontSize: 10, bold: true, italics: true, color: 'red'}, - exporterPdfHeader: { text: "My Header", style: 'headerStyle' }, - exporterPdfFooter: function ( currentPage, pageCount ) { - return { text: currentPage.toString() + ' of ' + pageCount.toString(), style: 'footerStyle' }; - }, - exporterPdfCustomFormatter: function ( docDefinition ) { - docDefinition.styles.headerStyle = { fontSize: 22, bold: true }; - docDefinition.styles.footerStyle = { fontSize: 10, bold: true }; - return docDefinition; - }, - exporterPdfOrientation: 'portrait', - exporterPdfPageSize: 'LETTER', - exporterPdfMaxGridWidth: 500, - exporterCsvLinkElement: angular.element(document.querySelectorAll(".custom-csv-link-location")), - onRegisterApi: function(gridApi){ - $scope.gridApi = gridApi; - } - }; - - $scope.editActionList = null; - $scope.createNewFWActionListWindow = function(){ - $scope.editActionList = null; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'add_FWActionList_popup.html', - controller: 'editFWActionListController', - resolve: { - message: function () { - var message = { - actionListDictionaryDatas: $scope.editActionList - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.actionListDictionaryDatas=response.actionListDictionaryDatas; - }); - }; - - $scope.editFWActionListWindow = function(actionListDictionaryData) { - $scope.editActionList = actionListDictionaryData; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'add_FWActionList_popup.html', - controller: 'editFWActionListController', - resolve: { - message: function () { - var message = { - actionListDictionaryData: $scope.editActionList - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.actionListDictionaryDatas = response.actionListDictionaryDatas; - }); - }; - - $scope.deleteFWActionList = function(data) { - modalService.popupConfirmWin("Confirm","You are about to delete the Action List "+data.actionName+". Do you want to continue?", - function(){ - var uuu = papUrl + "/ecomp/fw_dictionary/remove_ActionList.htm"; - var postData={data: data}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){$scope.actionListDictionaryDatas=data.actionListDictionaryDatas;}); - }, - error : function(data){ - console.log(data); - modalService.showFailure("Fail","Error while deleting: "+ data.responseText); - } - }); - - }) - }; -}); \ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/FWAddressGroupDictGridController.js b/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/FWAddressGroupDictGridController.js deleted file mode 100644 index 4220a7c6d..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/FWAddressGroupDictGridController.js +++ /dev/null @@ -1,146 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ECOMP Policy Engine - * ================================================================================ - * Copyright (C) 2017 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -/** - */ -app.controller('addressGroupDictGridController', function ($scope, FWDictionaryService,modalService, $modal, PapUrlService){ - $( "#dialog" ).hide(); - - var papUrl; - PapUrlService.getPapUrl().then(function(data) { - var config = data; - papUrl = config.PAP_URL; - console.log(papUrl); - - FWDictionaryService.getAddressGroupDictionaryData(papUrl).then(function (data) { - var j = data; - $scope.data = JSON.parse(j.data); - console.log($scope.data); - $scope.addressGroupDictionaryDatas = JSON.parse($scope.data.addressGroupDictionaryDatas); - console.log($scope.addressGroupDictionaryDatas); - }, function (error) { - console.log("failed"); - }); - }); - - $scope.addressGroupDictionaryGrid = { - data : 'addressGroupDictionaryDatas', - enableFiltering: true, - exporterCsvFilename: 'AddressGroup.csv', - enableGridMenu: true, - enableSelectAll: true, - columnDefs: [{ - field: 'id', enableFiltering: false, headerCellTemplate: '' + - '', - cellTemplate: - ' ' + - ' ', width: '8%' - },{ field: 'groupName', displayName : 'Group Name'}, - { field: 'prefixList', displayName : 'Prefix List' }, - { field: 'description' } - ], - exporterPdfDefaultStyle: {fontSize: 9}, - exporterPdfTableStyle: {margin: [30, 30, 30, 30]}, - exporterPdfTableHeaderStyle: {fontSize: 10, bold: true, italics: true, color: 'red'}, - exporterPdfHeader: { text: "My Header", style: 'headerStyle' }, - exporterPdfFooter: function ( currentPage, pageCount ) { - return { text: currentPage.toString() + ' of ' + pageCount.toString(), style: 'footerStyle' }; - }, - exporterPdfCustomFormatter: function ( docDefinition ) { - docDefinition.styles.headerStyle = { fontSize: 22, bold: true }; - docDefinition.styles.footerStyle = { fontSize: 10, bold: true }; - return docDefinition; - }, - exporterPdfOrientation: 'portrait', - exporterPdfPageSize: 'LETTER', - exporterPdfMaxGridWidth: 500, - exporterCsvLinkElement: angular.element(document.querySelectorAll(".custom-csv-link-location")), - onRegisterApi: function(gridApi){ - $scope.gridApi = gridApi; - } - }; - - - $scope.editAddressGroup = null; - $scope.createNewFWAddressGroupWindow = function(){ - $scope.editAddressGroup = null; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'add_FWAddressGroup_popup.html', - controller: 'editFWAddressGroupController', - resolve: { - message: function () { - var message = { - addressGroupDictionaryDatas: $scope.editAddressGroup - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.addressGroupDictionaryDatas=response.addressGroupDictionaryDatas; - }); - }; - - $scope.editFWAddressGroupWindow = function(addressGroupDictionaryData) { - $scope.editAddressGroup = addressGroupDictionaryData; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'add_FWAddressGroup_popup.html', - controller: 'editFWAddressGroupController', - resolve: { - message: function () { - var message = { - addressGroupDictionaryData: $scope.editAddressGroup - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.addressGroupDictionaryDatas = response.addressGroupDictionaryDatas; - }); - }; - - $scope.deleteFWAddressGroup = function(data) { - modalService.popupConfirmWin("Confirm","You are about to delete the Address Group "+data.groupName+". Do you want to continue?", - function(){ - var uuu = papUrl + "/ecomp/fw_dictionary/remove_AddressGroup.htm"; - var postData={data: data}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){$scope.addressGroupDictionaryDatas=data.addressGroupDictionaryDatas;}); - }, - error : function(data){ - console.log(data); - modalService.showFailure("Fail","Error while deleting: "+ data.responseText); - } - }); - - }) - }; -}); \ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/FWParentListDictGridController.js b/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/FWParentListDictGridController.js deleted file mode 100644 index a4fc959f6..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/FWParentListDictGridController.js +++ /dev/null @@ -1,149 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ECOMP Policy Engine - * ================================================================================ - * Copyright (C) 2017 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -/** - */ -app.controller('parentDictGridController', function ($scope, FWDictionaryService,modalService, $modal, PapUrlService){ - $( "#dialog" ).hide(); - - var papUrl; - PapUrlService.getPapUrl().then(function(data) { - var config = data; - papUrl = config.PAP_URL; - console.log(papUrl); - - FWDictionaryService.getParentListDictionaryData(papUrl).then(function (data) { - var j = data; - $scope.data = JSON.parse(j.data); - console.log($scope.data); - $scope.fwDictListDictionaryDatas = JSON.parse($scope.data.fwDictListDictionaryDatas); - console.log($scope.fwDictListDictionaryDatas); - }, function (error) { - console.log("failed"); - }); - }); - - - - $scope.parentDictionaryGrid = { - data : 'fwDictListDictionaryDatas', - enableFiltering: true, - exporterCsvFilename: 'ParentList.csv', - enableGridMenu: true, - enableSelectAll: true, - columnDefs: [{ - field: 'id', enableFiltering: false, headerCellTemplate: '' + - '', - cellTemplate: - ' ' + - ' ', width: '8%' - },{ field: 'parentItemName', displayName : 'Parent Name'}, - { field: 'description', displayName : 'Description' }, - { field: 'addressList', displayName : 'Address List' }, - { field: 'serviceList', displayName : 'Service List' } - ], - exporterPdfDefaultStyle: {fontSize: 9}, - exporterPdfTableStyle: {margin: [30, 30, 30, 30]}, - exporterPdfTableHeaderStyle: {fontSize: 10, bold: true, italics: true, color: 'red'}, - exporterPdfHeader: { text: "My Header", style: 'headerStyle' }, - exporterPdfFooter: function ( currentPage, pageCount ) { - return { text: currentPage.toString() + ' of ' + pageCount.toString(), style: 'footerStyle' }; - }, - exporterPdfCustomFormatter: function ( docDefinition ) { - docDefinition.styles.headerStyle = { fontSize: 22, bold: true }; - docDefinition.styles.footerStyle = { fontSize: 10, bold: true }; - return docDefinition; - }, - exporterPdfOrientation: 'portrait', - exporterPdfPageSize: 'LETTER', - exporterPdfMaxGridWidth: 500, - exporterCsvLinkElement: angular.element(document.querySelectorAll(".custom-csv-link-location")), - onRegisterApi: function(gridApi){ - $scope.gridApi = gridApi; - } - }; - - $scope.editParentList = null; - $scope.createNewFWParentListWindow = function(){ - $scope.editParentList = null; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'add_fwParentList_popup.html', - controller: 'editFWParentListController', - resolve: { - message: function () { - var message = { - fwDictListDictionaryDatas: $scope.editParentList - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.fwDictListDictionaryDatas=response.fwDictListDictionaryDatas; - }); - }; - - $scope.editFWParentListWindow = function(fwDictListDictionaryData) { - $scope.editParentList = fwDictListDictionaryData; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'add_fwParentList_popup.html', - controller: 'editFWParentListController', - resolve: { - message: function () { - var message = { - fwDictListDictionaryData: $scope.editParentList - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.fwDictListDictionaryDatas = response.fwDictListDictionaryDatas; - }); - }; - - $scope.deleteFWParentList = function(data) { - modalService.popupConfirmWin("Confirm","You are about to delete the Parent List: "+data.parentItemName+". Do you want to continue?", - function(){ - var uuu = papUrl + "/ecomp/fw_dictionary/remove_FWDictionaryList.htm"; - var postData={data: data}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){$scope.fwDictListDictionaryDatas=data.fwDictListDictionaryDatas;}); - }, - error : function(data){ - console.log(data); - modalService.showFailure("Fail","Error while deleting: "+ data.responseText); - } - }); - - }) - }; - -}); \ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/FWPortListDictGridController.js b/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/FWPortListDictGridController.js deleted file mode 100644 index 647b97a80..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/FWPortListDictGridController.js +++ /dev/null @@ -1,132 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ECOMP Policy Engine - * ================================================================================ - * Copyright (C) 2017 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -/** - */ -app.controller('portListDictGridController', function ($scope, FWDictionaryService,modalService, $modal, PapUrlService){ - $( "#dialog" ).hide(); - - var papUrl; - PapUrlService.getPapUrl().then(function(data) { - var config = data; - papUrl = config.PAP_URL; - console.log(papUrl); - - FWDictionaryService.getPortListDictionaryData(papUrl).then(function (data) { - var j = data; - $scope.data = JSON.parse(j.data); - console.log($scope.data); - $scope.portListDictionaryDatas = JSON.parse($scope.data.portListDictionaryDatas); - console.log($scope.portListDictionaryDatas); - }, function (error) { - console.log("failed"); - }); - - FWDictionaryService.getPortListDictionaryData(papUrl).then(function (data) { - var j = data; - $scope.data = JSON.parse(j.data); - console.log($scope.data); - $scope.portListDictionaryDatas = JSON.parse($scope.data.portListDictionaryDatas); - console.log($scope.portListDictionaryDatas); - }, function (error) { - console.log("failed"); - }); - }); - - $scope.portListDictionaryGrid = { - data : 'portListDictionaryDatas', - enableFiltering: true, - columnDefs: [{ - field: 'id', enableFiltering: false, headerCellTemplate: '' + - '', - cellTemplate: - ' ' + - ' ', width: '8%' - },{ field: 'portName', displayName : 'Port Name'}, - { field: 'description' } - ] - }; - - $scope.editPortList = null; - $scope.createNewFWPortListWindow = function(){ - $scope.editPortList = null; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'add_FWPortList_popup.html', - controller: 'editFWPortListController', - resolve: { - message: function () { - var message = { - portListDictionaryDatas: $scope.editPortList - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.portListDictionaryDatas=response.portListDictionaryDatas; - }); - }; - - $scope.editFWPortListWindow = function(portListDictionaryData) { - $scope.editPortList = portListDictionaryData; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'add_FWPortList_popup.html', - controller: 'editFWPortListController', - resolve: { - message: function () { - var message = { - portListDictionaryData: $scope.editPortList - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.portListDictionaryDatas = response.portListDictionaryDatas; - }); - }; - - $scope.deleteFWPortList = function(data) { - modalService.popupConfirmWin("Confirm","You are about to delete the Port List "+data.portName+". Do you want to continue?", - function(){ - var uuu = papUrl + "/ecomp/fw_dictionary/remove_PortList.htm"; - var postData={data: data}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){$scope.portListDictionaryDatas=data.portListDictionaryDatas;}); - }, - error : function(data){ - console.log(data); - modalService.showFailure("Fail","Error while deleting: "+ data.responseText); - } - }); - - }) - }; -}); \ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/FWPrefixListDictGridController.js b/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/FWPrefixListDictGridController.js deleted file mode 100644 index 09f3f3eb4..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/FWPrefixListDictGridController.js +++ /dev/null @@ -1,148 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ECOMP Policy Engine - * ================================================================================ - * Copyright (C) 2017 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -/** - */ -app.controller('prefixListDictGridController', function ($scope, FWDictionaryService,modalService, $modal, PapUrlService){ - $( "#dialog" ).hide(); - - var papUrl; - PapUrlService.getPapUrl().then(function(data) { - var config = data; - papUrl = config.PAP_URL; - console.log(papUrl); - - FWDictionaryService.getPrefixListDictionaryData(papUrl).then(function (data) { - var j = data; - $scope.data = JSON.parse(j.data); - console.log($scope.data); - $scope.prefixListDictionaryDatas = JSON.parse($scope.data.prefixListDictionaryDatas); - console.log($scope.prefixListDictionaryDatas); - }, function (error) { - console.log("failed"); - }); - - }); - - $scope.prefixListDictionaryGrid = { - data : 'prefixListDictionaryDatas', - enableFiltering: true, - exporterCsvFilename: 'PrefixList.csv', - enableGridMenu: true, - enableSelectAll: true, - columnDefs: [{ - field: 'id', enableFiltering: false, headerCellTemplate: '' + - '', - cellTemplate: - ' ' + - ' ', width: '8%' - },{ field: 'prefixListName', displayName : 'PrefixList Name'}, - { field: 'description' }, - {field: 'prefixListValue', displayName : 'PrefixList Value' } - ], - exporterPdfDefaultStyle: {fontSize: 9}, - exporterPdfTableStyle: {margin: [30, 30, 30, 30]}, - exporterPdfTableHeaderStyle: {fontSize: 10, bold: true, italics: true, color: 'red'}, - exporterPdfHeader: { text: "My Header", style: 'headerStyle' }, - exporterPdfFooter: function ( currentPage, pageCount ) { - return { text: currentPage.toString() + ' of ' + pageCount.toString(), style: 'footerStyle' }; - }, - exporterPdfCustomFormatter: function ( docDefinition ) { - docDefinition.styles.headerStyle = { fontSize: 22, bold: true }; - docDefinition.styles.footerStyle = { fontSize: 10, bold: true }; - return docDefinition; - }, - exporterPdfOrientation: 'portrait', - exporterPdfPageSize: 'LETTER', - exporterPdfMaxGridWidth: 500, - exporterCsvLinkElement: angular.element(document.querySelectorAll(".custom-csv-link-location")), - onRegisterApi: function(gridApi){ - $scope.gridApi = gridApi; - } - }; - - - $scope.editPrefixList = null; - $scope.createNewFWPrefixListWindow = function(){ - $scope.editPrefixList = null; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'add_FWPrefixList_popup.html', - controller: 'editFWPrefixListController', - resolve: { - message: function () { - var message = { - prefixListDictionaryDatas: $scope.editPrefixList - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.prefixListDictionaryDatas=response.prefixListDictionaryDatas; - }); - }; - - $scope.editFWPrefixListWindow = function(prefixListDictionaryData) { - $scope.editPrefixList = prefixListDictionaryData; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'add_FWPrefixList_popup.html', - controller: 'editFWPrefixListController', - resolve: { - message: function () { - var message = { - prefixListDictionaryData: $scope.editPrefixList - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.prefixListDictionaryDatas = response.prefixListDictionaryDatas; - }); - }; - - $scope.deleteFWPrefixList = function(data) { - modalService.popupConfirmWin("Confirm","You are about to delete the Prefix List "+data.prefixListName+". Do you want to continue?", - function(){ - var uuu = papUrl + "/ecomp/fw_dictionary/remove_PrefixList.htm"; - var postData={data: data}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){$scope.prefixListDictionaryDatas=data.prefixListDictionaryDatas;}); - }, - error : function(data){ - console.log(data); - modalService.showFailure("Fail","Error while deleting: "+ data.responseText); - } - }); - - }) - }; - -}); \ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/FWProtocolListDictGridController.js b/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/FWProtocolListDictGridController.js deleted file mode 100644 index e31d0757b..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/FWProtocolListDictGridController.js +++ /dev/null @@ -1,157 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ECOMP Policy Engine - * ================================================================================ - * Copyright (C) 2017 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -/** - */ -app.controller('protocolListDictGridController', function ($scope, FWDictionaryService,modalService, $modal, PapUrlService){ - $( "#dialog" ).hide(); - - var papUrl; - PapUrlService.getPapUrl().then(function(data) { - var config = data; - papUrl = config.PAP_URL; - console.log(papUrl); - - FWDictionaryService.getProtocolListDictionaryData(papUrl).then(function (data) { - var j = data; - $scope.data = JSON.parse(j.data); - console.log($scope.data); - $scope.protocolListDictionaryDatas = JSON.parse($scope.data.protocolListDictionaryDatas); - console.log($scope.protocolListDictionaryDatas); - }, function (error) { - console.log("failed"); - }); - - FWDictionaryService.getProtocolListDictionaryData(papUrl).then(function (data) { - var j = data; - $scope.data = JSON.parse(j.data); - console.log($scope.data); - $scope.protocolListDictionaryDatas = JSON.parse($scope.data.protocolListDictionaryDatas); - console.log($scope.protocolListDictionaryDatas); - }, function (error) { - console.log("failed"); - }); - - }); - - $scope.protocolListDictionaryGrid = { - data : 'protocolListDictionaryDatas', - enableFiltering: true, - exporterCsvFilename: 'ProtocolList.csv', - enableGridMenu: true, - enableSelectAll: true, - columnDefs: [{ - field: 'id', enableFiltering: false, headerCellTemplate: '' + - '', - cellTemplate: - ' ' + - ' ', width: '8%' - },{ field: 'protocolName', displayName : 'Protocol Name'}, - { field: 'description' } - ], - exporterPdfDefaultStyle: {fontSize: 9}, - exporterPdfTableStyle: {margin: [30, 30, 30, 30]}, - exporterPdfTableHeaderStyle: {fontSize: 10, bold: true, italics: true, color: 'red'}, - exporterPdfHeader: { text: "My Header", style: 'headerStyle' }, - exporterPdfFooter: function ( currentPage, pageCount ) { - return { text: currentPage.toString() + ' of ' + pageCount.toString(), style: 'footerStyle' }; - }, - exporterPdfCustomFormatter: function ( docDefinition ) { - docDefinition.styles.headerStyle = { fontSize: 22, bold: true }; - docDefinition.styles.footerStyle = { fontSize: 10, bold: true }; - return docDefinition; - }, - exporterPdfOrientation: 'portrait', - exporterPdfPageSize: 'LETTER', - exporterPdfMaxGridWidth: 500, - exporterCsvLinkElement: angular.element(document.querySelectorAll(".custom-csv-link-location")), - onRegisterApi: function(gridApi){ - $scope.gridApi = gridApi; - } - }; - - - $scope.editProtocolList = null; - $scope.createNewFWProtocolListWindow = function(){ - $scope.editProtocolList = null; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'add_FWProtocolList_popup.html', - controller: 'editFWProtocolListController', - resolve: { - message: function () { - var message = { - protocolListDictionaryDatas: $scope.editProtocolList - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.protocolListDictionaryDatas=response.protocolListDictionaryDatas; - }); - }; - - $scope.editFWProtocolListWindow = function(protocolListDictionaryData) { - $scope.editProtocolList = protocolListDictionaryData; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'add_FWProtocolList_popup.html', - controller: 'editFWProtocolListController', - resolve: { - message: function () { - var message = { - protocolListDictionaryData: $scope.editProtocolList - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.protocolListDictionaryDatas = response.protocolListDictionaryDatas; - }); - }; - - $scope.deleteFWProtocolList = function(data) { - modalService.popupConfirmWin("Confirm","You are about to delete the Protocol List "+data.protocolName+". Do you want to continue?", - function(){ - var uuu = papUrl + "/ecomp/fw_dictionary/remove_protocol.htm"; - var postData={data: data}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){$scope.protocolListDictionaryDatas=data.protocolListDictionaryDatas;}); - }, - error : function(data){ - console.log(data); - modalService.showFailure("Fail","Error while deleting: "+ data.responseText); - } - }); - - }) - }; - -}); \ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/FWSecurityZoneDictGridController.js b/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/FWSecurityZoneDictGridController.js deleted file mode 100644 index 7f1367924..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/FWSecurityZoneDictGridController.js +++ /dev/null @@ -1,147 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ECOMP Policy Engine - * ================================================================================ - * Copyright (C) 2017 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -/** - */ -app.controller('securityZoneDictGridController', function ($scope, FWDictionaryService,modalService, $modal, PapUrlService){ - $( "#dialog" ).hide(); - - var papUrl; - PapUrlService.getPapUrl().then(function(data) { - var config = data; - papUrl = config.PAP_URL; - console.log(papUrl); - - FWDictionaryService.getSecurityZoneDictionaryData(papUrl).then(function (data) { - var j = data; - $scope.data = JSON.parse(j.data); - console.log($scope.data); - $scope.securityZoneDictionaryDatas = JSON.parse($scope.data.securityZoneDictionaryDatas); - console.log($scope.securityZoneDictionaryDatas); - }, function (error) { - console.log("failed"); - }); - - }); - - - $scope.securityZoneDictionaryGrid = { - data : 'securityZoneDictionaryDatas', - enableFiltering: true, - exporterCsvFilename: 'SecurityZone.csv', - enableGridMenu: true, - enableSelectAll: true, - columnDefs: [{ - field: 'id', enableFiltering: false, headerCellTemplate: '' + - '', - cellTemplate: - ' ' + - ' ', width: '8%' - },{ field: 'zoneName', displayName : 'Zone Name'}, - { field: 'zoneValue', displayName : 'Zone Value' } - ], - exporterPdfDefaultStyle: {fontSize: 9}, - exporterPdfTableStyle: {margin: [30, 30, 30, 30]}, - exporterPdfTableHeaderStyle: {fontSize: 10, bold: true, italics: true, color: 'red'}, - exporterPdfHeader: { text: "My Header", style: 'headerStyle' }, - exporterPdfFooter: function ( currentPage, pageCount ) { - return { text: currentPage.toString() + ' of ' + pageCount.toString(), style: 'footerStyle' }; - }, - exporterPdfCustomFormatter: function ( docDefinition ) { - docDefinition.styles.headerStyle = { fontSize: 22, bold: true }; - docDefinition.styles.footerStyle = { fontSize: 10, bold: true }; - return docDefinition; - }, - exporterPdfOrientation: 'portrait', - exporterPdfPageSize: 'LETTER', - exporterPdfMaxGridWidth: 500, - exporterCsvLinkElement: angular.element(document.querySelectorAll(".custom-csv-link-location")), - onRegisterApi: function(gridApi){ - $scope.gridApi = gridApi; - } - }; - - $scope.editSecurityZone = null; - $scope.createNewFWSecurityZoneWindow = function(){ - $scope.editSecurityZone = null; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'add_fwSecurityZone_popup.html', - controller: 'editfwSecurityZoneController', - resolve: { - message: function () { - var message = { - securityZoneDictionaryDatas: $scope.editSecurityZone - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.securityZoneDictionaryDatas=response.securityZoneDictionaryDatas; - }); - }; - - $scope.editFWSecurityZoneWindow = function(securityZoneDictionaryData) { - $scope.editSecurityZone = securityZoneDictionaryData; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'add_fwSecurityZone_popup.html', - controller: 'editfwSecurityZoneController', - resolve: { - message: function () { - var message = { - securityZoneDictionaryData: $scope.editSecurityZone - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.securityZoneDictionaryDatas = response.securityZoneDictionaryDatas; - }); - }; - - $scope.deleteFWSecurityZone = function(data) { - modalService.popupConfirmWin("Confirm","You are about to delete the Security Zone "+data.zoneName+". Do you want to continue?", - function(){ - var uuu = papUrl + "/ecomp/fw_dictionary/remove_securityZone.htm"; - var postData={data: data}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){$scope.securityZoneDictionaryDatas=data.securityZoneDictionaryDatas;}); - }, - error : function(data){ - console.log(data); - modalService.showFailure("Fail","Error while deleting: "+ data.responseText); - } - }); - - }) - }; - -}); \ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/FWServiceGroupDictGridController.js b/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/FWServiceGroupDictGridController.js deleted file mode 100644 index fd6bba456..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/FWServiceGroupDictGridController.js +++ /dev/null @@ -1,147 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ECOMP Policy Engine - * ================================================================================ - * Copyright (C) 2017 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -/** - */ -app.controller('serviceGroupDictGridController', function ($scope, FWDictionaryService,modalService, $modal, PapUrlService){ - $( "#dialog" ).hide(); - - var papUrl; - PapUrlService.getPapUrl().then(function(data) { - var config = data; - papUrl = config.PAP_URL; - console.log(papUrl); - - FWDictionaryService.getServiceGroupDictionaryData(papUrl).then(function (data) { - var j = data; - $scope.data = JSON.parse(j.data); - console.log($scope.data); - $scope.serviceGroupDictionaryDatas = JSON.parse($scope.data.serviceGroupDictionaryDatas); - console.log($scope.serviceGroupDictionaryDatas); - }, function (error) { - console.log("failed"); - }); - }); - - - - $scope.serviceGroupDictionaryGrid = { - data : 'serviceGroupDictionaryDatas', - enableFiltering: true, - exporterCsvFilename: 'ServiceGroup.csv', - enableGridMenu: true, - enableSelectAll: true, - columnDefs: [{ - field: 'id', enableFiltering: false, headerCellTemplate: '' + - '', - cellTemplate: - ' ' + - ' ', width: '8%' - },{ field: 'groupName', displayName : 'Group Name'}, - { field: 'serviceList', displayName : 'Service List' } - ], - exporterPdfDefaultStyle: {fontSize: 9}, - exporterPdfTableStyle: {margin: [30, 30, 30, 30]}, - exporterPdfTableHeaderStyle: {fontSize: 10, bold: true, italics: true, color: 'red'}, - exporterPdfHeader: { text: "My Header", style: 'headerStyle' }, - exporterPdfFooter: function ( currentPage, pageCount ) { - return { text: currentPage.toString() + ' of ' + pageCount.toString(), style: 'footerStyle' }; - }, - exporterPdfCustomFormatter: function ( docDefinition ) { - docDefinition.styles.headerStyle = { fontSize: 22, bold: true }; - docDefinition.styles.footerStyle = { fontSize: 10, bold: true }; - return docDefinition; - }, - exporterPdfOrientation: 'portrait', - exporterPdfPageSize: 'LETTER', - exporterPdfMaxGridWidth: 500, - exporterCsvLinkElement: angular.element(document.querySelectorAll(".custom-csv-link-location")), - onRegisterApi: function(gridApi){ - $scope.gridApi = gridApi; - } - }; - - $scope.editServiceGroup = null; - $scope.createNewFWServiceGroupWindow = function(){ - $scope.editServiceGroup = null; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'add_fwServiceGroup_popup.html', - controller: 'editFWServiceGroupController', - resolve: { - message: function () { - var message = { - serviceGroupDictionaryDatas: $scope.editServiceGroup - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.serviceGroupDictionaryDatas=response.serviceGroupDictionaryDatas; - }); - }; - - $scope.editFWServiceGroupWindow = function(serviceGroupDictionaryData) { - $scope.editServiceGroup = serviceGroupDictionaryData; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'add_fwServiceGroup_popup.html', - controller: 'editFWServiceGroupController', - resolve: { - message: function () { - var message = { - serviceGroupDictionaryData: $scope.editServiceGroup - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.serviceGroupDictionaryDatas = response.serviceGroupDictionaryDatas; - }); - }; - - $scope.deleteFWServiceGroup = function(data) { - modalService.popupConfirmWin("Confirm","You are about to delete the Service Group: "+data.groupName+". Do you want to continue?", - function(){ - var uuu = papUrl + "/ecomp/fw_dictionary/remove_serviceGroup.htm"; - var postData={data: data}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){$scope.serviceGroupDictionaryDatas=data.serviceGroupDictionaryDatas;}); - }, - error : function(data){ - console.log(data); - modalService.showFailure("Fail","Error while deleting: "+ data.responseText); - } - }); - - }) - }; - -}); \ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/FWServiceListDictGridController.js b/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/FWServiceListDictGridController.js deleted file mode 100644 index 1b56240fd..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/FWServiceListDictGridController.js +++ /dev/null @@ -1,162 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ECOMP Policy Engine - * ================================================================================ - * Copyright (C) 2017 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -/** - */ -app.controller('serviceListDictGridController', function ($scope, FWDictionaryService,modalService, $modal, PapUrlService){ - $( "#dialog" ).hide(); - - var papUrl; - PapUrlService.getPapUrl().then(function(data) { - var config = data; - papUrl = config.PAP_URL; - console.log(papUrl); - - FWDictionaryService.getServiceListDictionaryData(papUrl).then(function (data) { - var j = data; - $scope.data = JSON.parse(j.data); - console.log($scope.data); - $scope.serviceListDictionaryDatas = JSON.parse($scope.data.serviceListDictionaryDatas); - console.log($scope.serviceListDictionaryDatas); - }, function (error) { - console.log("failed"); - }); - - FWDictionaryService.getProtocolListDictionaryData(papUrl).then(function (data) { - var j = data; - $scope.data = JSON.parse(j.data); - console.log($scope.data); - $scope.protocolListDictionaryDatas = JSON.parse($scope.data.protocolListDictionaryDatas); - console.log($scope.protocolListDictionaryDatas); - }, function (error) { - console.log("failed"); - }); - - }); - - - - $scope.serviceListDictionaryGrid = { - data : 'serviceListDictionaryDatas', - enableFiltering: true, - exporterCsvFilename: 'ServiceList.csv', - enableGridMenu: true, - enableSelectAll: true, - columnDefs: [{ - field: 'id', enableFiltering: false, headerCellTemplate: '' + - '', - cellTemplate: - ' ' + - ' ', width: '8%' - },{ field: 'serviceName', displayName : 'Service Name'}, - { field: 'serviceDescription' , displayName : 'Description'}, - {field: 'serviceType', displayName : 'Service Type' }, - {field: 'serviceTransProtocol', displayName : 'Transport Protocol'}, - {field: 'serviceAppProtocol',displayName : 'APP Protocol' }, - {field: 'servicePorts',displayName : 'Ports' } - ], - exporterPdfDefaultStyle: {fontSize: 9}, - exporterPdfTableStyle: {margin: [30, 30, 30, 30]}, - exporterPdfTableHeaderStyle: {fontSize: 10, bold: true, italics: true, color: 'red'}, - exporterPdfHeader: { text: "My Header", style: 'headerStyle' }, - exporterPdfFooter: function ( currentPage, pageCount ) { - return { text: currentPage.toString() + ' of ' + pageCount.toString(), style: 'footerStyle' }; - }, - exporterPdfCustomFormatter: function ( docDefinition ) { - docDefinition.styles.headerStyle = { fontSize: 22, bold: true }; - docDefinition.styles.footerStyle = { fontSize: 10, bold: true }; - return docDefinition; - }, - exporterPdfOrientation: 'portrait', - exporterPdfPageSize: 'LETTER', - exporterPdfMaxGridWidth: 500, - exporterCsvLinkElement: angular.element(document.querySelectorAll(".custom-csv-link-location")), - onRegisterApi: function(gridApi){ - $scope.gridApi = gridApi; - } - }; - - $scope.editServiceList = null; - $scope.createNewFWServiceListWindow = function(){ - $scope.editServiceList = null; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'add_FWServiceList_popup.html', - controller: 'editFWServiceListController', - resolve: { - message: function () { - var message = { - serviceListDictionaryDatas: $scope.editServiceList - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.serviceListDictionaryDatas=response.serviceListDictionaryDatas; - }); - }; - - $scope.editFWServiceListWindow = function(serviceListDictionaryData) { - $scope.editServiceList = serviceListDictionaryData; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'add_FWServiceList_popup.html', - controller: 'editFWServiceListController', - resolve: { - message: function () { - var message = { - serviceListDictionaryData: $scope.editServiceList - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.serviceListDictionaryDatas = response.serviceListDictionaryDatas; - }); - }; - - $scope.deleteFWServiceList = function(data) { - modalService.popupConfirmWin("Confirm","You are about to delete the Service List "+data.serviceName+". Do you want to continue?", - function(){ - var uuu = papUrl + "/ecomp/fw_dictionary/remove_serviceList.htm"; - var postData={data: data}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){$scope.serviceListDictionaryDatas=data.serviceListDictionaryDatas;}); - }, - error : function(data){ - console.log(data); - modalService.showFailure("Fail","Error while deleting: "+ data.responseText); - } - }); - - }) - }; - -}); \ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/FWTermListDictGridController.js b/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/FWTermListDictGridController.js deleted file mode 100644 index 3ba588da9..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/FWTermListDictGridController.js +++ /dev/null @@ -1,159 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ECOMP Policy Engine - * ================================================================================ - * Copyright (C) 2017 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -/** - */ -app.controller('termListDictGridController', function ($scope, FWDictionaryService,modalService, $modal, PapUrlService){ - $( "#dialog" ).hide(); - - var papUrl; - PapUrlService.getPapUrl().then(function(data) { - var config = data; - papUrl = config.PAP_URL; - console.log(papUrl); - - FWDictionaryService.getTermListDictionaryData(papUrl).then(function (data) { - var j = data; - $scope.data = JSON.parse(j.data); - console.log($scope.data); - $scope.termListDictionaryDatas = JSON.parse($scope.data.termListDictionaryDatas); - console.log($scope.termListDictionaryDatas); - }, function (error) { - console.log("failed"); - }); - - - }); - - $scope.termListDictionaryGrid = { - data : 'termListDictionaryDatas', - enableFiltering: true, - exporterCsvFilename: 'TermList.csv', - enableGridMenu: true, - enableSelectAll: true, - columnDefs: [{ - field: 'id', enableFiltering: false, headerCellTemplate: '' + - '', - cellTemplate: - ' ' + - ' ', width: '8%' - },{ field: 'termName', displayName : 'Term-Name'}, - { field: 'termDescription', displayName : 'Term-Description' }, - { field: 'fromZone', displayName : 'From Zone' }, - {field: 'toZone', displayName : 'To Zone' }, - {field: 'srcIPList', displayName : 'Source-IP-List'}, - {field: 'destIPList',displayName : 'Destination-IP-List' }, - {field: 'srcPortList',displayName : 'Source-Port-List' }, - {field: 'destPortList',displayName : 'Destination-Port-List' }, - {field: 'action',displayName : 'Action List' }, - {field: 'userCreatedBy.userName',displayName : 'Created By' }, - {field: 'userModifiedBy.userName',displayName : 'Modified By'}, - {field: 'createdDate',type: 'date', cellFilter: 'date:\'yyyy-MM-dd\'' }, - {field: 'modifiedDate',type: 'date', cellFilter: 'date:\'yyyy-MM-dd\'' } - ], - exporterPdfDefaultStyle: {fontSize: 9}, - exporterPdfTableStyle: {margin: [30, 30, 30, 30]}, - exporterPdfTableHeaderStyle: {fontSize: 10, bold: true, italics: true, color: 'red'}, - exporterPdfHeader: { text: "My Header", style: 'headerStyle' }, - exporterPdfFooter: function ( currentPage, pageCount ) { - return { text: currentPage.toString() + ' of ' + pageCount.toString(), style: 'footerStyle' }; - }, - exporterPdfCustomFormatter: function ( docDefinition ) { - docDefinition.styles.headerStyle = { fontSize: 22, bold: true }; - docDefinition.styles.footerStyle = { fontSize: 10, bold: true }; - return docDefinition; - }, - exporterPdfOrientation: 'portrait', - exporterPdfPageSize: 'LETTER', - exporterPdfMaxGridWidth: 500, - exporterCsvLinkElement: angular.element(document.querySelectorAll(".custom-csv-link-location")), - onRegisterApi: function(gridApi){ - $scope.gridApi = gridApi; - } - }; - - $scope.editTermList = null; - $scope.createNewFWTermListWindow = function(){ - $scope.editTermList = null; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'add_fwTermList_popup.html', - controller: 'editFWTermListController', - resolve: { - message: function () { - var message = { - termListDictionaryDatas: $scope.editTermList - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.termListDictionaryDatas=response.termListDictionaryDatas; - }); - }; - - $scope.editFWTermListWindow = function(termListDictionaryData) { - $scope.editTermList = termListDictionaryData; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'add_fwTermList_popup.html', - controller: 'editFWTermListController', - resolve: { - message: function () { - var message = { - termListDictionaryData: $scope.editTermList - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.termListDictionaryDatas = response.termListDictionaryDatas; - }); - }; - - $scope.deleteFWTermList = function(data) { - modalService.popupConfirmWin("Confirm","You are about to delete the TermList "+data.termName+". Do you want to continue?", - function(){ - var uuu = papUrl + "/ecomp/fw_dictionary/remove_termList.htm"; - var postData={data: data}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){$scope.termListDictionaryDatas=data.termListDictionaryDatas;}); - }, - error : function(data){ - console.log(data); - modalService.showFailure("Fail","Error while deleting: "+ data.responseText); - } - }); - - }) - }; - - -}); \ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/FWZoneDictGridController.js b/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/FWZoneDictGridController.js deleted file mode 100644 index bbdd03c14..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/FWZoneDictGridController.js +++ /dev/null @@ -1,148 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ECOMP Policy Engine - * ================================================================================ - * Copyright (C) 2017 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -/** - */ -app.controller('zoneDictGridController', function ($scope, FWDictionaryService,modalService, $modal, PapUrlService){ - $( "#dialog" ).hide(); - - var papUrl; - PapUrlService.getPapUrl().then(function(data) { - var config = data; - papUrl = config.PAP_URL; - console.log(papUrl); - - FWDictionaryService.getZoneDictionaryData(papUrl).then(function (data) { - var j = data; - $scope.data = JSON.parse(j.data); - console.log($scope.data); - $scope.zoneDictionaryDatas = JSON.parse($scope.data.zoneDictionaryDatas); - console.log($scope.zoneDictionaryDatas); - }, function (error) { - console.log("failed"); - }); - - }); - - - $scope.zoneDictionaryGrid = { - data : 'zoneDictionaryDatas', - enableFiltering: true, - exporterCsvFilename: 'Zone.csv', - enableGridMenu: true, - enableSelectAll: true, - columnDefs: [{ - field: 'id', enableFiltering: false, headerCellTemplate: '' + - '', - cellTemplate: - ' ' + - ' ', width: '8%' - },{ field: 'zoneName', displayName : 'Zone Name'}, - { field: 'zoneValue', displayName : 'Zone Value' } - ], - exporterPdfDefaultStyle: {fontSize: 9}, - exporterPdfTableStyle: {margin: [30, 30, 30, 30]}, - exporterPdfTableHeaderStyle: {fontSize: 10, bold: true, italics: true, color: 'red'}, - exporterPdfHeader: { text: "My Header", style: 'headerStyle' }, - exporterPdfFooter: function ( currentPage, pageCount ) { - return { text: currentPage.toString() + ' of ' + pageCount.toString(), style: 'footerStyle' }; - }, - exporterPdfCustomFormatter: function ( docDefinition ) { - docDefinition.styles.headerStyle = { fontSize: 22, bold: true }; - docDefinition.styles.footerStyle = { fontSize: 10, bold: true }; - return docDefinition; - }, - exporterPdfOrientation: 'portrait', - exporterPdfPageSize: 'LETTER', - exporterPdfMaxGridWidth: 500, - exporterCsvLinkElement: angular.element(document.querySelectorAll(".custom-csv-link-location")), - onRegisterApi: function(gridApi){ - $scope.gridApi = gridApi; - } - }; - - $scope.editZoneName = null; - $scope.createNewFWZoneWindow = function(){ - $scope.editZoneName = null; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'add_FWZone_popup.html', - controller: 'editFWZoneController', - resolve: { - message: function () { - var message = { - zoneDictionaryDatas: $scope.editZoneName - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.zoneDictionaryDatas=response.zoneDictionaryDatas; - }); - }; - - $scope.editFWZoneWindow = function(zoneDictionaryData) { - $scope.editZoneName = zoneDictionaryData; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'add_FWZone_popup.html', - controller: 'editFWZoneController', - resolve: { - message: function () { - var message = { - zoneDictionaryData: $scope.editZoneName - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.zoneDictionaryDatas = response.zoneDictionaryDatas; - }); - }; - - $scope.deleteFWZone = function(data) { - modalService.popupConfirmWin("Confirm","You are about to delete the Zone Name "+data.zoneName+". Do you want to continue?", - function(){ - var uuu = papUrl + "/ecomp/fw_dictionary/remove_zone.htm"; - var postData={data: data}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){$scope.zoneDictionaryDatas=data.zoneDictionaryDatas;}); - }, - error : function(data){ - console.log(data); - modalService.showFailure("Fail","Error while deleting: "+ data.responseText); - } - }); - - }) - }; - - -}); \ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/MSConfigNameDictGridController.js b/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/MSConfigNameDictGridController.js deleted file mode 100644 index 15a296799..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/MSConfigNameDictGridController.js +++ /dev/null @@ -1,124 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ECOMP Policy Engine - * ================================================================================ - * Copyright (C) 2017 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -/** - */ -app.controller('msConfigNameDictGridController', function ($scope, MSDictionaryService,modalService, $modal, PapUrlService){ - $( "#dialog" ).hide(); - - var papUrl; - PapUrlService.getPapUrl().then(function(data) { - var config = data; - papUrl = config.PAP_URL; - console.log(papUrl); - - MSDictionaryService.getMSConfigNameDictionaryData(papUrl).then(function (data) { - var j = data; - $scope.data = JSON.parse(j.data); - console.log($scope.data); - $scope.microServiceCongigNameDictionaryDatas = JSON.parse($scope.data.microServiceCongigNameDictionaryDatas); - console.log($scope.microServiceCongigNameDictionaryDatas); - }, function (error) { - console.log("failed"); - }); - - }); - - - $scope.msConfigNameDictionaryGrid = { - data : 'microServiceCongigNameDictionaryDatas', - enableFiltering: true, - columnDefs: [{ - field: 'id', enableFiltering: false, headerCellTemplate: '' + - '', - cellTemplate: - ' ' + - ' ', width: '8%' - },{ field: 'name', displayName : 'Name'}, - { field: 'descriptionValue', displayName : 'Description' } - ] - }; - - $scope.editMSConfig = null; - $scope.createNewMSConfigNameWindow = function(){ - $scope.editMSConfig = null; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'add_msConfigName_popup.html', - controller: 'editMSConfigController', - resolve: { - message: function () { - var message = { - microServiceCongigNameDictionaryDatas: $scope.editMSConfig - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.microServiceCongigNameDictionaryDatas=response.microServiceCongigNameDictionaryDatas; - }); - }; - - $scope.editMSConfigNameWindow = function(microServiceCongigNameDictionaryData) { - $scope.editMSConfig = microServiceCongigNameDictionaryData; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'add_msConfigName_popup.html', - controller: 'editMSConfigController', - resolve: { - message: function () { - var message = { - microServiceCongigNameDictionaryData: $scope.editMSConfig - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.microServiceCongigNameDictionaryDatas = response.microServiceCongigNameDictionaryDatas; - }); - }; - - $scope.deleteMSConfigName = function(data) { - modalService.popupConfirmWin("Confirm","You are about to delete the Micro Service Config Name "+data.name+". Do you want to continue?", - function(){ - var uuu = papUrl + "/ecomp/ms_dictionary/remove_msConfigName.htm"; - var postData={data: data}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){$scope.microServiceCongigNameDictionaryDatas=data.microServiceCongigNameDictionaryDatas;}); - }, - error : function(data){ - console.log(data); - modalService.showFailure("Fail","Error while deleting: "+ data.responseText); - } - }); - - }) - }; -}); \ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/MSDcaeUUIDDictGridController.js b/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/MSDcaeUUIDDictGridController.js deleted file mode 100644 index 731731ff3..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/MSDcaeUUIDDictGridController.js +++ /dev/null @@ -1,124 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ECOMP Policy Engine - * ================================================================================ - * Copyright (C) 2017 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -/** - */ -app.controller('msDCAEUUIDDictGridController', function ($scope, MSDictionaryService,modalService, $modal, PapUrlService){ - $( "#dialog" ).hide(); - - var papUrl; - PapUrlService.getPapUrl().then(function(data) { - var config = data; - papUrl = config.PAP_URL; - console.log(papUrl); - - MSDictionaryService.getDCAEUUIDDictionaryData(papUrl).then(function (data) { - var j = data; - $scope.data = JSON.parse(j.data); - console.log($scope.data); - $scope.dcaeUUIDDictionaryDatas = JSON.parse($scope.data.dcaeUUIDDictionaryDatas); - console.log($scope.dcaeUUIDDictionaryDatas); - }, function (error) { - console.log("failed"); - }); - - }); - - $scope.dcaeUUIDDictionaryGrid = { - data : 'dcaeUUIDDictionaryDatas', - enableFiltering: true, - columnDefs: [{ - field: 'id', enableFiltering: false, headerCellTemplate: '' + - '', - cellTemplate: - ' ' + - ' ', width: '8%' - },{ field: 'name', displayName : 'Name'}, - { field: 'description' } - ] - }; - - $scope.editDCAEuuid = null; - $scope.createNewMSDCAEUUIDWindow = function(){ - $scope.editDCAEuuid = null; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'add_DCAEuuid_popup.html', - controller: 'editDCAEuuidController', - resolve: { - message: function () { - var message = { - dcaeUUIDDictionaryDatas: $scope.editDCAEuuid - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.dcaeUUIDDictionaryDatas=response.dcaeUUIDDictionaryDatas; - }); - }; - - $scope.editMSDCAEUUIDWindow = function(dcaeUUIDDictionaryData) { - $scope.editDCAEuuid = dcaeUUIDDictionaryData; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'add_DCAEuuid_popup.html', - controller: 'editDCAEuuidController', - resolve: { - message: function () { - var message = { - dcaeUUIDDictionaryData: $scope.editDCAEuuid - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.dcaeUUIDDictionaryDatas = response.dcaeUUIDDictionaryDatas; - }); - }; - - $scope.deleteMSDCAEUUID = function(data) { - modalService.popupConfirmWin("Confirm","You are about to delete the DCAE UUID : "+data.name+". Do you want to continue?", - function(){ - var uuu = papUrl + "/ecomp/ms_dictionary/remove_dcaeuuid.htm"; - var postData={data: data}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){$scope.dcaeUUIDDictionaryDatas=data.dcaeUUIDDictionaryDatas;}); - }, - error : function(data){ - console.log(data); - modalService.showFailure("Fail","Error while deleting: "+ data.responseText); - } - }); - - }) - }; - -}); \ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/MSLocationDictGridController.js b/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/MSLocationDictGridController.js deleted file mode 100644 index e3d7b1ab7..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/MSLocationDictGridController.js +++ /dev/null @@ -1,124 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ECOMP Policy Engine - * ================================================================================ - * Copyright (C) 2017 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -/** - */ -app.controller('msLocationDictGridController', function ($scope, MSDictionaryService,modalService, $modal, PapUrlService){ - $( "#dialog" ).hide(); - - var papUrl; - PapUrlService.getPapUrl().then(function(data) { - var config = data; - papUrl = config.PAP_URL; - console.log(papUrl); - - MSDictionaryService.getMSLocationDictionaryData(papUrl).then(function (data) { - var j = data; - $scope.data = JSON.parse(j.data); - console.log($scope.data); - $scope.microServiceLocationDictionaryDatas = JSON.parse($scope.data.microServiceLocationDictionaryDatas); - console.log($scope.microServiceLocationDictionaryDatas); - }, function (error) { - console.log("failed"); - }); - - }); - - $scope.msLocationDictionaryGrid = { - data : 'microServiceLocationDictionaryDatas', - enableFiltering: true, - columnDefs: [{ - field: 'id', enableFiltering: false, headerCellTemplate: '' + - '', - cellTemplate: - ' ' + - ' ', width: '8%' - },{ field: 'name', displayName : 'Name'}, - { field: 'descriptionValue', displayName : 'Description' } - ] - }; - - $scope.editMSLocation = null; - $scope.createNewMSLocationWindow = function(){ - $scope.editMSLocation = null; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'add_msLocation_popup.html', - controller: 'editMSLocationController', - resolve: { - message: function () { - var message = { - microServiceLocationDictionaryDatas: $scope.editMSLocation - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.microServiceLocationDictionaryDatas=response.microServiceLocationDictionaryDatas; - }); - }; - - $scope.editMSLocationWindow = function(microServiceLocationDictionaryData) { - $scope.editMSLocation = microServiceLocationDictionaryData; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'add_msLocation_popup.html', - controller: 'editMSLocationController', - resolve: { - message: function () { - var message = { - microServiceLocationDictionaryData: $scope.editMSLocation - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.microServiceLocationDictionaryDatas = response.microServiceLocationDictionaryDatas; - }); - }; - - $scope.deleteMSLocation = function(data) { - modalService.popupConfirmWin("Confirm","You are about to delete the Micro Service Location "+data.name+". Do you want to continue?", - function(){ - var uuu = papUrl + "/ecomp/ms_dictionary/remove_msLocation.htm"; - var postData={data: data}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){$scope.microServiceLocationDictionaryDatas=data.microServiceLocationDictionaryDatas;}); - }, - error : function(data){ - console.log(data); - modalService.showFailure("Fail","Error while deleting: "+ data.responseText); - } - }); - - }) - }; - -}); \ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/MSModelDictGridController.js b/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/MSModelDictGridController.js deleted file mode 100644 index 4556a8296..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/MSModelDictGridController.js +++ /dev/null @@ -1,124 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ECOMP Policy Engine - * ================================================================================ - * Copyright (C) 2017 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -/** - */ -app.controller('msModelsDictGridController', function ($scope, MSDictionaryService,modalService, $modal, PapUrlService){ - $( "#dialog" ).hide(); - - var papUrl; - PapUrlService.getPapUrl().then(function(data) { - var config = data; - papUrl = config.PAP_URL; - console.log(papUrl); - - MSDictionaryService.getMSModelDictionaryData(papUrl).then(function (data) { - var j = data; - $scope.data = JSON.parse(j.data); - console.log($scope.data); - $scope.microServiceModelsDictionaryDatas = JSON.parse($scope.data.microServiceModelsDictionaryDatas); - console.log($scope.microServiceModelsDictionaryDatas); - }, function (error) { - console.log("failed"); - }); - - }); - - $scope.msModelsDictionaryGrid = { - data : 'microServiceModelsDictionaryDatas', - enableFiltering: true, - columnDefs: [{ - field: 'id', enableFiltering: false, headerCellTemplate: '' + - '', - cellTemplate: - ' ', width: '8%' - },{ field: 'modelName', displayName : 'Micro Service Model'}, - { field: 'description' }, - { field: 'version', displayName : 'Model Version' }, - {field: 'userCreatedBy.userName', displayName : 'Imported By' } - ] - }; - $scope.editMSmodelName = null; - $scope.createNewMSModelsWindow = function(){ - $scope.editMSmodelName = null; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'add_msModel_popup.html', - controller: 'editMSModelController', - resolve: { - message: function () { - var message = { - microServiceModelsDictionaryDatas: $scope.editMSmodelName - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.microServiceModelsDictionaryDatas=response.microServiceModelsDictionaryDatas; - }); - }; - - $scope.editMSModelsWindow = function(microServiceModelsDictionaryData) { - $scope.editMSmodelName = microServiceModelsDictionaryData; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'add_msModel_popup.html', - controller: 'editMSModelController', - resolve: { - message: function () { - var message = { - microServiceModelsDictionaryData: $scope.editMSmodelName - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.microServiceModelsDictionaryDatas = response.microServiceModelsDictionaryDatas; - }); - }; - - $scope.deleteMSModels = function(data) { - modalService.popupConfirmWin("Confirm","You are about to delete the MicroService Model : "+data.modelName+". Do you want to continue?", - function(){ - var uuu = papUrl + "/ecomp/ms_dictionary/remove_msModel.htm"; - var postData={data: data}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){$scope.microServiceModelsDictionaryDatas=data.microServiceModelsDictionaryDatas;}); - }, - error : function(data){ - console.log(data); - modalService.showFailure("Fail","Error while deleting: "+ data.responseText); - } - }); - - }) - }; - -}); \ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/PSClosedLoopDictGridController.js b/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/PSClosedLoopDictGridController.js deleted file mode 100644 index ba64bc8e1..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/PSClosedLoopDictGridController.js +++ /dev/null @@ -1,123 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ECOMP Policy Engine - * ================================================================================ - * Copyright (C) 2017 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -/** - */ -app.controller('psClosedLoopDictGridController', function ($scope, PolicyScopeService,modalService, $modal, PapUrlService){ - $( "#dialog" ).hide(); - - var papUrl; - PapUrlService.getPapUrl().then(function(data) { - var config = data; - papUrl = config.PAP_URL; - console.log(papUrl); - - PolicyScopeService.getPSClosedLoopDictionaryData(papUrl).then(function (data) { - var j = data; - $scope.data = JSON.parse(j.data); - console.log($scope.data); - $scope.psClosedLoopDictionaryDatas = JSON.parse($scope.data.psClosedLoopDictionaryDatas); - console.log($scope.psClosedLoopDictionaryDatas); - }, function (error) { - console.log("failed"); - }); - - }); - - $scope.psClosedLoopDictionaryGrid = { - data : 'psClosedLoopDictionaryDatas', - enableFiltering: true, - columnDefs: [{ - field: 'id', enableFiltering: false, headerCellTemplate: '' + - '', - cellTemplate: - ' ' + - ' ', width: '8%' - },{ field: 'name', displayName : 'Closed Loop Name'}, - { field: 'descriptionValue' , displayName : 'Description'} - ] - }; - - $scope.editPSClosedLoop = null; - $scope.createNewPSClosedLoopWindow = function(){ - $scope.editPSClosedLoop = null; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'add_PSClosedLoop_popup.html', - controller: 'editPSClosedLoopController', - resolve: { - message: function () { - var message = { - psClosedLoopDictionaryDatas: $scope.editPSClosedLoop - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.psClosedLoopDictionaryDatas=response.psClosedLoopDictionaryDatas; - }); - }; - - $scope.editPSClosedLoopWindow = function(psClosedLoopDictionaryData) { - $scope.editPSClosedLoop = psClosedLoopDictionaryData; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'add_PSClosedLoop_popup.html', - controller: 'editPSClosedLoopController', - resolve: { - message: function () { - var message = { - psClosedLoopDictionaryData: $scope.editPSClosedLoop - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.psClosedLoopDictionaryDatas = response.psClosedLoopDictionaryDatas; - }); - }; - - $scope.deletePSClosedLoop = function(data) { - modalService.popupConfirmWin("Confirm","You are about to delete the Closed Loop "+data.name+". Do you want to continue?", - function(){ - var uuu = papUrl + "/ecomp/ps_dictionary/remove_PSClosedLoop.htm"; - var postData={data: data}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){$scope.psClosedLoopDictionaryDatas=data.psClosedLoopDictionaryDatas;}); - }, - error : function(data){ - console.log(data); - modalService.showFailure("Fail","Error while deleting: "+ data.responseText); - } - }); - - }) - }; -}); \ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/PSGroupPolicyScopeDictGridController.js b/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/PSGroupPolicyScopeDictGridController.js deleted file mode 100644 index 756be7661..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/PSGroupPolicyScopeDictGridController.js +++ /dev/null @@ -1,127 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ECOMP Policy Engine - * ================================================================================ - * Copyright (C) 2017 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -/** - */ -app.controller('psGroupPolicyScopeDictGridController', function ($scope, PolicyScopeService,modalService, $modal, PapUrlService){ - $( "#dialog" ).hide(); - - var papUrl; - PapUrlService.getPapUrl().then(function(data) { - var config = data; - papUrl = config.PAP_URL; - console.log(papUrl); - - PolicyScopeService.getPSGroupPolicyScopeDictionaryData(papUrl).then(function (data) { - var j = data; - $scope.data = JSON.parse(j.data); - console.log($scope.data); - $scope.groupPolicyScopeListDatas = JSON.parse($scope.data.groupPolicyScopeListDatas); - console.log($scope.groupPolicyScopeListDatas); - }, function (error) { - console.log("failed"); - }); - - }); - - $scope.psGroupPolicyScopeDictionaryGrid = { - data : 'groupPolicyScopeListDatas', - enableFiltering: true, - columnDefs: [{ - field: 'id', enableFiltering: false, headerCellTemplate: '' + - '', - cellTemplate: - ' ' + - ' ', width: '8%' - },{ field: 'groupName', displayName : 'Policy Scope Group Name'}, - { field: 'groupList', displayName : 'Policy Scope List'} - ], - onRegisterApi: function(gridApi){ - $scope.gridApi = gridApi; - $scope.gridApi.core.refresh(); - } - }; - - $scope.editPSGroupPolicyScope = null; - $scope.createNewGroupPolicyScopeWindow = function(){ - $scope.editPSGroupPolicyScope = null; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'add_PSGroupPolicyScope_popup.html', - controller: 'editPSGroupPolicyScopeController', - resolve: { - message: function () { - var message = { - groupPolicyScopeListDatas: $scope.editPSGroupPolicyScope - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.groupPolicyScopeListDatas=response.groupPolicyScopeListDatas; - }); - }; - - $scope.editGroupPolicyScopeWindow = function(groupPolicyScopeListData) { - $scope.editPSGroupPolicyScope = groupPolicyScopeListData; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'add_PSGroupPolicyScope_popup.html', - controller: 'editPSGroupPolicyScopeController', - resolve: { - message: function () { - var message = { - groupPolicyScopeListData: $scope.editPSGroupPolicyScope - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.groupPolicyScopeListDatas = response.groupPolicyScopeListDatas; - }); - }; - - $scope.deleteGroupPolicyScope = function(data) { - modalService.popupConfirmWin("Confirm","You are about to delete the Group Policy Scope "+data.name+". Do you want to continue?", - function(){ - var uuu = papUrl + "/ecomp/ps_dictionary/remove_GroupPolicyScope.htm"; - var postData={data: data}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){$scope.groupPolicyScopeListDatas=data.groupPolicyScopeListDatas;}); - }, - error : function(data){ - console.log(data); - modalService.showFailure("Fail","Error while deleting: "+ data.responseText); - } - }); - - }) - }; -}); \ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/PSResourceDictGridController.js b/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/PSResourceDictGridController.js deleted file mode 100644 index e4ad05263..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/PSResourceDictGridController.js +++ /dev/null @@ -1,123 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ECOMP Policy Engine - * ================================================================================ - * Copyright (C) 2017 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -/** - */ -app.controller('psResourceDictGridController', function ($scope, PolicyScopeService,modalService, $modal, PapUrlService){ - $( "#dialog" ).hide(); - - var papUrl; - PapUrlService.getPapUrl().then(function(data) { - var config = data; - papUrl = config.PAP_URL; - console.log(papUrl); - - PolicyScopeService.getPSResourceDictionaryData(papUrl).then(function (data) { - var j = data; - $scope.data = JSON.parse(j.data); - console.log($scope.data); - $scope.psResourceDictionaryDatas = JSON.parse($scope.data.psResourceDictionaryDatas); - console.log($scope.psResourceDictionaryDatas); - }, function (error) { - console.log("failed"); - }); - - }); - - $scope.psResourceDictionaryGrid = { - data : 'psResourceDictionaryDatas', - enableFiltering: true, - columnDefs: [{ - field: 'id', enableFiltering: false, headerCellTemplate: '' + - '', - cellTemplate: - ' ' + - ' ', width: '8%' - },{ field: 'name', displayName : 'Resource Name'}, - { field: 'descriptionValue' } - ] - }; - - $scope.editPSResource = null; - $scope.createNewPSResourceWindow = function(){ - $scope.editPSResource = null; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'add_PSResource_popup.html', - controller: 'editPSResourceController', - resolve: { - message: function () { - var message = { - psResourceDictionaryDatas: $scope.editPSResource - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.psResourceDictionaryDatas=response.psResourceDictionaryDatas; - }); - }; - - $scope.editPSResourceWindow = function(psResourceDictionaryData) { - $scope.editPSResource = psResourceDictionaryData; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'add_PSResource_popup.html', - controller: 'editPSResourceController', - resolve: { - message: function () { - var message = { - psResourceDictionaryData: $scope.editPSResource - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.psResourceDictionaryDatas = response.psResourceDictionaryDatas; - }); - }; - - $scope.deletePSResource = function(data) { - modalService.popupConfirmWin("Confirm","You are about to delete the Resource "+data.name+". Do you want to continue?", - function(){ - var uuu = papUrl + "/ecomp/ps_dictionary/remove_PSResource.htm"; - var postData={data: data}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){$scope.psResourceDictionaryDatas=data.psResourceDictionaryDatas;}); - }, - error : function(data){ - console.log(data); - modalService.showFailure("Fail","Error while deleting: "+ data.responseText); - } - }); - - }) - }; -}); \ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/PSServiceDictGridController.js b/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/PSServiceDictGridController.js deleted file mode 100644 index ac16a3eb2..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/PSServiceDictGridController.js +++ /dev/null @@ -1,122 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ECOMP Policy Engine - * ================================================================================ - * Copyright (C) 2017 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -/** - */ -app.controller('psServiceDictGridController', function ($scope, PolicyScopeService,modalService, $modal, PapUrlService){ - $( "#dialog" ).hide(); - - var papUrl; - PapUrlService.getPapUrl().then(function(data) { - var config = data; - papUrl = config.PAP_URL; - console.log(papUrl); - - PolicyScopeService.getPSServiceDictionaryData(papUrl).then(function (data) { - var j = data; - $scope.data = JSON.parse(j.data); - console.log($scope.data); - $scope.psServiceDictionaryDatas = JSON.parse($scope.data.psServiceDictionaryDatas); - console.log($scope.psServiceDictionaryDatas); - }, function (error) { - console.log("failed"); - }); - }); - - $scope.psServiceDictionaryGrid = { - data : 'psServiceDictionaryDatas', - enableFiltering: true, - columnDefs: [{ - field: 'id', enableFiltering: false, headerCellTemplate: '' + - '', - cellTemplate: - ' ' + - ' ', width: '8%' - },{ field: 'name', displayName : 'Service Name'}, - { field: 'descriptionValue' } - ] - }; - - $scope.editPSService = null; - $scope.createNewPSServiceWindow = function(){ - $scope.editPSService = null; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'add_PSService_popup.html', - controller: 'editPSServiceController', - resolve: { - message: function () { - var message = { - psServiceDictionaryDatas: $scope.editPSService - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.psServiceDictionaryDatas=response.psServiceDictionaryDatas; - }); - }; - - $scope.editPSServiceWindow = function(psServiceDictionaryData) { - $scope.editPSService = psServiceDictionaryData; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'add_PSService_popup.html', - controller: 'editPSServiceController', - resolve: { - message: function () { - var message = { - psServiceDictionaryData: $scope.editPSService - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.psServiceDictionaryDatas = response.psServiceDictionaryDatas; - }); - }; - - $scope.deletePSService = function(data) { - modalService.popupConfirmWin("Confirm","You are about to delete the Port List "+data.name+". Do you want to continue?", - function(){ - var uuu = papUrl + "/ecomp/ps_dictionary/remove_PSService.htm"; - var postData={data: data}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){$scope.psServiceDictionaryDatas=data.psServiceDictionaryDatas;}); - }, - error : function(data){ - console.log(data); - modalService.showFailure("Fail","Error while deleting: "+ data.responseText); - } - }); - - }) - }; -}); \ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/PSTypeDictGridController.js b/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/PSTypeDictGridController.js deleted file mode 100644 index e66b58931..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/PSTypeDictGridController.js +++ /dev/null @@ -1,122 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ECOMP Policy Engine - * ================================================================================ - * Copyright (C) 2017 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -/** - */ -app.controller('psTypeDictGridController', function ($scope, PolicyScopeService,modalService, $modal, PapUrlService){ - $( "#dialog" ).hide(); - - var papUrl; - PapUrlService.getPapUrl().then(function(data) { - var config = data; - papUrl = config.PAP_URL; - console.log(papUrl); - - PolicyScopeService.getPSTypeDictionaryData(papUrl).then(function (data) { - var j = data; - $scope.data = JSON.parse(j.data); - console.log($scope.data); - $scope.psTypeDictionaryDatas = JSON.parse($scope.data.psTypeDictionaryDatas); - console.log($scope.psTypeDictionaryDatas); - }, function (error) { - console.log("failed"); - }); - }); - - $scope.psTypeDictionaryGrid = { - data : 'psTypeDictionaryDatas', - enableFiltering: true, - columnDefs: [{ - field: 'id', enableFiltering: false, headerCellTemplate: '' + - '', - cellTemplate: - ' ' + - ' ', width: '8%' - },{ field: 'name', displayName : 'Type Name'}, - { field: 'descriptionValue' } - ] - }; - - $scope.editPSType = null; - $scope.createPSTypeWindow = function(){ - $scope.editPSType = null; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'add_PSType_popup.html', - controller: 'editPSTypeController', - resolve: { - message: function () { - var message = { - psTypeDictionaryDatas: $scope.editPSType - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.psTypeDictionaryDatas=response.psTypeDictionaryDatas; - }); - }; - - $scope.editPSTypeWindow = function(psTypeDictionaryData) { - $scope.editPSType = psTypeDictionaryData; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'add_PSType_popup.html', - controller: 'editPSTypeController', - resolve: { - message: function () { - var message = { - psTypeDictionaryData: $scope.editPSType - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.psTypeDictionaryDatas = response.psTypeDictionaryDatas; - }); - }; - - $scope.deletePSType = function(data) { - modalService.popupConfirmWin("Confirm","You are about to delete the Type "+data.name+". Do you want to continue?", - function(){ - var uuu = papUrl + "/ecomp/ps_dictionary/remove_PSType.htm"; - var postData={data: data}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){$scope.psTypeDictionaryDatas=data.psTypeDictionaryDatas;}); - }, - error : function(data){ - console.log(data); - modalService.showFailure("Fail","Error while deleting: "+ data.responseText); - } - }); - - }) - }; -}); \ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/RiskTypeDictGridController.js b/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/RiskTypeDictGridController.js deleted file mode 100644 index d22a1ce48..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/RiskTypeDictGridController.js +++ /dev/null @@ -1,152 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ECOMP Policy Engine - * ================================================================================ - * Copyright (C) 2017 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -/** - */ -app.controller('riskTypeDictGridController', function ($scope, SafePolicyService,modalService,PapUrlService, $modal, uiGridConstants,Grid){ - $( "#dialog" ).hide(); - - var papUrl; - PapUrlService.getPapUrl().then(function(data) { - var config = data; - papUrl = config.PAP_URL; - console.log(papUrl); - - SafePolicyService.getRiskTypeDictionaryData(papUrl).then(function (data) { - var j = data; - $scope.data = JSON.parse(j.data); - console.log($scope.data); - $scope.riskTypeDictionaryDatas = JSON.parse($scope.data.riskTypeDictionaryDatas); - console.log($scope.riskTypeDictionaryDatas); - }, function (error) { - console.log("failed"); - }); - }); - - $scope.riskTypeDictionaryGrid = { - data : 'riskTypeDictionaryDatas', - enableFiltering: true, - exporterCsvFilename: 'RiskType.csv', - enableGridMenu: true, - enableSelectAll: true, - columnDefs: [{ - field: 'id', enableFiltering: false, headerCellTemplate: '' + - '', - cellTemplate: - ' ' + - ' ', width: '8%' - }, - { field: 'riskName', displayName : 'Risk Type Name' }, - { field: 'description', width: '20%' }, - {field: 'userCreatedBy.userName', displayName : 'Created By'}, - {field: 'userModifiedBy.userName', displayName : 'Modified By' }, - {field: 'createdDate',type: 'date', cellFilter: 'date:\'yyyy-MM-dd\''}, - {field: 'modifiedDate',type: 'date', cellFilter: 'date:\'yyyy-MM-dd\''} - ], - enableColumnResize : true, - exporterPdfDefaultStyle: {fontSize: 9}, - exporterPdfTableStyle: {margin: [30, 30, 30, 30]}, - exporterPdfTableHeaderStyle: {fontSize: 10, bold: true, italics: true, color: 'red'}, - exporterPdfHeader: { text: "My Header", style: 'headerStyle' }, - exporterPdfFooter: function ( currentPage, pageCount ) { - return { text: currentPage.toString() + ' of ' + pageCount.toString(), style: 'footerStyle' }; - }, - exporterPdfCustomFormatter: function ( docDefinition ) { - docDefinition.styles.headerStyle = { fontSize: 22, bold: true }; - docDefinition.styles.footerStyle = { fontSize: 10, bold: true }; - return docDefinition; - }, - exporterPdfOrientation: 'portrait', - exporterPdfPageSize: 'LETTER', - exporterPdfMaxGridWidth: 500, - exporterCsvLinkElement: angular.element(document.querySelectorAll(".custom-csv-link-location")), - onRegisterApi: function(gridApi){ - $scope.gridApi = gridApi; - } - }; - - - $scope.editRiskType = null; - $scope.createNewRiskType = function(){ - $scope.editRiskType = null; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'add_riskType_popup.html', - controller: 'editRiskTypeController', - resolve: { - message: function () { - var message = { - riskTypeDictionaryDatas: $scope.editRiskType - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.riskTypeDictionaryDatas=response.riskTypeDictionaryDatas; - }); - }; - - $scope.editRiskTypeWindow = function(riskTypeDictionaryData) { - $scope.editRiskType = riskTypeDictionaryData; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'add_riskType_popup.html', - controller: 'editRiskTypeController', - resolve: { - message: function () { - var message = { - riskTypeDictionaryData: $scope.editRiskType - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.riskTypeDictionaryDatas = response.riskTypeDictionaryData; - }); - }; - - $scope.deleteRiskType = function(data) { - modalService.popupConfirmWin("Confirm","You are about to delete the Ecomp Name "+data.riskType+". Do you want to continue?", - function(){ - var uuu = papUrl + "/ecomp/sp_dictionary/remove_riskType.htm"; - var postData={data: data}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){$scope.riskTypeDictionaryDatas=data.riskTypeDictionaryDatas;}); - }, - error : function(data){ - console.log(data); - modalService.showFailure("Fail","Error while deleting: "+ data.responseText); - } - }); - - }) - }; - -}); \ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/SafePolicyWarningDictGridController.js b/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/SafePolicyWarningDictGridController.js deleted file mode 100644 index 303ae5704..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/SafePolicyWarningDictGridController.js +++ /dev/null @@ -1,127 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ECOMP Policy Engine - * ================================================================================ - * Copyright (C) 2017 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -/** - */ -app.controller('safePolicyWarningDictGridController', function ($scope, SafePolicyService,modalService, $modal, PapUrlService){ - $( "#dialog" ).hide(); - - var papUrl; - PapUrlService.getPapUrl().then(function(data) { - var config = data; - papUrl = config.PAP_URL; - console.log(papUrl); - - SafePolicyService.getSafePolicyWarningDictionaryData(papUrl).then(function (data) { - var j = data; - $scope.data = JSON.parse(j.data); - console.log($scope.data); - $scope.safePolicyWarningDatas = JSON.parse($scope.data.safePolicyWarningDatas); - console.log($scope.safePolicyWarningDatas); - }, function (error) { - console.log("failed"); - }); - - }); - - $scope.safePolicyWarningDictionaryGrid = { - data : 'safePolicyWarningDatas', - enableFiltering: true, - columnDefs: [{ - field: 'id', enableFiltering: false, headerCellTemplate: '' + - '', - cellTemplate: - ' ' + - ' ', width: '8%' - },{ field: 'name', displayName : 'Safe Policy Warning Name'}, - { field: 'riskType', displayName : 'Risk Type'},{ field: 'message', displayName : 'Message'} - ], - onRegisterApi: function(gridApi){ - $scope.gridApi = gridApi; - $scope.gridApi.core.refresh(); - } - }; - - $scope.editSafePolicyWarning = null; - $scope.createNewSafePolicyWarningWindow = function(){ - $scope.editSafePolicyWarning = null; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'add_SafePolicyWarning_popup.html', - controller: 'editSafePolicyWarningController', - resolve: { - message: function () { - var message = { - safePolicyWarningDatas: $scope.editSafePolicyWarningScope - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.safePolicyWarningDatas=response.safePolicyWarningDatas; - }); - }; - - $scope.editSafePolicyWarningWindow = function(safePolicyWarningData) { - $scope.editSafePolicyWarning = safePolicyWarningData; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'add_SafePolicyWarning_popup.html', - controller: 'editSafePolicyWarningController', - resolve: { - message: function () { - var message = { - safePolicyWarningData: $scope.editSafePolicyWarning - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.groupPolicyScopeListDatas = response.safePolicyWarningData; - }); - }; - - $scope.deleteSafePolicyWarning = function(data) { - modalService.popupConfirmWin("Confirm","You are about to delete the Safe Policy Warning "+data.name+". Do you want to continue?", - function(){ - var uuu = papUrl + "/ecomp/sp_dictionary/remove_SafePolicyWarning.htm"; - var postData={data: data}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){$scope.safePolicyWarningDatas=data.safePolicyWarningDatas;}); - }, - error : function(data){ - console.log(data); - modalService.showFailure("Fail","Error while deleting: "+ data.responseText); - } - }); - - }) - }; -}); \ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/actionPolicyDictGridController.js b/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/actionPolicyDictGridController.js deleted file mode 100644 index 223aec6cf..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/actionPolicyDictGridController.js +++ /dev/null @@ -1,161 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ECOMP Policy Engine - * ================================================================================ - * Copyright (C) 2017 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -/** - */ -var Actiontype = ["REST"]; -app.controller('actionPolicyDictGridController', function ($scope, DictionaryService,modalService, $modal, uiGridConstants,Grid, PapUrlService){ - $( "#dialog" ).hide(); - $scope.type = Actiontype; - - var papUrl; - PapUrlService.getPapUrl().then(function(data) { - var config = data; - papUrl = config.PAP_URL; - console.log(papUrl); - - DictionaryService.getActionPolicyDictionaryData(papUrl).then(function (data) { - var j = data; - $scope.data = JSON.parse(j.data); - console.log($scope.data); - $scope.actionPolicyDictionaryDatas = JSON.parse($scope.data.actionPolicyDictionaryDatas); - console.log($scope.actionPolicyDictionaryDatas); - }, function (error) { - console.log("failed"); - }); - - }); - - $scope.actionPolicyDictionaryGrid = { - enableFiltering: true, - data: 'actionPolicyDictionaryDatas', - exporterCsvFilename: 'ActionPolicyDictionary.csv', - enableGridMenu: true, - enableSelectAll: true, - columnDefs: [{ - field: 'id', - enableFiltering: false, - headerCellTemplate: '' + - '', - cellTemplate: ' ' + - ' ', - width: '8%' - }, - {field: 'attributeName', displayName: 'Attribute Name'}, - {field: 'type'}, - {field: 'url'}, - {field: 'method'}, - {field: 'header', displayName: 'Headers'}, - {field: 'description'}, - {field: 'userCreatedBy.userName', displayName: 'Created By'}, - {field: 'userModifiedBy.userName', displayName: 'Modified By'}, - {field: 'createdDate', type: 'date', cellFilter: 'date:\'yyyy-MM-dd\''}, - {field: 'modifiedDate', type: 'date', cellFilter: 'date:\'yyyy-MM-dd\''} - ], - exporterPdfDefaultStyle: {fontSize: 9}, - exporterPdfTableStyle: {margin: [30, 30, 30, 30]}, - exporterPdfTableHeaderStyle: {fontSize: 10, bold: true, italics: true, color: 'red'}, - exporterPdfHeader: { text: "My Header", style: 'headerStyle' }, - exporterPdfFooter: function ( currentPage, pageCount ) { - return { text: currentPage.toString() + ' of ' + pageCount.toString(), style: 'footerStyle' }; - }, - exporterPdfCustomFormatter: function ( docDefinition ) { - docDefinition.styles.headerStyle = { fontSize: 22, bold: true }; - docDefinition.styles.footerStyle = { fontSize: 10, bold: true }; - return docDefinition; - }, - exporterPdfOrientation: 'portrait', - exporterPdfPageSize: 'LETTER', - exporterPdfMaxGridWidth: 500, - exporterCsvLinkElement: angular.element(document.querySelectorAll(".custom-csv-link-location")), - onRegisterApi: function(gridApi){ - $scope.gridApi = gridApi; - } - }; - - - $scope.editActionPolicyName = null; - $scope.createNewActionPolicyDictWindow = function () { - $scope.editActionPolicyName = null; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl: 'add_actionPolicyDict_popup.html', - controller: 'editActionPolicyDictController', - resolve: { - message: function () { - var message = { - actionPolicyDictionaryDatas: $scope.editActionPolicyName - }; - return message; - } - } - }); - modalInstance.result.then(function (response) { - console.log('response', response); - $scope.actionPolicyDictionaryDatas = response.actionPolicyDictionaryDatas; - }); - }; - - $scope.editActionPolicyDictWindow = function (actionPolicyDictionaryData) { - $scope.editActionPolicyName = actionPolicyDictionaryData; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl: 'add_actionPolicyDict_popup.html', - controller: 'editActionPolicyDictController', - resolve: { - message: function () { - var message = { - actionPolicyDictionaryData: $scope.editActionPolicyName - }; - return message; - } - } - }); - modalInstance.result.then(function (response) { - console.log('response', response); - $scope.actionPolicyDictionaryDatas = response.actionPolicyDictionaryDatas; - }); - }; - - $scope.deleteActionPolicyDict = function (data) { - modalService.popupConfirmWin("Confirm", "You are about to delete the Action Policy Dictionary Item " + data.attributeName + ". Do you want to continue?", - function () { - var uuu = papUrl + "/ecomp/action_dictionary/remove_actionPolicyDict.htm"; - var postData = {data: data}; - $.ajax({ - type: 'POST', - url: uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success: function (data) { - $scope.$apply(function () { - $scope.actionPolicyDictionaryDatas = data.actionPolicyDictionaryDatas; - }); - }, - error: function (data) { - console.log(data); - modalService.showFailure("Fail", "Error while deleting: " + data.responseText); - } - }); - - }) - }; -}); \ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/attributeDictGridController.js b/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/attributeDictGridController.js deleted file mode 100644 index 5405bb0d7..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/attributeDictGridController.js +++ /dev/null @@ -1,159 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ECOMP Policy Engine - * ================================================================================ - * Copyright (C) 2017 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -/** - */ -app.controller('attributeDictGridController', function ($scope, DictionaryService, PapUrlService, modalService, $modal){ - $( "#dialog" ).hide(); - var papUrl; - PapUrlService.getPapUrl().then(function(data) { - var config = data; - papUrl = config.PAP_URL; - console.log(papUrl); - DictionaryService.getAttributeDictionaryData(papUrl).then(function (data) { - var j = data; - $scope.data = JSON.parse(j.data); - console.log($scope.data); - $scope.attributeDictionaryDatas = JSON.parse($scope.data.attributeDictionaryDatas); - console.log($scope.attributeDictionaryDatas); - }, function (error) { - console.log("failed"); - }); - }); - - $scope.exportData = function () { - var blob = new Blob([document.getElementById('attributeTable').innerHTML], { - type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8" - }); - saveAs(blob, "Attribute.xls"); - }; - - $scope.attributeDictionaryGrid = { - data : 'attributeDictionaryDatas', - enableFiltering: true, - exporterCsvFilename: 'Attribute.csv', - enableGridMenu: true, - enableSelectAll: true, - columnDefs: [{ - field: 'id' , enableFiltering: false, headerCellTemplate: '' + - '', - cellTemplate: - ' ' + - ' ', width: '8%' - },{ field: 'xacmlId', displayName : 'Attribute ID'}, - { field: 'datatypeBean.shortName', displayName : 'Data Type' }, - { field: 'attributeValue'}, - { field: 'description' }, - { field: 'priority' , displayName : 'Priority'}, - {field: 'userCreatedBy.userName', displayName : 'Created By' }, - {field: 'userModifiedBy.userName', displayName : 'Modified By'}, - {field: 'createdDate',type: 'date', cellFilter: 'date:\'yyyy-MM-dd\'' }, - {field: 'modifiedDate',type: 'date', cellFilter: 'date:\'yyyy-MM-dd\'' } - ], - exporterPdfDefaultStyle: {fontSize: 9}, - exporterPdfTableStyle: {margin: [30, 30, 30, 30]}, - exporterPdfTableHeaderStyle: {fontSize: 10, bold: true, italics: true, color: 'red'}, - exporterPdfHeader: { text: "My Header", style: 'headerStyle' }, - exporterPdfFooter: function ( currentPage, pageCount ) { - return { text: currentPage.toString() + ' of ' + pageCount.toString(), style: 'footerStyle' }; - }, - exporterPdfCustomFormatter: function ( docDefinition ) { - docDefinition.styles.headerStyle = { fontSize: 22, bold: true }; - docDefinition.styles.footerStyle = { fontSize: 10, bold: true }; - return docDefinition; - }, - exporterPdfOrientation: 'portrait', - exporterPdfPageSize: 'LETTER', - exporterPdfMaxGridWidth: 500, - exporterCsvLinkElement: angular.element(document.querySelectorAll(".custom-csv-link-location")), - onRegisterApi: function(gridApi){ - $scope.gridApi = gridApi; - } - }; - - - $scope.editAttributeName = null; - $scope.createNewAttributeWindow = function(){ - $scope.editAttributeName = null; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'add_Attribute_popup.html', - controller: 'editAttributeController', - resolve: { - message: function () { - var message = { - attributeDictionaryDatas: $scope.editAttributeName - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.attributeDictionaryDatas=response.attributeDictionaryDatas; - }); - }; - - $scope.editAttributeWindow = function(attributeDictionaryData) { - $scope.editAttributeName = attributeDictionaryData; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'add_Attribute_popup.html', - controller: 'editAttributeController', - resolve: { - message: function () { - var message = { - attributeDictionaryData: $scope.editAttributeName - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.attributeDictionaryDatas = response.attributeDictionaryDatas; - }); - }; - - $scope.deleteAttribute = function(data) { - modalService.popupConfirmWin("Confirm","You are about to delete the Attribute Dictionary : "+data.xacmlId+". \n "+searchString+" \n Do you want to continue?", - function(){ - var uuu = papUrl + "/ecomp/attribute_dictionary/remove_attribute.htm"; - var postData={data: data}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){$scope.attributeDictionaryDatas=data.attributeDictionaryDatas;}); - }, - error : function(data){ - console.log(data); - modalService.showFailure("Fail","Error while deleting: "+ data.responseText); - } - }); - - }) - }; - - -}); \ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/ecompNameDictGridController.js b/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/ecompNameDictGridController.js deleted file mode 100644 index 3ae3ee21d..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/controller/dictionaryGridController/ecompNameDictGridController.js +++ /dev/null @@ -1,152 +0,0 @@ -/*- - * ============LICENSE_START======================================================= - * ECOMP Policy Engine - * ================================================================================ - * Copyright (C) 2017 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. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============LICENSE_END========================================================= - */ - -/** - */ -app.controller('ecompNameDictGridController', function ($scope, DictionaryService,modalService,PapUrlService, $modal, uiGridConstants,Grid){ - $( "#dialog" ).hide(); - - var papUrl; - PapUrlService.getPapUrl().then(function(data) { - var config = data; - papUrl = config.PAP_URL; - console.log(papUrl); - - DictionaryService.getEcompDictionaryData(papUrl).then(function (data) { - var j = data; - $scope.data = JSON.parse(j.data); - console.log($scope.data); - $scope.ecompNameDictionaryDatas = JSON.parse($scope.data.ecompNameDictionaryDatas); - console.log($scope.ecompNameDictionaryDatas); - }, function (error) { - console.log("failed"); - }); - }); - - $scope.ecompNameDictionaryGrid = { - data : 'ecompNameDictionaryDatas', - enableFiltering: true, - exporterCsvFilename: 'EcompName.csv', - enableGridMenu: true, - enableSelectAll: true, - columnDefs: [{ - field: 'id', enableFiltering: false, headerCellTemplate: '' + - '', - cellTemplate: - ' ' + - ' ', width: '8%' - }, - { field: 'ecompName', displayName : 'Ecomp Name' }, - { field: 'description', width: '20%' }, - {field: 'userCreatedBy.userName', displayName : 'Created By'}, - {field: 'userModifiedBy.userName', displayName : 'Modified By' }, - {field: 'createdDate',type: 'date', cellFilter: 'date:\'yyyy-MM-dd\''}, - {field: 'modifiedDate',type: 'date', cellFilter: 'date:\'yyyy-MM-dd\''} - ], - enableColumnResize : true, - exporterPdfDefaultStyle: {fontSize: 9}, - exporterPdfTableStyle: {margin: [30, 30, 30, 30]}, - exporterPdfTableHeaderStyle: {fontSize: 10, bold: true, italics: true, color: 'red'}, - exporterPdfHeader: { text: "My Header", style: 'headerStyle' }, - exporterPdfFooter: function ( currentPage, pageCount ) { - return { text: currentPage.toString() + ' of ' + pageCount.toString(), style: 'footerStyle' }; - }, - exporterPdfCustomFormatter: function ( docDefinition ) { - docDefinition.styles.headerStyle = { fontSize: 22, bold: true }; - docDefinition.styles.footerStyle = { fontSize: 10, bold: true }; - return docDefinition; - }, - exporterPdfOrientation: 'portrait', - exporterPdfPageSize: 'LETTER', - exporterPdfMaxGridWidth: 500, - exporterCsvLinkElement: angular.element(document.querySelectorAll(".custom-csv-link-location")), - onRegisterApi: function(gridApi){ - $scope.gridApi = gridApi; - } - }; - - - $scope.editEcompName = null; - $scope.createNewEcompName = function(){ - $scope.editEcompName = null; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'add_ecompName_popup.html', - controller: 'editEcompNameController', - resolve: { - message: function () { - var message = { - ecompNameDictionaryDatas: $scope.editEcompName - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.ecompNameDictionaryDatas=response.ecompNameDictionaryDatas; - }); - }; - - $scope.editEcompNameWindow = function(ecompNameDictionaryData) { - $scope.editEcompName = ecompNameDictionaryData; - var modalInstance = $modal.open({ - backdrop: 'static', keyboard: false, - templateUrl : 'add_ecompName_popup.html', - controller: 'editEcompNameController', - resolve: { - message: function () { - var message = { - ecompNameDictionaryData: $scope.editEcompName - }; - return message; - } - } - }); - modalInstance.result.then(function(response){ - console.log('response', response); - $scope.ecompNameDictionaryDatas = response.ecompNameDictionaryDatas; - }); - }; - - $scope.deleteEcompName = function(data) { - modalService.popupConfirmWin("Confirm","You are about to delete the Ecomp Name "+data.ecompName+". Do you want to continue?", - function(){ - var uuu = papUrl + "/ecomp/ecomp_dictionary/remove_ecomp.htm"; - var postData={data: data}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){$scope.ecompNameDictionaryDatas=data.ecompNameDictionaryDatas;}); - }, - error : function(data){ - console.log(data); - modalService.showFailure("Fail","Error while deleting: "+ data.responseText); - } - }); - - }) - }; - -}); \ No newline at end of file -- cgit 1.2.3-korg