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 --- .../ActionPolicyController.js | 175 ----- .../BRMSParamPolicyController.js | 210 ------ .../BRMSRawPolicyController.js | 147 ---- .../BaseConfigPolicyController.js | 185 ----- .../ClosedLoopFaultController.js | 790 --------------------- .../ClosedLoopPMController.js | 178 ----- .../DCAEMicroServicePolicyController.js | 694 ------------------ .../DecisionPolicyController.js | 212 ------ .../ExportPolicyController.js | 108 --- .../FirewallPolicyController.js | 234 ------ .../PolicyDictionaryService.js | 522 -------------- .../PolicyTemplates/ActionPolicyTemplate.html | 103 --- .../PolicyTemplates/BRMSParamPolicyTemplate.html | 112 --- .../PolicyTemplates/BRMSRawPolicyTemplate.html | 99 --- .../Editor/PolicyTemplates/BasePolicyTemplate.html | 126 ---- .../ClosedLoopFaultPolicyTemplate.html | 350 --------- .../ClosedLoopPMPolicyTemplate.html | 141 ---- .../DCAEMicroServicePolicyTemplate.html | 108 --- .../PolicyTemplates/DecisionPolicyTemplate.html | 130 ---- .../PolicyTemplates/DescribePolicyTemplate.html | 50 -- .../PolicyTemplates/ExportPolicyTemplate.html | 35 - .../PolicyTemplates/FirewallPolicyTemplate.html | 116 --- .../Editor/PolicyTemplates/PolicyTypeTemplate.html | 79 --- .../policy-models/Editor/css/normalize-legacy.css | 545 -------------- .../policy-models/Editor/css/normalize.css | 439 ------------ .../policyApp/policy-models/Editor/css/styles.css | 86 --- .../policy-models/Editor/src/css/animations.css | 183 ----- .../policy-models/Editor/src/css/dialogs.css | 85 --- .../policy-models/Editor/src/css/main.css | 336 --------- .../policyApp/policy-models/Editor/src/js/app.js | 47 -- .../Editor/src/js/controllers/main.js | 426 ----------- .../src/js/controllers/selector-controller.js | 47 -- .../Editor/src/js/directives/directives.js | 60 -- .../policy-models/Editor/src/js/entities/item.js | 351 --------- .../policy-models/Editor/src/js/filters/filters.js | 41 -- .../Editor/src/js/providers/config.js | 90 --- .../Editor/src/js/providers/translations.js | 353 --------- .../Editor/src/js/services/RolesService.js | 41 -- .../Editor/src/js/services/filenavigator.js | 199 ------ .../Editor/src/js/services/fileuploader.js | 73 -- .../src/templates/current-folder-breadcrumb.html | 34 - .../Editor/src/templates/item-context-menu.html | 102 --- .../Editor/src/templates/item-toolbar.html | 25 - .../Editor/src/templates/main-icons.html | 43 -- .../Editor/src/templates/main-table-modal.html | 66 -- .../Editor/src/templates/main-table.html | 100 --- .../policy-models/Editor/src/templates/main.html | 34 - .../policy-models/Editor/src/templates/modals.html | 385 ---------- .../policy-models/Editor/src/templates/navbar.html | 127 ---- .../Editor/src/templates/sidebar.html | 34 - .../Editor/src/templates/spinner.html | 25 - 51 files changed, 9281 deletions(-) delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/ActionPolicyController.js delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/BRMSParamPolicyController.js delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/BRMSRawPolicyController.js delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/BaseConfigPolicyController.js delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/ClosedLoopFaultController.js delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/ClosedLoopPMController.js delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/DCAEMicroServicePolicyController.js delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/DecisionPolicyController.js delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/ExportPolicyController.js delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/FirewallPolicyController.js delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/PolicyDictionaryService.js delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/ActionPolicyTemplate.html delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/BRMSParamPolicyTemplate.html delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/BRMSRawPolicyTemplate.html delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/BasePolicyTemplate.html delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/ClosedLoopFaultPolicyTemplate.html delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/ClosedLoopPMPolicyTemplate.html delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/DCAEMicroServicePolicyTemplate.html delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/DecisionPolicyTemplate.html delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/DescribePolicyTemplate.html delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/ExportPolicyTemplate.html delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/FirewallPolicyTemplate.html delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/PolicyTypeTemplate.html delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/css/normalize-legacy.css delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/css/normalize.css delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/css/styles.css delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/css/animations.css delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/css/dialogs.css delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/css/main.css delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/js/app.js delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/js/controllers/main.js delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/js/controllers/selector-controller.js delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/js/directives/directives.js delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/js/entities/item.js delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/js/filters/filters.js delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/js/providers/config.js delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/js/providers/translations.js delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/js/services/RolesService.js delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/js/services/filenavigator.js delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/js/services/fileuploader.js delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/templates/current-folder-breadcrumb.html delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/templates/item-context-menu.html delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/templates/item-toolbar.html delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/templates/main-icons.html delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/templates/main-table-modal.html delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/templates/main-table.html delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/templates/main.html delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/templates/modals.html delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/templates/navbar.html delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/templates/sidebar.html delete mode 100644 ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/templates/spinner.html (limited to 'ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor') diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/ActionPolicyController.js b/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/ActionPolicyController.js deleted file mode 100644 index 09d05524c..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/ActionPolicyController.js +++ /dev/null @@ -1,175 +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========================================================= - */ - -/** - * - */ -angular.module('abs').controller('actionPolicyController', function ($scope, PapUrlService, PolicyDictionaryService,modalService, $modal, Notification) { - $("#dialog").hide(); - - var papUrl; - PapUrlService.getPapUrl().then(function(data) { - var config = data; - papUrl = config.PAP_URL; - console.log(papUrl); - - PolicyDictionaryService.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"); - }); - - PolicyDictionaryService.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"); - }); - - }); - - PolicyDictionaryService.getFunctionDefinitionData().then(function (data) { - var j = data; - $scope.data = JSON.parse(j.data); - console.log($scope.data); - $scope.functionDefinitionDatas = JSON.parse($scope.data.functionDefinitionDatas); - console.log($scope.functionDefinitionDatas); - }, function (error) { - console.log("failed"); - }); - - function extend(obj, src) { - for (var key in src) { - if (src.hasOwnProperty(key)) obj[key] = src[key]; - } - return obj; - } - - $scope.saveActionPolicy = function(policy){ - console.log(policy); - /*var attributeData = extend(policy, $scope.attributeDatas[0]);*/ - // var finalData = extend(policy, $scope.ruleAlgorithmDatas[0]); - //console.log(finalData); - var uuu = "policyController/save_Actionpolicy.htm"; - var postData={policyData: policy}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){ - $scope.data=data.data; - $scope.temp.policy.readOnly = 'true'; - Notification.success("Policy Saved Successfully."); - }); - console.log($scope.data); - $modalInstance.close(); - - }, - error : function(data){ - Notification.error("Error Occured while saving Policy."); - } - }); - }; - - $scope.validatePolicy = function(policy){ - console.log(policy); - var uuu = "policyController/validate_policy.htm"; - var postData={policyData: policy}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){ - $scope.data=data.data; - if($scope.data == '"success"'){ - Notification.success("Validation Success."); - }else{ - Notification.error("Validation Failed."); - } - - }); - console.log($scope.data); - /*$modalInstance.close();*/ - - }, - error : function(data){ - Notification.error("Validation Failed."); - } - }); - }; - - if(!$scope.temp.policy.editPolicy && !$scope.temp.policy.readOnly){ - $scope.temp.policy.attributes = []; - $scope.temp.policy.ruleAlgorithmschoices = []; - }else{ - if($scope.temp.policy.attributes.length == 0){ - $scope.temp.policy.attributes = []; - } - if($scope.temp.policy.ruleAlgorithmschoices.length == 0){ - $scope.temp.policy.ruleAlgorithmschoices = []; - } - } - - $scope.attributeDatas = [{"attributes" : $scope.temp.policy.attributes}]; - $scope.addNewChoice = function() { - var newItemNo = $scope.temp.policy.attributes .length+1; - $scope.temp.policy.attributes.push({'id':'choice'+newItemNo}); - }; - $scope.removeChoice = function() { - var lastItem = $scope.temp.policy.attributes.length-1; - $scope.temp.policy.attributes.splice(lastItem); - }; - - - $scope.ItemNo = 0; - $scope.ruleAlgorithmDatas = [{"ruleAlgorithms" : $scope.temp.policy.ruleAlgorithmschoices}]; - - $scope.addNewRuleAlgorithm = function(){ - var newItemNo = $scope.temp.policy.ruleAlgorithmschoices.length+1; - $scope.ItemNo = newItemNo; - if(newItemNo > 1){ - var value = newItemNo-1; - $scope.attributeDictionaryDatas.push('A'+value); - $scope.$apply(); - } - $scope.temp.policy.ruleAlgorithmschoices.push({'id':'A'+newItemNo}); - - }; - - $scope.removeRuleAlgorithm = function() { - var lastItem = $scope.temp.policy.ruleAlgorithmschoices.length-1; - $scope.ItemNo = lastItem; - $scope.temp.policy.ruleAlgorithmschoices.splice(lastItem); - }; - -}); \ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/BRMSParamPolicyController.js b/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/BRMSParamPolicyController.js deleted file mode 100644 index 5c9783347..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/BRMSParamPolicyController.js +++ /dev/null @@ -1,210 +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========================================================= - */ - -/** - * - */ -angular.module('abs').controller('brmsParamPolicyController', function ($scope, $window, PolicyDictionaryService, PapUrlService, modalService, $modal, Notification) { - $("#dialog").hide(); - - $scope.temp.policy.ttlDate = new Date($scope.temp.policy.ttlDate); - $scope.validateSuccess = true; - var readValue = $scope.temp.policy.readOnly; - if(readValue){ - $scope.validateSuccess = false; - } - - var papUrl; - PapUrlService.getPapUrl().then(function(data) { - var config = data; - papUrl = config.PAP_URL; - console.log(papUrl); - - PolicyDictionaryService.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"); - }); - PolicyDictionaryService.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"); - }); - PolicyDictionaryService.getRiskLevelValueData().then(function (data) { - var j = data; - $scope.data = JSON.parse(j.data); - console.log($scope.data); - $scope.riskLevelDatas = JSON.parse($scope.data.riskLevelDatas); - console.log($scope.riskLevelDatas); - }, function (error) { - console.log("failed"); - }); - PolicyDictionaryService.getGuardValueData().then(function (data) { - var j = data; - $scope.data = JSON.parse(j.data); - console.log($scope.data); - $scope.guardDatas = JSON.parse($scope.data.guardDatas); - console.log($scope.guardDatas); - }, function (error) { - console.log("failed"); - }); - }); - - $scope.temp.policy.dynamicLayoutMap = []; - $scope.addDataToFields = function(ruleName){ - console.log(ruleName); - if(ruleName != null){ - var uuu = "policyController/getBRMSTemplateData.htm"; - var postData={policyData: ruleName}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){ - $scope.temp.policy.dynamicLayoutMap = data.policyData; - }); - console.log( $scope.temp.policy.dynamicLayoutMap); - }, - error : function(data){ - alert("Error While Retriving the Template Layout Pattren."); - } - }); - } - }; - - $scope.ShowRule = function(policy){ - console.log(policy); - var uuu = "policyController/ViewBRMSParamPolicyRule.htm"; - var postData={policyData: policy}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){ - window.alert(data.policyData); - }); - }, - error : function(data){ - Notification.error("Error Occured while Showing Rule."); - } - }); - }; - - $scope.saveBrmsParamPolicy = function(policy){ - console.log(policy); - var uuu = "policyController/save_BRMSParamPolicy.htm"; - var postData={policyData: policy}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){ - $scope.data=data.data; - $scope.temp.policy.readOnly = 'true'; - Notification.success("Policy Saved Successfully."); - }); - console.log($scope.data); - $modalInstance.close(); - - }, - error : function(data){ - Notification.error("Error Occured while saving Policy."); - } - }); - }; - - $scope.validatePolicy = function(policy){ - console.log(policy); - var uuu = "policyController/validate_policy.htm"; - var postData={policyData: policy}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){ - $scope.data=data.data.substring(1,8); - var size = data.data.length; - if($scope.data == 'success'){ - Notification.success("Validation Success."); - if (size > 18){ - var displayWarning = data.data.substring(19,size); - window.alert(displayWarning); - } - $scope.validateSuccess = false; - }else{ - Notification.error("Validation Failed."); - } - - }); - console.log($scope.data); - /*$modalInstance.close();*/ - - }, - error : function(data){ - Notification.error("Validation Failed."); - } - }); - }; - - function extend(obj, src) { - for (var key in src) { - if (src.hasOwnProperty(key)) obj[key] = src[key]; - } - return obj; - } - - if(!$scope.temp.policy.editPolicy && !$scope.temp.policy.readOnly){ - $scope.temp.policy.attributes = []; - }else{ - if($scope.temp.policy.attributes.length == 0){ - $scope.temp.policy.attributes = []; - } - } - - $scope.attributeDatas = [{"attributes" : $scope.temp.policy.attributes}]; - $scope.addNewChoice = function() { - var newItemNo = $scope.temp.policy.attributes.length+1; - $scope.temp.policy.attributes.push({'id':'choice'+newItemNo}); - }; - $scope.removeChoice = function() { - var lastItem = $scope.temp.policy.attributes.length-1; - $scope.temp.policy.attributes.splice(lastItem); - }; -}); \ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/BRMSRawPolicyController.js b/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/BRMSRawPolicyController.js deleted file mode 100644 index 10a0b2f20..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/BRMSRawPolicyController.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========================================================= - */ - -/** - * - */ -angular.module('abs').controller('brmsRawPolicyController', function ($scope, $window, PolicyDictionaryService, PapUrlService, modalService, $modal, Notification) { - $("#dialog").hide(); - - $scope.temp.policy.ttlDate = new Date($scope.temp.policy.ttlDate); - var papUrl; - PapUrlService.getPapUrl().then(function(data) { - var config = data; - papUrl = config.PAP_URL; - console.log(papUrl); - - PolicyDictionaryService.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"); - }); - PolicyDictionaryService.getRiskLevelValueData().then(function (data) { - var j = data; - $scope.data = JSON.parse(j.data); - console.log($scope.data); - $scope.riskLevelDatas = JSON.parse($scope.data.riskLevelDatas); - console.log($scope.riskLevelDatas); - }, function (error) { - console.log("failed"); - }); - PolicyDictionaryService.getGuardValueData().then(function (data) { - var j = data; - $scope.data = JSON.parse(j.data); - console.log($scope.data); - $scope.guardDatas = JSON.parse($scope.data.guardDatas); - console.log($scope.guardDatas); - }, function (error) { - console.log("failed"); - }); - }); - $scope.saveBrmsRawPolicy = function(policy){ - console.log(policy); - /* var finalData = extend(policy, $scope.attributeDatas[0]);*/ - var uuu = "policyController/save_BRMSRawPolicy.htm"; - var postData={policyData: policy}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){ - $scope.data=data.data; - $scope.temp.policy.readOnly = 'true'; - Notification.success("Policy Saved Successfully."); - }); - console.log($scope.data); - $modalInstance.close(); - - }, - error : function(data){ - Notification.error("Error Occured while saving Policy."); - } - }); - }; - - $scope.validatePolicy = function(policy){ - console.log(policy); - var uuu = "policyController/validate_policy.htm"; - var postData={policyData: policy}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){ - $scope.data=data.data.substring(1,8); - var size = data.data.length; - if($scope.data == 'success'){ - Notification.success("Validation Success."); - if (size > 18){ - var displayWarning = data.data.substring(19,size); - window.alert(displayWarning); - } - }else{ - Notification.error("Validation Failed."); - } - - }); - console.log($scope.data); - /*$modalInstance.close();*/ - - }, - error : function(data){ - Notification.error("Validation Failed."); - } - }); - }; - - function extend(obj, src) { - for (var key in src) { - if (src.hasOwnProperty(key)) obj[key] = src[key]; - } - return obj; - } - - if(!$scope.temp.policy.editPolicy && !$scope.temp.policy.readOnly){ - $scope.temp.policy.attributes = []; - }else{ - if($scope.temp.policy.attributes.length == 0){ - $scope.temp.policy.attributes = []; - } - } - $scope.attributeDatas = [{"attributes" : $scope.temp.policy.attributes}]; - $scope.addNewChoice = function() { - var newItemNo = $scope.temp.policy.attributes.length+1; - $scope.temp.policy.attributes.push({'id':'choice'+newItemNo}); - }; - $scope.removeChoice = function() { - var lastItem = $scope.temp.policy.attributes.length-1; - $scope.temp.policy.attributes.splice(lastItem); - }; -}); \ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/BaseConfigPolicyController.js b/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/BaseConfigPolicyController.js deleted file mode 100644 index b2712e7a9..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/BaseConfigPolicyController.js +++ /dev/null @@ -1,185 +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('baseConfigController', function ($scope, PolicyDictionaryService,modalService, PapUrlService, $modal, Notification) { - $("#dialog").hide(); - - $scope.savebutton = true; - - $scope.temp.policy.ttlDate = new Date($scope.temp.policy.ttlDate); - PapUrlService.getPapUrl().then(function(data) { - var papUrl; - var config = data; - papUrl = config.PAP_URL; - console.log(papUrl); - - PolicyDictionaryService.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"); - }); - - PolicyDictionaryService.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"); - }); - - PolicyDictionaryService.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"); - }); - PolicyDictionaryService.getRiskLevelValueData().then(function (data) { - var j = data; - $scope.data = JSON.parse(j.data); - console.log($scope.data); - $scope.riskLevelDatas = JSON.parse($scope.data.riskLevelDatas); - console.log($scope.riskLevelDatas); - }, function (error) { - console.log("failed"); - }); - PolicyDictionaryService.getGuardValueData().then(function (data) { - var j = data; - $scope.data = JSON.parse(j.data); - console.log($scope.data); - $scope.guardDatas = JSON.parse($scope.data.guardDatas); - console.log($scope.guardDatas); - }, function (error) { - console.log("failed"); - }); - - }); - - function extend(obj, src) { - for (var key in src) { - if (src.hasOwnProperty(key)) obj[key] = src[key]; - } - return obj; - } - - $scope.close = function(){ - $scope.temp = {}; - }; - - $scope.savePolicy = function(policy){ - console.log(policy); - var uuu = "policyController/save_policy.htm"; - var postData={policyData: policy}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){ - $scope.data=data.data; - $scope.temp.policy.readOnly = 'true'; - Notification.success("Policy Saved Successfully."); - }); - console.log($scope.data); - $modalInstance.close(); - - }, - error : function(data){ - Notification.error("Error Occured while saving Policy."); - } - }); - }; - - $scope.validatePolicyName = false; - $scope.validateEcompName = false; - $scope.validateConfigName = false; - $scope.validateConfigType = false; - $scope.validateConfigTypeNull = false; - $scope.validateConfigTypeBody = false; - $scope.validateRiskType = false; - $scope.validateRiskLevel = false; - $scope.validateGuard = false; - $scope.policyNameErrorMessage = ""; - $scope.errorMessage = ""; - $scope.validatePolicy = function(policy){ - console.log(policy); - var uuu = "policyController/validate_policy.htm"; - var postData={policyData: policy}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){ - $scope.data=data.data.substring(1,8); - var size = data.data.length; - if($scope.data == 'success'){ - Notification.success("Validation Success."); - $scope.savebutton = false; - if (size > 18){ - var displayWarning = data.data.substring(19,size); - window.alert(displayWarning); - } - }else{ - Notification.error("Validation Failed."); - } - }); - }, - error : function(data){ - Notification.error("Validation Failed."); - $scope.savebutton = true; - } - }); - }; - - if(!$scope.temp.policy.editPolicy && !$scope.temp.policy.readOnly){ - $scope.temp.policy.attributes = []; - }else{ - if($scope.temp.policy.attributes.length == 0){ - $scope.temp.policy.attributes = []; - } - } - - - $scope.attributeDatas = [{"attributes" : $scope.temp.policy.attributes}]; - $scope.addNewChoice = function() { - var newItemNo = $scope.temp.policy.attributes .length+1; - $scope.temp.policy.attributes.push({'id':'choice'+newItemNo}); - }; - $scope.removeChoice = function() { - var lastItem = $scope.temp.policy.attributes.length-1; - $scope.temp.policy.attributes.splice(lastItem); - }; - -}); \ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/ClosedLoopFaultController.js b/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/ClosedLoopFaultController.js deleted file mode 100644 index e9fdae299..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/ClosedLoopFaultController.js +++ /dev/null @@ -1,790 +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========================================================= - */ - -/** - * - */ -angular.module("abs").controller('clFaultController', function($scope, $window, PolicyDictionaryService, PapUrlService, modalService, $modal, Notification){ - $("#dialog").hide(); - - $scope.temp.policy.ttlDate = new Date($scope.temp.policy.ttlDate); - if($scope.temp.policy.triggerTrapSignatures == undefined){ - $scope.temp.policy.triggerTrapSignatures = []; - $scope.temp.policy.triggerfaultSignatures = []; - } - var trapCollection = []; - var faultCollection = []; - if($scope.varbindDictionaryDatas == undefined){ - $scope.varbindDictionaryDatas = []; - } - - $scope.init = function(data){ - if(data != "undefined"){ - $scope.jsonData = data; - if($scope.jsonData.triggerSignaturesUsedForUI != null){ - if($scope.jsonData.triggerSignaturesUsedForUI.signatures != null){ - $scope.temp.policy.triggerTrapSignatures = {Trap1 : [], Trap2 : [], Trap3 : [], Trap4 : [], Trap5 : [], Trap6 : []}; - var splitTraps = $scope.jsonData.triggerSignaturesUsedForUI.signatures.split("#!?!"); - if(splitTraps.length > 1){ - $scope.triggerdisabled = false; - var indexId = "Trap1"; - trapCollection.push(indexId); - $scope.temp.policy.triggerTrapSignatures[indexId.replace(/['"]+/g, '')] = []; - $scope.temp.policy.traptriggerSignatures.push({'id':'Trap'+1}); - var splitTrap1 = splitTraps[0]; - var splitEachTrap = splitTrap1.split("#!@!"); - for(i = 0 ; i < splitEachTrap.length; i++){ - var splitEachRow = splitEachTrap[i].split("@!"); - var count = i +1; - if(splitEachRow[0] == 'NOT' || splitEachRow[0] ==''){ - var notBox = splitEachRow[0]; - var trigger1 = splitEachRow[1]; - var operatorBox = splitEachRow[2]; - var trigger2 = splitEachRow[3]; - }else{ - var notBox = ''; - var trigger1 = splitEachRow[0]; - var operatorBox = splitEachRow[1]; - var trigger2 = splitEachRow[2]; - } - $scope.varbindDictionaryDatas.push('A'+count); - $scope.temp.policy.triggerTrapSignatures["Trap1"].push({'id':'A'+count, 'notBox' : notBox , 'trigger1': trigger1 , 'operatorBox' : operatorBox, 'trigger2': trigger2}); - } - } - if(splitTraps.length > 2){ - var indexId = "Trap2"; - trapCollection.push(indexId); - $scope.temp.policy.triggerTrapSignatures[indexId.replace(/['"]+/g, '')] = []; - $scope.temp.policy.traptriggerSignatures.push({'id':'Trap'+2}); - var splitTrap1 = splitTraps[1]; - var splitEachTrap = splitTrap1.split("#!@!"); - for(i = 0 ; i < splitEachTrap.length; i++){ - var splitEachRow = splitEachTrap[i].split("@!"); - var count = i +1; - if(splitEachRow[0] == 'NOT' || splitEachRow[0] == ''){ - var notBox = splitEachRow[0]; - var trigger1 = splitEachRow[1]; - var operatorBox = splitEachRow[2]; - var trigger2 = splitEachRow[3]; - }else{ - var notBox = ''; - var trigger1 = splitEachRow[0]; - var operatorBox = splitEachRow[1]; - var trigger2 = splitEachRow[2]; - } - $scope.varbindDictionaryDatas.push('A'+count); - $scope.temp.policy.triggerTrapSignatures["Trap2"].push({'id':'A'+count, 'notBox' : notBox , 'trigger1': trigger1 , 'operatorBox' : operatorBox, 'trigger2': trigger2}); - } - } - if(splitTraps.length > 3){ - var indexId = "Trap3"; - trapCollection.push(indexId); - $scope.temp.policy.triggerTrapSignatures[indexId.replace(/['"]+/g, '')] = []; - $scope.temp.policy.traptriggerSignatures.push({'id':'Trap'+3}); - var splitTrap1 = splitTraps[2]; - var splitEachTrap = splitTrap1.split("#!@!"); - for(i = 0 ; i < splitEachTrap.length; i++){ - var splitEachRow = splitEachTrap[i].split("@!"); - var count = i +1; - if(splitEachRow[0] == 'NOT' || splitEachRow[0] ==''){ - var notBox = splitEachRow[0]; - var trigger1 = splitEachRow[1]; - var operatorBox = splitEachRow[2]; - var trigger2 = splitEachRow[3]; - }else{ - var notBox = ''; - var trigger1 = splitEachRow[0]; - var operatorBox = splitEachRow[1]; - var trigger2 = splitEachRow[2]; - } - $scope.varbindDictionaryDatas.push('A'+count); - $scope.temp.policy.triggerTrapSignatures["Trap3"].push({'id':'A'+count, 'notBox' : notBox , 'trigger1': trigger1 , 'operatorBox' : operatorBox, 'trigger2': trigger2}); - } - } - if(splitTraps.length > 4){ - var indexId = "Trap4"; - trapCollection.push(indexId); - $scope.temp.policy.triggerTrapSignatures[indexId.replace(/['"]+/g, '')] = []; - $scope.temp.policy.traptriggerSignatures.push({'id':'Trap'+4}); - var splitTrap1 = splitTraps[3]; - var splitEachTrap = splitTrap1.split("#!@!"); - for(i = 0 ; i < splitEachTrap.length; i++){ - var splitEachRow = splitEachTrap[i].split("@!"); - var count = i +1; - if(splitEachRow[0] == 'NOT' || splitEachRow[0] ==''){ - var notBox = splitEachRow[0]; - var trigger1 = splitEachRow[1]; - var operatorBox = splitEachRow[2]; - var trigger2 = splitEachRow[3]; - }else{ - var notBox = ''; - var trigger1 = splitEachRow[0]; - var operatorBox = splitEachRow[1]; - var trigger2 = splitEachRow[2]; - } - $scope.varbindDictionaryDatas.push('A'+count); - $scope.temp.policy.triggerTrapSignatures["Trap4"].push({'id':'A'+count, 'notBox' : notBox , 'trigger1': trigger1 , 'operatorBox' : operatorBox, 'trigger2': trigger2}); - } - } - if(splitTraps.length > 5){ - var indexId = "Trap5"; - trapCollection.push(indexId); - $scope.temp.policy.triggerTrapSignatures[indexId.replace(/['"]+/g, '')] = []; - $scope.temp.policy.traptriggerSignatures.push({'id':'Trap'+5}); - var splitTrap1 = splitTraps[4]; - var splitEachTrap = splitTrap1.split("#!@!"); - for(i = 0 ; i < splitEachTrap.length; i++){ - var splitEachRow = splitEachTrap[i].split("@!"); - var count = i +1; - if(splitEachRow[0] == 'NOT' || splitEachRow[0] ==''){ - var notBox = splitEachRow[0]; - var trigger1 = splitEachRow[1]; - var operatorBox = splitEachRow[2]; - var trigger2 = splitEachRow[3]; - }else{ - var notBox = ''; - var trigger1 = splitEachRow[0]; - var operatorBox = splitEachRow[1]; - var trigger2 = splitEachRow[2]; - } - $scope.varbindDictionaryDatas.push('A'+count); - $scope.temp.policy.triggerTrapSignatures["Trap5"].push({'id':'A'+count, 'notBox' : notBox , 'trigger1': trigger1 , 'operatorBox' : operatorBox, 'trigger2': trigger2}); - } - } - if(splitTraps.length > 6){ - var indexId = "Trap6"; - trapCollection.push(indexId); - $scope.temp.policy.triggerTrapSignatures[indexId.replace(/['"]+/g, '')] = []; - $scope.temp.policy.traptriggerSignatures.push({'id':'Trap'+6}); - var splitTrap1 = splitTraps[5]; - var splitEachTrap = splitTrap1.split("#!@!"); - for(i = 0 ; i < splitEachTrap.length; i++){ - var splitEachRow = splitEachTrap[i].split("@!"); - var count = i +1; - if(splitEachRow[0] == 'NOT' || splitEachRow[0] ==''){ - var notBox = splitEachRow[0]; - var trigger1 = splitEachRow[1]; - var operatorBox = splitEachRow[2]; - var trigger2 = splitEachRow[3]; - }else{ - var notBox = ''; - var trigger1 = splitEachRow[0]; - var operatorBox = splitEachRow[1]; - var trigger2 = splitEachRow[2]; - } - $scope.varbindDictionaryDatas.push('A'+count); - $scope.temp.policy.triggerTrapSignatures["Trap6"].push({'id':'A'+count, 'notBox' : notBox , 'trigger1': trigger1 , 'operatorBox' : operatorBox, 'trigger2': trigger2}); - } - } - if($scope.jsonData.triggerSignaturesUsedForUI.connectSignatures != null){ - var splitConnectTraps = $scope.jsonData.triggerSignaturesUsedForUI.connectSignatures.split("#!?!"); - for(i=0; i < splitConnectTraps.length; i++){ - if(splitConnectTraps[i] != ""){ - var newConnectTrapItemNo = i+1; - var connects = splitConnectTraps[i].split("@!"); - if(connects[0] == 'NOT' || connects[0] ==''){ - var notBox = connects[0]; - var connectTrap1 = connects[1]; - var trapCount1 = connects[2]; - var operatorBox = connects[3]; - var connectTrap2 = connects[4]; - var trapCount2 = connects[5]; - }else{ - var notBox = ''; - var connectTrap1 = connects[0]; - var trapCount1 = connects[1]; - var operatorBox = connects[2]; - var connectTrap2 = connects[3]; - var trapCount2 = connects[4]; - } - $scope.temp.policy.connecttriggerSignatures.push({'id':'C'+newConnectTrapItemNo,'notBox' : notBox , 'connectTrap1': connectTrap1,'trapCount1' : trapCount1, - 'operatorBox': operatorBox, 'connectTrap2': connectTrap2,'trapCount2' : trapCount2}); - } - } - } - } - } - if($scope.jsonData.verificationSignaturesUsedForUI != null){ - if($scope.jsonData.verificationSignaturesUsedForUI.signatures != null){ - $scope.temp.policy.triggerfaultSignatures = {Fault1 : [], Fault2 : [], Fault3 : [], Fault4 : [], Fault5 : [], Fault6 : [],}; - var splitTraps = $scope.jsonData.verificationSignaturesUsedForUI.signatures.split("#!?!"); - if(splitTraps.length > 1){ - $scope.verificationdisabled = false; - var indexId = "Fault1"; - faultCollection.push(indexId); - $scope.temp.policy.triggerfaultSignatures[indexId.replace(/['"]+/g, '')] = []; - $scope.temp.policy.faulttriggerSignatures.push({'id':'Fault'+1}); - var splitTrap1 = splitTraps[0]; - var splitEachTrap = splitTrap1.split("#!@!"); - for(i = 0 ; i < splitEachTrap.length; i++){ - var splitEachRow = splitEachTrap[i].split("@!"); - var count = i +1; - if(splitEachRow[0] == 'NOT' || splitEachRow[0] ==''){ - var notBox = splitEachRow[0]; - var trigger1 = splitEachRow[1]; - var operatorBox = splitEachRow[2]; - var trigger2 = splitEachRow[3]; - }else{ - var notBox = ''; - var trigger1 = splitEachRow[0]; - var operatorBox = splitEachRow[1]; - var trigger2 = splitEachRow[2]; - } - $scope.varbindDictionaryDatas.push('A'+count); - $scope.temp.policy.triggerfaultSignatures["Fault1"].push({'id':'A'+count, 'notBox' : notBox , 'trigger1': trigger1 , 'operatorBox' : operatorBox, 'trigger2': trigger2}); - } - } - if(splitTraps.length > 2){ - var indexId = "Fault2"; - faultCollection.push(indexId); - $scope.temp.policy.triggerfaultSignatures[indexId.replace(/['"]+/g, '')] = []; - $scope.temp.policy.faulttriggerSignatures.push({'id':'Fault'+2}); - var splitTrap1 = splitTraps[1]; - var splitEachTrap = splitTrap1.split("#!@!"); - for(i = 0 ; i < splitEachTrap.length; i++){ - var splitEachRow = splitEachTrap[i].split("@!"); - var count = i +1; - if(splitEachRow[0] == 'NOT' || splitEachRow[0] == ''){ - var notBox = splitEachRow[0]; - var trigger1 = splitEachRow[1]; - var operatorBox = splitEachRow[2]; - var trigger2 = splitEachRow[3]; - }else{ - var notBox = ''; - var trigger1 = splitEachRow[0]; - var operatorBox = splitEachRow[1]; - var trigger2 = splitEachRow[2]; - } - $scope.varbindDictionaryDatas.push('A'+count); - $scope.temp.policy.triggerfaultSignatures["Fault2"].push({'id':'A'+count, 'notBox' : notBox , 'trigger1': trigger1 , 'operatorBox' : operatorBox, 'trigger2': trigger2}); - } - } - if(splitTraps.length > 3){ - var indexId = "Fault3"; - faultCollection.push(indexId); - $scope.temp.policy.triggerfaultSignatures[indexId.replace(/['"]+/g, '')] = []; - $scope.temp.policy.faulttriggerSignatures.push({'id':'Fault'+3}); - var splitTrap1 = splitTraps[2]; - var splitEachTrap = splitTrap1.split("#!@!"); - for(i = 0 ; i < splitEachTrap.length; i++){ - var splitEachRow = splitEachTrap[i].split("@!"); - var count = i +1; - if(splitEachRow[0] == 'NOT' || splitEachRow[0] ==''){ - var notBox = splitEachRow[0]; - var trigger1 = splitEachRow[1]; - var operatorBox = splitEachRow[2]; - var trigger2 = splitEachRow[3]; - }else{ - var notBox = ''; - var trigger1 = splitEachRow[0]; - var operatorBox = splitEachRow[1]; - var trigger2 = splitEachRow[2]; - } - $scope.varbindDictionaryDatas.push('A'+count); - $scope.temp.policy.triggerfaultSignatures["Fault3"].push({'id':'A'+count, 'notBox' : notBox , 'trigger1': trigger1 , 'operatorBox' : operatorBox, 'trigger2': trigger2}); - } - } - if(splitTraps.length > 4){ - var indexId = "Fault4"; - faultCollection.push(indexId); - $scope.temp.policy.triggerfaultSignatures[indexId.replace(/['"]+/g, '')] = []; - $scope.temp.policy.faulttriggerSignatures.push({'id':'Fault'+4}); - var splitTrap1 = splitTraps[3]; - var splitEachTrap = splitTrap1.split("#!@!"); - for(i = 0 ; i < splitEachTrap.length; i++){ - var splitEachRow = splitEachTrap[i].split("@!"); - var count = i +1; - if(splitEachRow[0] == 'NOT' || splitEachRow[0] ==''){ - var notBox = splitEachRow[0]; - var trigger1 = splitEachRow[1]; - var operatorBox = splitEachRow[2]; - var trigger2 = splitEachRow[3]; - }else{ - var notBox = ''; - var trigger1 = splitEachRow[0]; - var operatorBox = splitEachRow[1]; - var trigger2 = splitEachRow[2]; - } - $scope.varbindDictionaryDatas.push('A'+count); - $scope.temp.policy.triggerfaultSignatures["Fault4"].push({'id':'A'+count, 'notBox' : notBox , 'trigger1': trigger1 , 'operatorBox' : operatorBox, 'trigger2': trigger2}); - } - } - if(splitTraps.length > 5){ - var indexId = "Fault5"; - faultCollection.push(indexId); - $scope.temp.policy.triggerfaultSignatures[indexId.replace(/['"]+/g, '')] = []; - $scope.temp.policy.faulttriggerSignatures.push({'id':'Fault'+5}); - var splitTrap1 = splitTraps[4]; - var splitEachTrap = splitTrap1.split("#!@!"); - for(i = 0 ; i < splitEachTrap.length; i++){ - var splitEachRow = splitEachTrap[i].split("@!"); - var count = i +1; - if(splitEachRow[0] == 'NOT' || splitEachRow[0] ==''){ - var notBox = splitEachRow[0]; - var trigger1 = splitEachRow[1]; - var operatorBox = splitEachRow[2]; - var trigger2 = splitEachRow[3]; - }else{ - var notBox = ''; - var trigger1 = splitEachRow[0]; - var operatorBox = splitEachRow[1]; - var trigger2 = splitEachRow[2]; - } - $scope.varbindDictionaryDatas.push('A'+count); - $scope.temp.policy.triggerfaultSignatures["Fault5"].push({'id':'A'+count, 'notBox' : notBox , 'trigger1': trigger1 , 'operatorBox' : operatorBox, 'trigger2': trigger2}); - } - } - if(splitTraps.length > 6){ - var indexId = "Fault6"; - faultCollection.push(indexId); - $scope.temp.policy.triggerfaultSignatures[indexId.replace(/['"]+/g, '')] = []; - $scope.temp.policy.faulttriggerSignatures.push({'id':'Fault'+6}); - var splitTrap1 = splitTraps[5]; - var splitEachTrap = splitTrap1.split("#!@!"); - for(i = 0 ; i < splitEachTrap.length; i++){ - var splitEachRow = splitEachTrap[i].split("@!"); - var count = i +1; - if(splitEachRow[0] == 'NOT' || splitEachRow[0] ==''){ - var notBox = splitEachRow[0]; - var trigger1 = splitEachRow[1]; - var operatorBox = splitEachRow[2]; - var trigger2 = splitEachRow[3]; - }else{ - var notBox = ''; - var trigger1 = splitEachRow[0]; - var operatorBox = splitEachRow[1]; - var trigger2 = splitEachRow[2]; - } - $scope.varbindDictionaryDatas.push('A'+count); - $scope.temp.policy.triggerfaultSignatures["Fault6"].push({'id':'A'+count, 'notBox' : notBox , 'trigger1': trigger1 , 'operatorBox' : operatorBox, 'trigger2': trigger2}); - } - } - - if($scope.jsonData.verificationSignaturesUsedForUI.connectSignatures != null){ - var splitConnectTraps = $scope.jsonData.verificationSignaturesUsedForUI.connectSignatures.split("#!?!"); - for(i=0; i < splitConnectTraps.length; i++){ - if(splitConnectTraps[i] != ""){ - var newConnectTrapItemNo = i+1; - var connects = splitConnectTraps[i].split("@!"); - if(connects[0] == 'NOT' || connects[0] ==''){ - var notBox = connects[0]; - var connectTrap1 = connects[1]; - var trapCount1 = connects[2]; - var operatorBox = connects[3]; - var connectTrap2 = connects[4]; - var trapCount2 = connects[5]; - }else{ - var notBox = ''; - var connectTrap1 = connects[0]; - var trapCount1 = connects[1]; - var operatorBox = connects[2]; - var connectTrap2 = connects[3]; - var trapCount2 = connects[4]; - } - $scope.temp.policy.connectVerificationSignatures.push({'id':'C'+newConnectTrapItemNo,'notBox' : notBox , 'connectTrap1': connectTrap1,'trapCount1' : trapCount1, - 'operatorBox': operatorBox, 'connectTrap2': connectTrap2,'trapCount2' : trapCount2}); - } - } - } - } - } - } - - }; - - $scope.triggerdisabled = true; - $scope.verificationdisabled = true; - - var papUrl; - PapUrlService.getPapUrl().then(function(data) { - var config = data; - papUrl = config.PAP_URL; - console.log(papUrl); - - PolicyDictionaryService.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"); - }); - - PolicyDictionaryService.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"); - }); - - PolicyDictionaryService.getPepOptionsDictionaryDataEntity(papUrl).then(function (data) { - var j = data; - $scope.data = JSON.parse(j.data); - console.log($scope.data); - $scope.pepOptionsDictionaryDataEntity = JSON.parse($scope.data.pepOptionsDictionaryDatas); - console.log($scope.pepOptionsDictionaryDataEntity); - }, function (error) { - console.log("failed"); - }); - - PolicyDictionaryService.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"); - }); - - PolicyDictionaryService.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"); - }); - - PolicyDictionaryService.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"); - }); - - PolicyDictionaryService.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"); - }); - - PolicyDictionaryService.getRiskLevelValueData().then(function (data) { - var j = data; - $scope.data = JSON.parse(j.data); - console.log($scope.data); - $scope.riskLevelDatas = JSON.parse($scope.data.riskLevelDatas); - console.log($scope.riskLevelDatas); - }, function (error) { - console.log("failed"); - }); - - PolicyDictionaryService.getGuardValueData().then(function (data) { - var j = data; - $scope.data = JSON.parse(j.data); - console.log($scope.data); - $scope.guardDatas = JSON.parse($scope.data.guardDatas); - console.log($scope.guardDatas); - }, function (error) { - console.log("failed"); - }); - }); - - $scope.pepActionDictionaryDatas = []; - - $scope.getPepActionValues = function(pepOptionValue){ - for (var i = 0; i < $scope.pepOptionsDictionaryDataEntity.length; ++i) { - var obj = $scope.pepOptionsDictionaryDataEntity[i]; - if (obj.pepName == pepOptionValue){ - var splitAlarm = obj.actions.split(':#@'); - for (var j = 0; j < splitAlarm.length; ++j) { - $scope.pepActionDictionaryDatas.push(splitAlarm[j].split('=#@')[0]); - } - } - } - }; - - $scope.saveFaultPolicy = function(policy){ - console.log(policy); - var data = {}; - var faultData = {}; - if($scope.temp.policy.triggerTrapSignatures.length == 1 || $scope.temp.policy.triggerTrapSignatures["Trap1"] != null){ - var data = {trap1 : $scope.temp.policy.triggerTrapSignatures.Trap1 } - } - if($scope.temp.policy.triggerTrapSignatures.length == 2 || $scope.temp.policy.triggerTrapSignatures["Trap2"] != null){ - var data = {trap1 : $scope.temp.policy.triggerTrapSignatures.Trap1, trap2 : $scope.temp.policy.triggerTrapSignatures.Trap2} - } - if($scope.temp.policy.triggerTrapSignatures.length == 3 || $scope.temp.policy.triggerTrapSignatures["Trap3"] != null){ - var data = {trap1 : $scope.temp.policy.triggerTrapSignatures.Trap1, trap2 : $scope.temp.policy.triggerTrapSignatures.Trap2, - trap2 : $scope.temp.policy.triggerTrapSignatures.Trap3} - } - if($scope.temp.policy.triggerTrapSignatures.length == 4 || $scope.temp.policy.triggerTrapSignatures["Trap4"] != null){ - var data = {trap1 : $scope.temp.policy.triggerTrapSignatures.Trap1, trap2 : $scope.temp.policy.triggerTrapSignatures.Trap2, - trap3 : $scope.temp.policy.triggerTrapSignatures.Trap3, trap4 : $scope.temp.policy.triggerTrapSignatures.Trap4} - } - if($scope.temp.policy.triggerTrapSignatures.length == 5 || $scope.temp.policy.triggerTrapSignatures["Trap5"] != null){ - var data = {trap1 : $scope.temp.policy.triggerTrapSignatures.Trap1, trap2 : $scope.temp.policy.triggerTrapSignatures.Trap2, - trap3 : $scope.temp.policy.triggerTrapSignatures.Trap3, trap4 : $scope.temp.policy.triggerTrapSignatures.Trap4, - trap5 : $scope.temp.policy.triggerTrapSignatures.Trap5} - } - if($scope.temp.policy.triggerTrapSignatures.length == 6 || $scope.temp.policy.triggerTrapSignatures["Trap6"] != null){ - var data = {trap1 : $scope.temp.policy.triggerTrapSignatures.Trap1, trap2 : $scope.temp.policy.triggerTrapSignatures.Trap2, - trap3 : $scope.temp.policy.triggerTrapSignatures.Trap3, trap4 : $scope.temp.policy.triggerTrapSignatures.Trap4, - trap5 : $scope.temp.policy.triggerTrapSignatures.Trap5, trap6 : $scope.temp.policy.triggerTrapSignatures.Trap6} - } - - if($scope.temp.policy.triggerfaultSignatures.length == 1 || $scope.temp.policy.triggerfaultSignatures["Fault1"] != null){ - var faultData = {trap1 : $scope.temp.policy.triggerfaultSignatures.Fault1 } - } - if($scope.temp.policy.triggerfaultSignatures.length == 2 || $scope.temp.policy.triggerfaultSignatures["Fault2"] != null){ - var faultData = {trap1 : $scope.temp.policy.triggerfaultSignatures.Fault1, trap2 : $scope.temp.policy.triggerfaultSignatures.Fault2} - } - if($scope.temp.policy.triggerfaultSignatures.length == 3 || $scope.temp.policy.triggerfaultSignatures["Fault3"] != null){ - var faultData = {trap1 : $scope.temp.policy.triggerfaultSignatures.Fault1, trap2 : $scope.temp.policy.triggerfaultSignatures.Fault2, - trap2 : $scope.temp.policy.triggerfaultSignatures.Fault3} - } - if($scope.temp.policy.triggerTrapSignatures.length == 4 || $scope.temp.policy.triggerfaultSignatures["Fault4"] != null){ - var faultData = {trap1 : $scope.temp.policy.triggerfaultSignatures.Fault1, trap2 : $scope.temp.policy.triggerfaultSignatures.Fault2, - trap3 : $scope.temp.policy.triggerfaultSignatures.Fault3, trap4 : $scope.temp.policy.triggerfaultSignatures.Fault4} - } - if($scope.temp.policy.triggerfaultSignatures.length == 5 || $scope.temp.policy.triggerfaultSignatures["Fault5"] != null){ - var faultData = {trap1 : $scope.temp.policy.triggerfaultSignatures.Fault1, trap2 : $scope.temp.policy.triggerfaultSignatures.Fault2, - trap3 : $scope.temp.policy.triggerfaultSignatures.Fault3, trap4 : $scope.temp.policy.triggerfaultSignatures.Fault4, - trap5 : $scope.temp.policy.triggerfaultSignatures.Fault5} - } - if($scope.temp.policy.triggerfaultSignatures.length == 6 || $scope.temp.policy.triggerfaultSignatures["Fault6"] != null){ - var faultData = {trap1 : $scope.temp.policy.triggerfaultSignatures.Fault1, trap2 : $scope.temp.policy.triggerfaultSignatures.Fault2, - trap3 : $scope.temp.policy.triggerfaultSignatures.Fault3, trap4 : $scope.temp.policy.triggerfaultSignatures.Fault4, - trap5 : $scope.temp.policy.triggerfaultSignatures.Fault5, trap6 : $scope.temp.policy.triggerfaultSignatures.Fault6} - } - var uuu = "policyController/save_Faultpolicy.htm"; - var postData={policyData: policy, - trapData : data, - faultData : faultData - }; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){ - $scope.data=data.data; - $scope.temp.policy.readOnly = 'true'; - $scope.triggerdisabled = true; - $scope.verificationdisabled = true; - Notification.success("Policy Saved Successfully."); - }); - console.log($scope.data); - $modalInstance.close(); - - }, - error : function(data){ - Notification.error("Error Occured while saving Policy."); - } - }); - }; - - $scope.validatePolicy = function(policy){ - console.log(policy); - var uuu = "policyController/validate_policy.htm"; - var postData={policyData: policy}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){ - $scope.data=data.data.substring(1,8); - var size = data.data.length; - if($scope.data == 'success'){ - Notification.success("Validation Success."); - if (size > 18){ - var displayWarning = data.data.substring(19,size); - window.alert(displayWarning); - } - }else{ - Notification.error("Validation Failed."); - } - - }); - console.log($scope.data); - /*$modalInstance.close();*/ - - }, - error : function(data){ - Notification.error("Validation Failed."); - } - }); - }; - if($scope.connectTriggerTrapsList == undefined){ - $scope.connectTriggerTrapsList = []; - } - if($scope.temp.policy.traptriggerSignatures == undefined){ - $scope.temp.policy.traptriggerSignatures = []; - } - - $scope.ItemNo = 0; - $scope.TriggerSignatureDatas = [{"triggerSignatures" : $scope.temp.policy.traptriggerSignatures}]; - $scope.addTriggerButton = function() { - $scope.triggerdisabled = false; - var newItemNo = $scope.temp.policy.traptriggerSignatures.length+1; - $scope.ItemNo = newItemNo; - $scope.temp.policy.traptriggerSignatures.push({'id':'Trap'+newItemNo}); - $scope.connectTriggerTrapsList.push('Trap'+newItemNo); - }; - $scope.removeTriggerButton = function() { - var lastItem = $scope.temp.policy.traptriggerSignatures.length-1; - $scope.temp.policy.traptriggerSignatures.splice(lastItem); - $scope.connectTriggerTrapsList.splice('Trap'+lastItem); - }; - - - $scope.trapItemNo = 0; - $scope.TrapTriggerSignatureDatas = [{"triggermainSignatures" : $scope.temp.policy.triggerTrapSignatures}]; - $scope.addTrapTriggerButton = function(indexId) { - if(trapCollection.indexOf(indexId) !== -1){ - - }else{ - $scope.temp.policy.triggerTrapSignatures[indexId] = []; - trapCollection.push(indexId); - } - var newTrapItemNo = $scope.temp.policy.triggerTrapSignatures[indexId].length+1; - $scope.trapItemNo = newTrapItemNo; - $scope.temp.policy.triggerTrapSignatures.push($scope.temp.policy.triggerTrapSignatures[indexId].push({'id':'A'+newTrapItemNo})); - if(newTrapItemNo > 1){ - var count = newTrapItemNo-1; - $scope.varbindDictionaryDatas.push('A'+count); - } - }; - $scope.removeTrapTriggerButton = function(indexId) { - var lastTrapItem = $scope.temp.policy.triggerTrapSignatures[indexId].length-1; - var checkLastTrapItem = lastTrapItem; - if(checkLastTrapItem == 0){ - trapCollection.splice(indexId); - } - $scope.temp.policy.triggerTrapSignatures[indexId].splice(lastTrapItem); - }; - - if($scope.temp.policy.connecttriggerSignatures == undefined){ - $scope.temp.policy.connecttriggerSignatures = []; - } - - $scope.connecttrapItemNo = 0; - $scope.TrapConnectTriggerSignatureDatas = [{"connecttriggerSignatures" : $scope.temp.policy.connecttriggerSignatures}]; - $scope.addTriggerConnectButton = function() { - var newConnectTrapItemNo = $scope.temp.policy.connecttriggerSignatures.length+1; - $scope.connecttrapItemNo = newConnectTrapItemNo; - $scope.temp.policy.connecttriggerSignatures.push({'id':'C'+newConnectTrapItemNo}); - if(newConnectTrapItemNo >1){ - var count = newConnectTrapItemNo-1; - $scope.connectTriggerTrapsList.push('C'+count); - } - }; - $scope.removeTriggerConnectButton = function() { - var lastConnectTrapItem = $scope.temp.policy.connecttriggerSignatures.length-1; - $scope.temp.policy.connecttriggerSignatures.splice(lastConnectTrapItem); - if(lastConnectTrapItem < 1){ - var count = lastConnectTrapItem-1; - $scope.connectTriggerTrapsList.splice('C'+count); - } - }; - if($scope.connectTriggerFaultsList == undefined){ - $scope.connectTriggerFaultsList = []; - } - if($scope.temp.policy.faulttriggerSignatures == undefined){ - $scope.temp.policy.faulttriggerSignatures = []; - } - - $scope.FaultItemNo = 0; - $scope.FaultSignatureDatas = [{"verificationmainSignatures" : $scope.temp.policy.faulttriggerSignatures}]; - $scope.addVerFaultButton = function() { - var newFaultItemNo = $scope.temp.policy.faulttriggerSignatures.length+1; - $scope.FaultItemNo = newFaultItemNo; - $scope.temp.policy.faulttriggerSignatures.push({'id':'Fault'+newFaultItemNo}); - $scope.connectTriggerFaultsList.push('Fault'+newFaultItemNo); - }; - $scope.removeVerFaultButton = function() { - var lastFaultItem = $scope.temp.policy.faulttriggerSignatures.length-1; - $scope.temp.policy.faulttriggerSignatures.splice(lastFaultItem); - $scope.connectTriggerFaultsList.splice('Fault'+lastFaultItem); - }; - if($scope.temp.policy.triggerfaultSignatures == undefined){ - $scope.temp.policy.triggerfaultSignatures = []; - } - - $scope.faultItemNo1 = 0; - $scope.FaultTriggerSignatureDatas = [{"verificationSignatures" : $scope.temp.policy.triggerfaultSignatures}]; - $scope.addVerTriggerButton = function(indexId) { - $scope.verificationdisabled = false; - if(faultCollection.indexOf(indexId) !== -1){ - - }else{ - $scope.temp.policy.triggerfaultSignatures[indexId] = []; - faultCollection.push(indexId); - } - var newFaultItemNo1 = $scope.temp.policy.triggerfaultSignatures[indexId].length+1; - $scope.faultItemNo1 = newFaultItemNo1; - $scope.temp.policy.triggerfaultSignatures.push($scope.temp.policy.triggerfaultSignatures[indexId].push({'id':'A'+newFaultItemNo1})); - if(newFaultItemNo1 > 1){ - var count = newFaultItemNo1-1; - $scope.varbindDictionaryDatas.push('A'+count); - } - }; - $scope.removeVerTriggerButton = function(indexId) { - var lastFaultItem1 = $scope.temp.policy.triggerfaultSignatures[indexId].length-1; - var checkLastFaultItem = lastFaultItem1; - if(checkLastFaultItem == 0){ - faultCollection.splice(indexId); - } - $scope.temp.policy.triggerfaultSignatures[indexId].splice(lastFaultItem1); - }; - - if($scope.temp.policy.connectVerificationSignatures == undefined){ - $scope.temp.policy.connectVerificationSignatures = []; - } - - $scope.connectFaultItemNo = 0; - $scope.FaultConnectTriggerSignatureDatas = [{"connectVerificationSignatures" : $scope.temp.policy.connectVerificationSignatures}]; - $scope.addFaultConnectButton = function() { - var newConnectFaultItemNo = $scope.temp.policy.connectVerificationSignatures.length+1; - $scope.connectFaultItemNo = newConnectFaultItemNo; - $scope.temp.policy.connectVerificationSignatures.push({'id':'C'+newConnectFaultItemNo}); - if(newConnectFaultItemNo >1){ - var count = newConnectFaultItemNo-1; - $scope.connectTriggerFaultsList.push('C'+count); - } - }; - $scope.removeFaultConnectButton = function() { - var lastConnectFaultItem = $scope.temp.policy.connectVerificationSignatures.length-1; - $scope.temp.policy.connectVerificationSignatures.splice(lastConnectFaultItem); - if(lastConnectFaultItem < 1){ - var count = lastConnectFaultItem-1; - $scope.connectTriggerFaultsList.splice('C'+count); - } - }; - - -}); \ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/ClosedLoopPMController.js b/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/ClosedLoopPMController.js deleted file mode 100644 index 8497a810a..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/ClosedLoopPMController.js +++ /dev/null @@ -1,178 +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========================================================= - */ - -/** - * - */ -angular.module("abs").controller('clPMController', function($scope, $window, $timeout, PapUrlService, ClosedLoopPMService, PolicyDictionaryService, modalService, $modal, Notification){ - $("#dialog").hide(); - - $scope.temp.policy.ttlDate = new Date($scope.temp.policy.ttlDate); - var papUrl; - PapUrlService.getPapUrl().then(function(data) { - var config = data; - papUrl = config.PAP_URL; - console.log(papUrl); - - PolicyDictionaryService.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"); - }); - PolicyDictionaryService.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"); - }); - PolicyDictionaryService.getRiskLevelValueData().then(function (data) { - var j = data; - $scope.data = JSON.parse(j.data); - console.log($scope.data); - $scope.riskLevelDatas = JSON.parse($scope.data.riskLevelDatas); - console.log($scope.riskLevelDatas); - }, function (error) { - console.log("failed"); - }); - PolicyDictionaryService.getGuardValueData().then(function (data) { - var j = data; - $scope.data = JSON.parse(j.data); - console.log($scope.data); - $scope.guardDatas = JSON.parse($scope.data.guardDatas); - console.log($scope.guardDatas); - }, function (error) { - console.log("failed"); - }); - - }); - - ClosedLoopPMService.getPMJSONBodyData().then(function(data){ - var j = data; - $scope.PMData = j; - }); - - $scope.temp.policy.verticaMetrics = []; - $scope.temp.policy.description = []; - $scope.temp.policy.attributes = []; - - $scope.addDataToFields = function(serviceType){ - if($scope.PMData == undefined){ - $scope.temp.policy.verticaMetrics = []; - $scope.temp.policy.description = []; - $scope.temp.policy.attributes = []; - ClosedLoopPMService.getPMJSONBodyData().then(function(data){ - var j = data; - $scope.PMData = j; - if(serviceType.serviceTypePolicyName == 'Registration Failure(Trinity)'){ - var myNewData = $scope.PMData[0]; - }else if(serviceType.serviceTypePolicyName == 'International Fraud(Trinity)'){ - var myNewData = $scope.PMData[1]; - }else if(serviceType.serviceTypePolicyName == 'No dial tone(Trinity)'){ - var myNewData = $scope.PMData[2]; - }else if(serviceType.serviceTypePolicyName == 'Call storm(Trinity)'){ - var myNewData = $scope.PMData[3]; - }else if(serviceType.serviceTypePolicyName == 'Registration storm(Trinity)'){ - var myNewData = $scope.PMData[4]; - } - - $scope.temp.policy.verticaMetrics = myNewData; - $scope.temp.policy.description = myNewData; - $scope.temp.policy.attributeFields = myNewData; - }); - }else{ - var key = $scope.PMData.indexOf(serviceType); - var myNewData = $scope.PMData[key]; - $scope.temp.policy.verticaMetrics = myNewData; - $scope.temp.policy.description = myNewData; - $scope.temp.policy.attributeFields = myNewData; - } - - }; - - $scope.saveCLPMPolicy = function(policy){ - console.log(policy); - console.log(); - var uuu = "policyController/save_PMPolicy.htm"; - var postData={policyData: policy}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){ - $scope.data=data.data; - $scope.temp.policy.readOnly = 'true'; - Notification.success("Policy Saved Successfully."); - }); - console.log($scope.data); - $modalInstance.close(); - - }, - error : function(data){ - Notification.error("Error Occured while saving Policy."); - } - }); - }; - - $scope.validatePolicy = function(policy){ - console.log(policy); - var uuu = "policyController/validate_policy.htm"; - var postData={policyData: policy}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){ - $scope.data=data.data.substring(1,8); - var size = data.data.length; - if($scope.data == 'success'){ - Notification.success("Validation Success."); - if (size > 18){ - var displayWarning = data.data.substring(19,size); - window.alert(displayWarning); - } - }else{ - Notification.error("Validation Failed."); - } - - }); - console.log($scope.data); - /*$modalInstance.close();*/ - - }, - error : function(data){ - Notification.error("Validation Failed."); - } - }); - }; - -}) \ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/DCAEMicroServicePolicyController.js b/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/DCAEMicroServicePolicyController.js deleted file mode 100644 index ba1126311..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/DCAEMicroServicePolicyController.js +++ /dev/null @@ -1,694 +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========================================================= - */ - -/** - */ -angular.module('abs').controller('dcaeMicroServiceController', function ($scope, $window, $compile, PapUrlService, PolicyDictionaryService, modalService, $modal, Notification) { - $("#dialog").hide(); - - $scope.temp.policy.ttlDate = new Date($scope.temp.policy.ttlDate); - var papUrl; - PapUrlService.getPapUrl().then(function(data) { - var config = data; - papUrl = config.PAP_URL; - console.log(papUrl); - - PolicyDictionaryService.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"); - }); - - PolicyDictionaryService.getPriorityValueData().then(function (data) { - var j = data; - $scope.data = JSON.parse(j.data); - console.log($scope.data); - $scope.priorityDatas = JSON.parse($scope.data.priorityDatas); - console.log($scope.priorityDatas); - }, function (error) { - console.log("failed"); - }); - - PolicyDictionaryService.getPolicyScopeData(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"); - }); - - PolicyDictionaryService.getMSConfigDataByName(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"); - }); - - PolicyDictionaryService.getMSLocationDataByName(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"); - }); - - PolicyDictionaryService.getMSServiceModelsDataByName(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"); - }); - - PolicyDictionaryService.getDCAEuuidDataByName(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"); - }); - - PolicyDictionaryService.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"); - }); - - PolicyDictionaryService.getRiskLevelValueData().then(function (data) { - var j = data; - $scope.data = JSON.parse(j.data); - console.log($scope.data); - $scope.riskLevelDatas = JSON.parse($scope.data.riskLevelDatas); - console.log($scope.riskLevelDatas); - }, function (error) { - console.log("failed"); - }); - - PolicyDictionaryService.getGuardValueData().then(function (data) { - var j = data; - $scope.data = JSON.parse(j.data); - console.log($scope.data); - $scope.guardDatas = JSON.parse($scope.data.guardDatas); - console.log($scope.guardDatas); - }, function (error) { - console.log("failed"); - }); - }); - - $scope.choices = []; - $scope.attributeDatas = [{"attributes" : $scope.choices}]; - - $scope.addNewChoice = function(value) { - console.log(value); - if(value != undefined){ - var parentElement = document.getElementById("div."+value); - var div = document.getElementById(value+"@0"); - if(div != null){ - var clone = div.cloneNode(true); - var addElement = parentElement.childElementCount + 1; - clone.id = ''+value+'@'+addElement; - clone.value = ''; - document.getElementById("div."+value).appendChild(clone); - plainAttributeKeys.push(''+value+'@'+addElement); - }else{ - div = document.getElementById("div."+value+"@0"); - var childElement = parentElement.firstElementChild; - var countParent = parentElement.childElementCount; - var childElementString = childElement.innerHTML; - var find = value+"@0"; - var re = new RegExp(find, 'g'); - childElementString = childElementString.replace(re,value+'@' + countParent); - var clone = childElement.cloneNode(true); - for (var ii = 0; ii < parentElement.childNodes.length; ii++){ - var childId = parentElement.childNodes[ii].id; - if(ii = parentElement.childNodes.length){ - var childnewId = childId.slice(0, -1); - var count = childId.slice(-1); - } - } - var countvalue = parseInt(count) + 1; - clone.id = childnewId+countvalue; - clone.value = ''; - clone.innerHTML=childElementString; - document.getElementById("div."+value).appendChild(clone); - var inputs = clone.getElementsByTagName("input"); - for(var i=0; i0){ - if(attributes.indexOf(splitComma) >= 0){ - var attributesAfterCommaSplit = attributes.split(splitComma); - for(i = 0; i < attributesAfterCommaSplit.length; i++){ - if(attributesAfterCommaSplit[i].indexOf(splitcolon) > 0){ - var splitAttribute = attributesAfterCommaSplit[i].split(splitcolon); - $scope.attributeLayout(splitAttribute); - } - } - }else{ - //Implementation for single Attribute - var attributesAfterCommaSplit = attributes; - var splitAttribute = attributesAfterCommaSplit.split(splitcolon); - $scope.attributeLayout(splitAttribute); - - } - } - if(refAttributes != null){ - if(refAttributes.indexOf(splitComma) >= 0){ - var refattributesAfterCommaSplit = refAttributes.split(splitComma); - for(j = 0; j < refattributesAfterCommaSplit.length; j++){ - if(refattributesAfterCommaSplit[j].indexOf(splitcolon) > 0){ - var splitRefAttribute = refattributesAfterCommaSplit[j].split(splitcolon); - $scope.refAttributeLayout(splitRefAttribute, subAttributes); - } - } - }else{ - //Implementation for single RefAttribute - if(refAttributes != ""){ - var refattributesAfterCommaSplit = refAttributes; - var splitRefAttribute = refattributesAfterCommaSplit.split(splitcolon); - $scope.refAttributeLayout(splitRefAttribute, subAttributes); - } - } - } - }); - if($scope.temp.policy.editPolicy || $scope.temp.policy.readOnly){ - var checkData = []; - var data = []; - if($scope.temp.policy.ruleData != null){ - var propNames = Object.getOwnPropertyNames($scope.temp.policy.ruleData); - propNames.forEach(function(name) { - data.push(name); - }); - for(a = 0; a < data.length; a++){ - var splitPlainAttributeKey1 = data[a].split("."); - if(splitPlainAttributeKey1[0].indexOf("@") != -1){ - var key = splitPlainAttributeKey1[0]; - checkData.push(key); - } - } - var unique = checkData.filter(onlyUnique); - for(i =0; i < unique.length; i++){ - if(unique[i].indexOf("@0") == -1){ - var finalkey = unique[i].split("@")[0]; - $scope.addNewChoice(finalkey); - } - } - } - } - var ele = angular.element(document.getElementById("DynamicTemplate")); - $compile(ele.contents())($scope); - $scope.$apply(); - }, - error : function(data){ - alert("Error While Retriving the Template Layout Pattren."); - } - }); - } - }; - - function onlyUnique(value, index, self) { - return self.indexOf(value) === index; - }; - - $scope.attributeLayout = function(splitAttribute){ - var attributeValue = splitAttribute[0]; - var splitAttributeValue = attributeValue.split(splitEqual); - var attibuteKey = splitAttributeValue[0].trim(); - var attributeType = splitAttributeValue[1]; - var attributedefaultValue = splitAttribute[1]; - var attributeRequiredValue = splitAttribute[2]; - var attributeManyValue = splitAttribute[3]; - var splitAttributeMany = attributeManyValue.split(splitDash); - var attributeManyKey = splitAttributeMany[1]; - $scope.temp.policy.ruleGridData.push(attibuteKey); - var br = document.createElement("BR"); - var label = document.createElement("Label"); - var labeltext = document.createTextNode(attibuteKey); - label.appendChild(labeltext); - var element = document.getElementById("DynamicTemplate"); - var textField = document.createElement("INPUT"); - textField.setAttribute("class" , "form-control"); - textField.setAttribute("type" , "text"); - textField.setAttribute("style" , "width:300px;"); - textField.setAttribute("ng-disabled" , "temp.policy.readOnly"); - var checkKey; - if(attributeManyKey == 'true'){ - checkKey = attibuteKey+'@0'; - textField.setAttribute("id" , ''+attibuteKey+'@0'+''); - var divTag = document.createElement("div"); - divTag.setAttribute("id", "div."+attibuteKey); - var addButton = document.createElement("BUTTON"); - var buttonaddLabel = document.createTextNode("+"); - addButton.appendChild(buttonaddLabel); - addButton.setAttribute("id", attibuteKey); - addButton.setAttribute("class", "btn btn-default"); - addButton.setAttribute("ng-click" , 'addNewChoice("'+attibuteKey+'");'); - addButton.setAttribute("ng-disabled" , "temp.policy.readOnly"); - var removeButton = document.createElement("BUTTON"); - var buttonremoveLabel = document.createTextNode("-"); - removeButton.appendChild(buttonremoveLabel); - removeButton.setAttribute("class", "btn btn-default"); - removeButton.setAttribute("ng-click" , 'removeChoice("'+attibuteKey+'");'); - removeButton.setAttribute("ng-disabled" , "temp.policy.readOnly"); - document.getElementById("DynamicTemplate").appendChild(addButton); - document.getElementById("DynamicTemplate").appendChild(removeButton); - document.getElementById("DynamicTemplate").appendChild(label); - document.getElementById("DynamicTemplate").appendChild(textField); - document.getElementById("DynamicTemplate").appendChild(divTag); - document.getElementById("DynamicTemplate").appendChild(br); - }else{ - checkKey = attibuteKey; - textField.setAttribute("id" , ''+attibuteKey+''); - document.getElementById("DynamicTemplate").appendChild(label); - document.getElementById("DynamicTemplate").appendChild(textField); - document.getElementById("DynamicTemplate").appendChild(br); - } - if($scope.temp.policy.ruleData != null){ - document.getElementById(checkKey).value = $scope.temp.policy.ruleData[checkKey]; - } - plainAttributeKeys.push(attibuteKey+'*'+attributeManyKey); - }; - - $scope.firstlayer = null; - $scope.secondlayer = null; - $scope.refAttributeLayout = function(splitRefAttribute, subAttributes){ - var attibuteKey = splitRefAttribute[0]; - var splitRefAttributeValue = attibuteKey.split(splitEqual); - var refattributeLabel = splitRefAttributeValue[0].trim(); - var refattributeValue = splitRefAttributeValue[1].trim(); - - var refattributeManyValue = splitRefAttribute[1]; - var splitRefAttributeMany = refattributeManyValue.split(splitDash); - var refattributeManyKey = splitRefAttributeMany[1]; - var subAttributeJSON = JSON.parse(subAttributes); - var resultValue = subAttributeJSON[refattributeValue]; - var br = document.createElement("BR"); - var label = document.createElement("Label"); - var labeltext = document.createTextNode(refattributeLabel); - label.appendChild(labeltext); - - if(refattributeManyKey == 'true'){ - - var divTag = document.createElement("div"); - divTag.setAttribute("id", "div."+refattributeLabel); - var addButton = document.createElement("BUTTON"); - var buttonLabel = document.createTextNode("+"); - addButton.appendChild(buttonLabel); - addButton.setAttribute("id", refattributeLabel); - addButton.setAttribute("class", "btn btn-default"); - addButton.setAttribute("ng-click" , 'addNewChoice("'+refattributeLabel+'");'); - addButton.setAttribute("ng-disabled" , "temp.policy.readOnly"); - var removeButton = document.createElement("BUTTON"); - var buttonremoveLabel = document.createTextNode("-"); - removeButton.appendChild(buttonremoveLabel); - removeButton.setAttribute("class", "btn btn-default"); - removeButton.setAttribute("ng-click" , 'removeChoice("'+refattributeLabel+'");'); - removeButton.setAttribute("ng-disabled" , "temp.policy.readOnly"); - document.getElementById("DynamicTemplate").appendChild(addButton); - document.getElementById("DynamicTemplate").appendChild(removeButton); - document.getElementById("DynamicTemplate").appendChild(label); - document.getElementById("DynamicTemplate").appendChild(br); - document.getElementById("DynamicTemplate").appendChild(divTag); - var divTag = document.createElement("div"); - divTag.setAttribute("id", "div."+refattributeLabel+"@0"); - document.getElementById("div."+refattributeLabel).appendChild(divTag); - $scope.firstlayer = refattributeLabel+"@0"; - $scope.subAttributeLayout(resultValue, subAttributes, refattributeLabel); - document.getElementById("DynamicTemplate").appendChild(br); - }else{ - document.getElementById("DynamicTemplate").appendChild(label); - document.getElementById("DynamicTemplate").appendChild(br); - $scope.firstlayer = refattributeLabel; - $scope.subAttributeLayout(resultValue, subAttributes, refattributeLabel); - } - }; - - $scope.subAttributeLayout = function(resultValue, subAttributes, refattributeLabel){ - for(var key in resultValue){ - key = key.trim(); - if(key == 'logicalConnector'){ - $scope.secondlayer = null; - } - var splitSubAttribute = resultValue[key].split(splitcolon); - var br = document.createElement("BR"); - var label = document.createElement("Label"); - var labeltext = document.createTextNode(key); - label.appendChild(labeltext); - var textField = document.createElement("INPUT"); - textField.setAttribute("class" , "form-control"); - textField.setAttribute("type" , "text"); - textField.setAttribute("style" , "width:300px;"); - textField.setAttribute("ng-disabled" , "temp.policy.readOnly"); - - if(splitSubAttribute.length >= 3){ - var subattributeType = splitSubAttribute[0]; - var subattributedefaultValue = splitSubAttribute[1]; - var subattributeRequiredValue = splitSubAttribute[2]; - var subattributeManyValue = splitSubAttribute[3]; - var splitSubAttributeMany = subattributeManyValue.split(splitDash); - var subattributeManyKey = splitSubAttributeMany[1]; - if(subattributeManyKey == 'true'){ - if($scope.firstlayer == null && $scope.secondlayer == null){ - textField.setAttribute("id" , ''+key+'@0'+''); - } - if($scope.firstlayer != null && $scope.secondlayer == null){ - textField.setAttribute("id" , ''+$scope.firstlayer+'.'+key+'@0'+''); - } - if($scope.firstlayer != null && $scope.secondlayer != null){ - textField.setAttribute("id" , ''+$scope.firstlayer+'.'+$scope.secondlayer+'@0.'+key+'@0'+''); - } - var divTag = document.createElement("div"); - var addButton = document.createElement("BUTTON"); - var buttonLabel = document.createTextNode("+"); - addButton.appendChild(buttonLabel); - addButton.setAttribute("class", "btn btn-default"); - addButton.setAttribute("ng-disabled" , "temp.policy.readOnly"); - var removeButton = document.createElement("BUTTON"); - var buttonremoveLabel = document.createTextNode("-"); - removeButton.appendChild(buttonremoveLabel); - removeButton.setAttribute("class", "btn btn-default"); - if($scope.secondlayer == null){ - addButton.setAttribute("ng-click" , 'addNewChoice("'+$scope.firstlayer+'.'+key+'");'); - removeButton.setAttribute("ng-click" , 'removeChoice("'+$scope.firstlayer+'.'+key+'");'); - divTag.setAttribute("id", "div."+$scope.firstlayer+'.'+key); - }else{ - addButton.setAttribute("ng-click" , 'addNewChoice("'+$scope.firstlayer+'.'+$scope.secondlayer+'@0.'+key+'");'); - removeButton.setAttribute("ng-click" , 'removeChoice("'+$scope.firstlayer+'.'+$scope.secondlayer+'@0.'+key+'");'); - divTag.setAttribute("id", "div."+$scope.firstlayer+'.'+$scope.secondlayer+'@0.'+key); - } - - removeButton.setAttribute("ng-disabled" , "temp.policy.readOnly"); - if(!refattributeLabel.startsWith('div.')){ - refattributeLabel = 'div.'+refattributeLabel+"@0"; - } - document.getElementById(refattributeLabel).appendChild(addButton); - document.getElementById(refattributeLabel).appendChild(removeButton); - document.getElementById(refattributeLabel).appendChild(label); - document.getElementById(refattributeLabel).appendChild(textField); - document.getElementById(refattributeLabel).appendChild(divTag); - document.getElementById(refattributeLabel).appendChild(br); - }else{ - if($scope.firstlayer == null && $scope.secondlayer == null){ - textField.setAttribute("id" , ''+key+''); - } - if($scope.firstlayer != null && $scope.secondlayer == null){ - textField.setAttribute("id" , ''+$scope.firstlayer+'.'+key+''); - } - if($scope.firstlayer != null && $scope.secondlayer != null){ - textField.setAttribute("id" , ''+$scope.firstlayer+'.'+$scope.secondlayer+'@0.'+key+''); - } - if(!refattributeLabel.startsWith('div.')){ - refattributeLabel = 'div.'+refattributeLabel+"@0"; - } - document.getElementById(refattributeLabel).appendChild(label); - document.getElementById(refattributeLabel).appendChild(textField); - document.getElementById(refattributeLabel).appendChild(br); - } - if($scope.secondlayer == null){ - plainAttributeKeys.push($scope.firstlayer+'.'+key+'*'+subattributeManyKey); - if($scope.temp.policy.ruleData != null){ - if(document.getElementById($scope.firstlayer+'.'+key) != null){ - document.getElementById($scope.firstlayer+'.'+key).value = $scope.temp.policy.ruleData[$scope.firstlayer+'.'+key]; - }else{ - document.getElementById($scope.firstlayer+'.'+key+'@0').value = $scope.temp.policy.ruleData[$scope.firstlayer+'.'+key+'@0']; - var i =1 ; - while(true){ - var newValue = $scope.temp.policy.ruleData[$scope.firstlayer+'.'+key+'@'+i]; - if(newValue==null){ - break; - }else{ - $scope.addNewChoice($scope.firstlayer+'.'+key); - document.getElementById($scope.firstlayer+'.'+key+'@'+i).value = newValue; - i = i+1; - } - } - } - - } - }else{ - plainAttributeKeys.push($scope.firstlayer+'.'+$scope.secondlayer+'@0.'+key+'*'+subattributeManyKey); - if($scope.temp.policy.ruleData != null){ - if(document.getElementById($scope.firstlayer+'.'+$scope.secondlayer+'@0.'+key) != null){ - document.getElementById($scope.firstlayer+'.'+$scope.secondlayer+'@0.'+key).value = $scope.temp.policy.ruleData[$scope.firstlayer+'.'+$scope.secondlayer+'@0.'+key]; - }else{ - document.getElementById($scope.firstlayer+'.'+$scope.secondlayer+'@0.'+key+'@0').value = $scope.temp.policy.ruleData[$scope.firstlayer+'.'+$scope.secondlayer+'@0.'+key+'@0']; - var i =1 ; - while(true){ - var newValue = $scope.temp.policy.ruleData[$scope.firstlayer+'.'+$scope.secondlayer+'@0.'+key+'@'+i]; - if(newValue==null){ - break; - }else{ - $scope.addNewChoice($scope.firstlayer+'.'+$scope.secondlayer+'@0.'+key); - document.getElementById($scope.firstlayer+'.'+$scope.secondlayer+'@0.'+key+'@'+i).value = newValue; - i = i+1; - } - } - } - - } - } - }else{ - //Add Recursive Function - var saveResultValue = resultValue; - var subAttributeJSON = JSON.parse(subAttributes); - var recursiveKey = splitSubAttribute[0].trim(); - var resultValue = subAttributeJSON[recursiveKey]; - var recursiveMany = splitSubAttribute[1]; - var br = document.createElement("BR"); - var label = document.createElement("Label"); - var labeltext = document.createTextNode(key); - label.appendChild(labeltext); - - if(recursiveMany == 'MANY-true'){ - var addButton = document.createElement("BUTTON"); - var buttonLabel = document.createTextNode("+"); - addButton.appendChild(buttonLabel); - addButton.setAttribute("class", "btn btn-default"); - addButton.setAttribute("ng-disabled" , "temp.policy.readOnly"); - var removeButton = document.createElement("BUTTON"); - var buttonremoveLabel = document.createTextNode("-"); - removeButton.appendChild(buttonremoveLabel); - removeButton.setAttribute("class", "btn btn-default"); - addButton.setAttribute("ng-click" , 'addNewChoice("'+$scope.firstlayer+'.'+key+'");'); - removeButton.setAttribute("ng-click" , 'removeChoice("'+$scope.firstlayer+'.'+key+'");'); - removeButton.setAttribute("ng-disabled" , "temp.policy.readOnly"); - var idf = "div."+$scope.firstlayer; - document.getElementById(idf).appendChild(addButton); - document.getElementById(idf).appendChild(removeButton); - document.getElementById(idf).appendChild(label); - document.getElementById(idf).appendChild(br); - var id = "div."+$scope.firstlayer+'.'+key; - var divTag = document.createElement("div"); - divTag.setAttribute("id",id); - document.getElementById("div."+$scope.firstlayer).appendChild(divTag); - $scope.secondlayer = key; - var idc = "div."+$scope.firstlayer+key+'@0'; - var divTag = document.createElement("div"); - divTag.setAttribute("id", idc); - document.getElementById(id).appendChild(divTag); - $scope.subAttributeLayout(resultValue, subAttributes, idc); - document.getElementById(id).appendChild(br); - }else{ - var id = "div."+$scope.firstlayer+'.'+key; - var divTag = document.createElement("div"); - divTag.setAttribute("id",id); - document.getElementById("div."+$scope.firstlayer).appendChild(divTag); - document.getElementById(id).appendChild(br); - document.getElementById(id).appendChild(label); - document.getElementById(id).appendChild(br); - $scope.secondlayer = key; - $scope.subAttributeLayout(resultValue, subAttributes, id); - } - resultValue = saveResultValue; - //$scope.secondlayer == null; - if($scope.secondlayer == null){ - plainAttributeKeys.push($scope.firstlayer+'.'+key+'*'+recursiveMany); - if($scope.temp.policy.ruleData != null){ - if(document.getElementById($scope.firstlayer+'.'+key) != null){ - document.getElementById($scope.firstlayer+'.'+key).value = $scope.temp.policy.ruleData[$scope.firstlayer+'.'+key]; - }else{ - document.getElementById($scope.firstlayer+'.'+key+'@0').value = $scope.temp.policy.ruleData[$scope.firstlayer+'.'+key+'@0']; - } - } - }else{ - plainAttributeKeys.push($scope.firstlayer+'.'+$scope.secondlayer+'@0.'+key+'*'+recursiveMany); - if($scope.temp.policy.ruleData != null){ - if(document.getElementById($scope.firstlayer+'.'+$scope.secondlayer+'@0.'+key) != null){ - document.getElementById($scope.firstlayer+'.'+$scope.secondlayer+'@0.'+key).value = $scope.temp.policy.ruleData[$scope.firstlayer+'.'+$scope.secondlayer+'@0.'+key]; - }else{ - if(document.getElementById($scope.firstlayer+'.'+$scope.secondlayer+'@0.'+key+'@0') != null){ - document.getElementById($scope.firstlayer+'.'+$scope.secondlayer+'@0.'+key+'@0').value = $scope.temp.policy.ruleData[$scope.firstlayer+'.'+$scope.secondlayer+'@0.'+key+'@0']; - }else if(document.getElementById($scope.firstlayer+'.'+$scope.secondlayer+'@0.'+key) != null){ - document.getElementById($scope.firstlayer+'.'+$scope.secondlayer+'@0.'+key).value = $scope.temp.policy.ruleData[$scope.firstlayer+'.'+$scope.secondlayer+'@0.'+key+'@0']; - } - } - } - } - } - } - }; - - $scope.savePolicy = function(policy){ - var splitAt = '*'; - var dot ='.'; - var jsonPolicy = {}; - if(plainAttributeKeys != null){ - for(a = 0; a < plainAttributeKeys.length; a++){ - var splitPlainAttributeKey = plainAttributeKeys[a].split(splitAt); - console.log(splitPlainAttributeKey[1]); - var searchElement = document.getElementById(splitPlainAttributeKey[0]); - var key = splitPlainAttributeKey[0]; - if(searchElement == null){ - searchElement = document.getElementById(splitPlainAttributeKey[0]+'@0'); - key = splitPlainAttributeKey[0]+'@0'; - } - if(searchElement != null){ - if(searchElement.value != null){ - jsonPolicy[key]= searchElement.value; - } - } - } - } - var uuu = "policyController/save_DCAEMSPolicy.htm"; - var postData={policyData: policy, policyJSON : jsonPolicy}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){ - $scope.data=data.data; - $scope.temp.policy.readOnly = 'true'; - Notification.success("Policy Saved Successfully."); - }); - console.log($scope.data); - $modalInstance.close(); - - }, - error : function(data){ - Notification.error("Error Occured while saving Policy."); - } - }); - }; - - $scope.validatePolicy = function(policy){ - var uuu = "policyController/validate_policy.htm"; - var postData={policyData: policy}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){ - $scope.data=data.data.substring(1,8); - var size = data.data.length; - if($scope.data == 'success'){ - Notification.success("Validation Success."); - if (size > 18){ - var displayWarning = data.data.substring(19,size); - window.alert(displayWarning); - } - }else{ - Notification.error("Validation Failed."); - } - - }); - console.log($scope.data); - }, - error : function(data){ - Notification.error("Validation Failed."); - } - }); - }; - - function extend(obj, src) { - for (var key in src) { - if (src.hasOwnProperty(key)) obj[key] = src[key]; - } - return obj; - } -}); diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/DecisionPolicyController.js b/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/DecisionPolicyController.js deleted file mode 100644 index 1e7c436f0..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/DecisionPolicyController.js +++ /dev/null @@ -1,212 +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========================================================= - */ - -/** - * - */ - -angular.module('abs').controller('decisionPolicyController', function ($scope, PapUrlService, PolicyDictionaryService,modalService, $modal, Notification) { - $("#dialog").hide(); - var papUrl; - if($scope.temp.policy.ruleProvider==undefined){ - $scope.temp.policy.ruleProvider="Custom"; - } - PapUrlService.getPapUrl().then(function(data) { - var config = data; - papUrl = config.PAP_URL; - console.log(papUrl); - - PolicyDictionaryService.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"); - }); - - PolicyDictionaryService.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"); - }); - - PolicyDictionaryService.getFunctionDefinitionData().then(function (data) { - var j = data; - $scope.data = JSON.parse(j.data); - console.log($scope.data); - $scope.functionDefinitionDatas = JSON.parse($scope.data.functionDefinitionDatas); - console.log($scope.functionDefinitionDatas); - }, function (error) { - console.log("failed"); - }); - - PolicyDictionaryService.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"); - }); - - - }); - - - function extend(obj, src) { - for (var key in src) { - if (src.hasOwnProperty(key)) obj[key] = src[key]; - } - return obj; - } - - $scope.saveDecisionPolicy = function(policy){ - console.log(policy); - var uuu = "policyController/save_DecisionPolicy.htm"; - var postData={policyData: policy}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){ - $scope.data=data.policyData; - if($scope.data.success != undefined){ - $scope.temp.policy.readOnly = 'true'; - Notification.success("Policy Saved Successfully."); - }else{ - Notification.error("Error Occured while saving Policy."); - } - }); - console.log($scope.data); - $modalInstance.close(); - - }, - error : function(data){ - Notification.error("Error Occured while saving Policy."); - } - }); - }; - - $scope.validatePolicy = function(policy){ - console.log(policy); - var uuu = "policyController/validate_policy.htm"; - var postData={policyData: policy}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){ - $scope.data=data.data; - if($scope.data == '"success"'){ - Notification.success("Validation Success."); - }else{ - Notification.error("Validation Failed."); - } - - }); - console.log($scope.data); - /*$modalInstance.close();*/ - - }, - error : function(data){ - Notification.error("Validation Failed."); - } - }); - }; - - if(!$scope.temp.policy.editPolicy && !$scope.temp.policy.readOnly){ - $scope.temp.policy.attributes = []; - $scope.temp.policy.settings = []; - $scope.temp.policy.ruleAlgorithmschoices = []; - }else{ - if($scope.temp.policy.attributes.length == 0){ - $scope.temp.policy.attributes = []; - } - if($scope.temp.policy.settings.length == 0){ - $scope.temp.policy.settings = []; - } - if($scope.temp.policy.ruleAlgorithmschoices.length == 0){ - $scope.temp.policy.ruleAlgorithmschoices = []; - } - } - $scope.attributeDatas = [{"attributes" : $scope.temp.policy.attributes}]; - $scope.addNewChoice = function() { - var newItemNo = $scope.temp.policy.attributes.length+1; - $scope.temp.policy.attributes.push({'id':'choice'+newItemNo}); - }; - $scope.removeChoice = function() { - var lastItem = $scope.temp.policy.attributes.length-1; - $scope.temp.policy.attributes.splice(lastItem); - }; - - - $scope.settingsDatas = [{"settings" : $scope.temp.policy.settings}]; - $scope.addNewSettingsChoice = function() { - var newItemNo = $scope.temp.policy.settings.length+1; - $scope.temp.policy.settings.push({'id':'choice'+newItemNo}); - }; - $scope.removeSettingsChoice = function() { - var lastItem = $scope.temp.policy.settings.length-1; - $scope.temp.policy.settings.splice(lastItem); - }; - - $scope.ItemNo = 0; - $scope.ruleAlgorithmDatas = [{"ruleAlgorithms" : $scope.temp.policy.ruleAlgorithmschoices }]; - - $scope.addNewRuleAlgorithm = function() { - if($scope.temp.policy.ruleAlgorithmschoices != null){ - var newItemNo = $scope.temp.policy.ruleAlgorithmschoices.length+1; - }else{ - var newItemNo = 1; - } - if(newItemNo > 1){ - var value = newItemNo-1; - $scope.attributeDictionaryDatas.push('A'+value); - $scope.$apply(); - } - $scope.temp.policy.ruleAlgorithmschoices.push({'id':'A'+newItemNo}); - }; - - $scope.removeRuleAlgorithm = function() { - var lastItem = $scope.temp.policy.ruleAlgorithmschoices.length-1; - $scope.temp.policy.ruleAlgorithmschoices.splice(lastItem); - }; - - $scope.providerListener = function(ruleProvider) { - if (ruleProvider!="Custom"){ - $scope.temp.policy.ruleAlgorithmschoices = []; - $scope.temp.policy.settings = []; - $scope.temp.policy.attributes = []; - } - }; -}); \ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/ExportPolicyController.js b/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/ExportPolicyController.js deleted file mode 100644 index 94771503a..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/ExportPolicyController.js +++ /dev/null @@ -1,108 +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 app = angular.module('abs'); -app.controller('exportPolicyController', function ($scope, $window, ExportPolicyService, modalService, $modal, Notification){ - $( "#dialog" ).hide(); - $scope.linkEnable = true; - $scope.gridOptions = { - onRegisterApi: function(gridApi) { - $scope.gridPolicyApi = gridApi; - }, - enableSorting: true, - enableFiltering: true, - showTreeExpandNoChildren: true, - paginationPageSizes: [10, 20, 50, 100], - paginationPageSize: 20, - columnDefs: [{name: 'name'}, {name: 'version'}, {name: 'dateModified'}] - }; - - $scope.files; - ExportPolicyService.getAutoPushPoliciesData().then(function (data1) { - $scope.loading = false; - $scope.files = data1.data; - var data = data1.data; - - var id=0; - var writeoutNode = function(childArray, currentLevel, dataArray){ - childArray.forEach( function(childNode){ - if (childNode.files.length > 0){ - childNode.$$treeLevel = currentLevel; - id=childNode.categoryId; - if(childNode.categoryId == childNode.parentCategoryId){ - childNode.parent=''; - } - }else{ - if((id!=childNode.parentCategoryId) || (childNode.categoryId == childNode.parentCategoryId)){ - if(childNode.categoryId == childNode.parentCategoryId){ - childNode.parent=''; - } - childNode.$$treeLevel = currentLevel; - } - } - dataArray.push( childNode ); - writeoutNode( childNode.files, currentLevel + 1, dataArray ); - }); - - }; - $scope.gridOptions.data = []; - writeoutNode(data, 0, $scope.gridOptions.data); - }, function (error) { - console.log("failed"); - }); - $scope.urlLink; - $scope.download = function(){ - var policySelection = $scope.gridPolicyApi.selection.getSelectedRows(); - console.log(policySelection); - var finalData = { - "policyDatas": policySelection - }; - console.log(finalData); - var uuu = "policy_download/exportPolicy.htm"; - var postData={exportData: finalData}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){ - $scope.data=data.data; - var url = '../' + $scope.data; - window.location = url; - Notification.success("Policies Exported Successfully"); - }); - console.log($scope.data); - }, - error : function(data){ - Notification.error("Error Occured while Exporting Policy."); - } - }); - - }; - - $scope.close = function() { - $modalInstance.close(); - }; - -}); diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/FirewallPolicyController.js b/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/FirewallPolicyController.js deleted file mode 100644 index e1fa90bbb..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/FirewallPolicyController.js +++ /dev/null @@ -1,234 +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========================================================= - */ - -/** - * - */ -angular.module('abs').controller('fwPolicyController', function ($scope, $window, PolicyDictionaryService,modalService, $modal, Notification, PapUrlService) { - $("#dialog").hide(); - - $scope.temp.policy.ttlDate = new Date($scope.temp.policy.ttlDate); - var papUrl; - PapUrlService.getPapUrl().then(function(data) { - var config = data; - papUrl = config.PAP_URL; - console.log(papUrl); - - PolicyDictionaryService.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"); - }); - - PolicyDictionaryService.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"); - }); - - PolicyDictionaryService.getFWDictionaryListDictionaryData(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"); - }); - - PolicyDictionaryService.getFWParentListDictionaryData().then(function (data) { - var j = data; - $scope.data = JSON.parse(j.data); - console.log($scope.data); - $scope.fwParentListDictionaryDatas = JSON.parse($scope.data.fwParentListDictionaryDatas); - console.log($scope.fwParentListDictionaryDatas); - }, function (error) { - console.log("failed"); - }); - - PolicyDictionaryService.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"); - }); - - PolicyDictionaryService.getRiskLevelValueData().then(function (data) { - var j = data; - $scope.data = JSON.parse(j.data); - console.log($scope.data); - $scope.riskLevelDatas = JSON.parse($scope.data.riskLevelDatas); - console.log($scope.riskLevelDatas); - }, function (error) { - console.log("failed"); - }); - - PolicyDictionaryService.getGuardValueData().then(function (data) { - var j = data; - $scope.data = JSON.parse(j.data); - console.log($scope.data); - $scope.guardDatas = JSON.parse($scope.data.guardDatas); - console.log($scope.guardDatas); - }, function (error) { - console.log("failed"); - }); - }); - - - - - function extend(obj, src) { - for (var key in src) { - if (src.hasOwnProperty(key)) obj[key] = src[key]; - } - return obj; - } - - $scope.viewFWRule = function(policy){ - console.log(policy); - var uuu = "policyController/ViewFWPolicyRule.htm"; - var postData={policyData: policy}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){ - window.alert(data.policyData); - }); - }, - error : function(data){ - Notification.error("Error Occured while Showing Rule."); - } - }); - }; - - - $scope.saveFWPolicy = function(policy){ - console.log(policy); - /* var finalData = extend(policy, $scope.attributeDatas[0]); - console.log(finalData);*/ - var uuu = "policyController/save_FirewallPolicy.htm"; - var postData={policyData: policy}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){ - $scope.data=data.data; - $scope.temp.policy.readOnly = 'true'; - Notification.success("Policy Saved Successfully."); - }); - console.log($scope.data); - $modalInstance.close(); - - }, - error : function(data){ - Notification.error("Error Occured while saving Policy."); - } - }); - }; - - $scope.validatePolicy = function(policy){ - console.log(policy); - var uuu = "policyController/validate_policy.htm"; - var postData={policyData: policy}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){ - $scope.data=data.data.substring(1,8); - var size = data.data.length; - if($scope.data == 'success'){ - Notification.success("Validation Success."); - if (size > 18){ - var displayWarning = data.data.substring(19,size); - window.alert(displayWarning); - } - }else{ - Notification.error("Validation Failed."); - } - - }); - console.log($scope.data); - /*$modalInstance.close();*/ - - }, - error : function(data){ - Notification.error("Validation Failed."); - } - }); - }; - - if(!$scope.temp.policy.editPolicy && !$scope.temp.policy.readOnly){ - $scope.temp.policy.attributes = []; - $scope.temp.policy.fwattributes = []; - }else{ - if($scope.temp.policy.attributes.length == 0){ - $scope.temp.policy.attributes = []; - } - if($scope.temp.policy.fwPolicyType == 'Parent Policy'){ - if($scope.temp.policy.fwattributes.length == 0){ - $scope.temp.policy.fwattributes = []; - } - } - } - - $scope.attributeDatas = [{"ruleSetup" : $scope.temp.policy.attributes}]; - $scope.addNewChoice = function() { - var newItemNo = $scope.temp.policy.attributes.length+1; - $scope.temp.policy.attributes.push({'id':'choice'+newItemNo}); - }; - $scope.removeChoice = function() { - var lastItem = $scope.temp.policy.attributes.length-1; - $scope.temp.policy.attributes.splice(lastItem); - }; - - $scope.fwattributeDatas = [{"parentSetup" : $scope.temp.policy.fwattributes}]; - $scope.addNewFWDictList = function() { - var newItemNo = $scope.temp.policy.fwattributes.length+1; - $scope.temp.policy.fwattributes.push({'id':'choice'+newItemNo}); - }; - $scope.removefwDictChoice = function() { - var lastItem = $scope.temp.policy.fwattributes.length-1; - $scope.temp.policy.fwattributes.splice(lastItem); - }; - -}); \ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/PolicyDictionaryService.js b/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/PolicyDictionaryService.js deleted file mode 100644 index 492855028..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplateController/PolicyDictionaryService.js +++ /dev/null @@ -1,522 +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========================================================= - */ - -/** - */ -angular.module("abs").factory('PolicyDictionaryService', function ($http, $q) { - return { - - getActionPolicyDictionaryData : function(url){ - console.log("url on the service js: " + url); - var url = url+'/ecomp/get_ActionPolicyDictDataByName'; - return $http.get(url) - .then(function(response) { - if (typeof response.data === 'object') { - return response.data; - } else { - return $q.reject(response.data); - } - - }, function(response) { - // something went wrong - return $q.reject(response.data); - }); - }, - - getFunctionDefinitionData : function(){ - return $http.get('get_FunctionDefinitionDataByName') - .then(function(response) { - if (typeof response.data === 'object') { - return response.data; - } else { - return $q.reject(response.data); - } - - }, function(response) { - // something went wrong - return $q.reject(response.data); - }); - }, - - getAttributeDictionaryData: function(url) { - console.log("url on the service js: " + url); - var url = url+'/ecomp/get_AttributeDatabyAttributeName'; - return $http.get(url) - .then(function(response) { - if (typeof response.data === 'object') { - return response.data; - } else { - return $q.reject(response.data); - } - - }, function(response) { - // something went wrong - return $q.reject(response.data); - }); - }, - - - getEcompDictionaryData : function(url){ - console.log("url on the service js: " + url); - var url = url+'/ecomp/get_EcompNameDataByName'; - return $http.get(url) - .then(function(response) { - if (typeof response.data === 'object') { - return response.data; - } else { - return $q.reject(response.data); - } - }, function(response) { - // something went wrong - return $q.reject(response.data); - }); - }, - - - getBRMSParamDictionaryData : function(url){ - console.log("url on the service js: " + url); - var url = url+'/ecomp/get_BRMSParamDataByName'; - return $http.get(url) - .then(function(response) { - if (typeof response.data === 'object') { - return response.data; - } else { - return $q.reject(response.data); - } - - }, function(response) { - // something went wrong - return $q.reject(response.data); - }); - }, - - - getDecisionSettingsDictionaryData : function(url){ - console.log("url on the service js: " + url); - var url = url+'/ecomp/get_SettingsDictionaryDataByName'; - return $http.get(url) - .then(function(response) { - if (typeof response.data === 'object') { - return response.data; - } else { - return $q.reject(response.data); - } - - }, function(response) { - // something went wrong - return $q.reject(response.data); - }); - }, - - getDescriptiveDictionaryData : function(url){ - console.log("url on the service js: " + url); - var url = url+'/ecomp/get_DescriptiveScopeByName'; - return $http.get(url) - .then(function(response) { - if (typeof response.data === 'object') { - return response.data; - } else { - return $q.reject(response.data); - } - - }, function(response) { - // something went wrong - return $q.reject(response.data); - }); - }, - - getPepOptionsDictionaryData : function(url){ - console.log("url on the service js: " + url); - var url = url+'/ecomp/get_PEPOptionsDataByName'; - return $http.get(url) - .then(function(response) { - if (typeof response.data === 'object') { - return response.data; - } else { - return $q.reject(response.data); - } - - }, function(response) { - // something went wrong - return $q.reject(response.data); - }); - }, - - getVSCLActionDictionaryData: function(url) { - console.log("url on the service js: " + url); - var url = url+'/ecomp/get_VSCLActionDataByName'; - return $http.get(url) - .then(function(response) { - if (typeof response.data === 'object') { - return response.data; - } else { - return $q.reject(response.data); - } - - }, function(response) { - // something went wrong - return $q.reject(response.data); - }); - }, - - getVnfTypeDictionaryData : function(url){ - console.log("url on the service js: " + url); - var url = url+'/ecomp/get_VNFTypeDataByName'; - return $http.get(url) - .then(function(response) { - if (typeof response.data === 'object') { - return response.data; - } else { - return $q.reject(response.data); - } - - }, function(response) { - // something went wrong - return $q.reject(response.data); - }); - }, - - getServiceDictionaryData : function(url){ - console.log("url on the service js: " + url); - var url = url+'/ecomp/get_ClosedLoopServicesDataByName'; - return $http.get(url) - .then(function(response) { - if (typeof response.data === 'object') { - return response.data; - } else { - return $q.reject(response.data); - } - - }, function(response) { - // something went wrong - return $q.reject(response.data); - }); - }, - - - getSiteDictionaryData : function(url){ - console.log("url on the service js: " + url); - var url = url+'/ecomp/get_ClosedLoopSiteDataByName'; - return $http.get(url) - .then(function(response) { - if (typeof response.data === 'object') { - return response.data; - } else { - return $q.reject(response.data); - } - - }, function(response) { - // something went wrong - return $q.reject(response.data); - }); - }, - - - getVarbindDictionaryData : function(url){ - console.log("url on the service js: " + url); - var url = url+'/ecomp/get_VarbindDictionaryDataByName'; - return $http.get(url) - .then(function(response) { - if (typeof response.data === 'object') { - return response.data; - } else { - return $q.reject(response.data); - } - - }, function(response) { - // something went wrong - return $q.reject(response.data); - }); - }, - - getSecurityZoneDictionaryData : function(url){ - console.log("url on the service js: " + url); - var url = url+'/ecomp/get_SecurityZoneDataByName'; - return $http.get(url) - .then(function(response) { - if (typeof response.data === 'object') { - return response.data; - } else { - return $q.reject(response.data); - } - - }, function(response) { - // something went wrong - return $q.reject(response.data); - }); - }, - - getTermListDictionaryData : function(url){ - console.log("url on the service js: " + url); - var url = url+'/ecomp/get_TermListDataByName'; - return $http.get(url) - .then(function(response) { - if (typeof response.data === 'object') { - return response.data; - } else { - return $q.reject(response.data); - } - - }, function(response) { - // something went wrong - return $q.reject(response.data); - }); - }, - - getPepOptionsDictionaryDataEntity : function(url){ - console.log("url on the service js: " + url); - var url = url+'/ecomp/get_PEPOptionsData'; - return $http.get(url) - .then(function(response) { - if (typeof response.data === 'object') { - return response.data; - } else { - return $q.reject(response.data); - } - - }, function(response) { - // something went wrong - return $q.reject(response.data); - }); - }, - - getFWDictionaryListDictionaryData : function(url){ - var url = url+'/ecomp/get_FWDictionaryListDataByName'; - return $http.get(url) - .then(function(response) { - if (typeof response.data === 'object') { - return response.data; - } else { - return $q.reject(response.data); - } - - }, function(response) { - // something went wrong - return $q.reject(response.data); - }); - }, - - getFWParentListDictionaryData : function(){ - return $http.get('get_FWParentListDataByName') - .then(function(response) { - if (typeof response.data === 'object') { - return response.data; - } else { - return $q.reject(response.data); - } - - }, function(response) { - // something went wrong - return $q.reject(response.data); - }); - }, - - getMSConfigDataByName : function(url){ - console.log("url on the service js: " + url); - var url = url+'/ecomp/get_MicroServiceConfigNameDataByName'; - return $http.get(url) - .then(function(response) { - if (typeof response.data === 'object') { - return response.data; - } else { - return $q.reject(response.data); - } - - }, function(response) { - // something went wrong - return $q.reject(response.data); - }); - }, - - getMSLocationDataByName : function(url){ - console.log("url on the service js: " + url); - var url = url+'/ecomp/get_MicroServiceLocationDataByName'; - return $http.get(url) - .then(function(response) { - if (typeof response.data === 'object') { - return response.data; - } else { - return $q.reject(response.data); - } - - }, function(response) { - // something went wrong - return $q.reject(response.data); - }); - }, - - getMSServiceModelsDataByName : function(url){ - console.log("url on the service js: " + url); - var url = url+'/ecomp/get_MicroServiceModelsDataByName'; - return $http.get(url) - .then(function(response) { - if (typeof response.data === 'object') { - return response.data; - } else { - return $q.reject(response.data); - } - - }, function(response) { - // something went wrong - return $q.reject(response.data); - }); - }, - - getDCAEuuidDataByName : function(url){ - console.log("url on the service js: " + url); - var url = url+'/ecomp/get_DCAEUUIDDataByName'; - return $http.get(url) - .then(function(response) { - if (typeof response.data === 'object') { - return response.data; - } else { - return $q.reject(response.data); - } - - }, function(response) { - // something went wrong - return $q.reject(response.data); - }); - }, - - getPriorityValueData : function(){ - return $http.get('get_DCAEPriorityValues') - .then(function(response) { - if (typeof response.data === 'object') { - return response.data; - } else { - return $q.reject(response.data); - } - - }, function(response) { - // something went wrong - return $q.reject(response.data); - }); - }, - - getPolicyScopeData : function(url){ - console.log("url on the service js: " + url); - var url = url+'/ecomp/get_GroupPolicyScopeDataByName'; - return $http.get(url) - .then(function(response) { - if (typeof response.data === 'object') { - return response.data; - } else { - return $q.reject(response.data); - } - - }, function(response) { - // something went wrong - return $q.reject(response.data); - }); - }, - - getRiskTypeDictionaryData : function(url){ - console.log("url on the service js: " + url); - var url = url+'/ecomp/get_RiskTypeDataByName'; - return $http.get(url) - .then(function(response) { - if (typeof response.data === 'object') { - return response.data; - } else { - return $q.reject(response.data); - } - }, function(response) { - // something went wrong - return $q.reject(response.data); - }); - }, - getRiskLevelValueData : function(){ - return $http.get('get_RiskLevelValues') - .then(function(response) { - if (typeof response.data === 'object') { - return response.data; - } else { - return $q.reject(response.data); - } - - }, function(response) { - // something went wrong - return $q.reject(response.data); - }); - }, - getGuardValueData : function(){ - return $http.get('get_GuardlValues') - .then(function(response) { - if (typeof response.data === 'object') { - return response.data; - } else { - return $q.reject(response.data); - } - - }, function(response) { - // something went wrong - return $q.reject(response.data); - }); - }, - getSafePolicyWarningDictionaryData : function(url){ - console.log("url on the service js: " + url); - var url = url+'/ecomp/get_SafePolicyWarningDataByName'; - return $http.get(url) - .then(function(response) { - if (typeof response.data === 'object') { - return response.data; - } else { - return $q.reject(response.data); - } - }, function(response) { - // something went wrong - return $q.reject(response.data); - }); - }, - getRCAlarmDictionaryData : function(url){ - console.log("url on the service js: " + url); - var url = url+'/ecomp/get_RCAlarmDataByName'; - return $http.get(url) - .then(function(response) { - if (typeof response.data === 'object') { - return response.data; - } else { - return $q.reject(response.data); - } - }, function(response) { - // something went wrong - return $q.reject(response.data); - }); - }, - getServerScopeDictionaryData : function(url){ - console.log("url on the service js: " + url); - var url = url+'/ecomp/get_ServerScopeDataByName'; - return $http.get(url) - .then(function(response) { - if (typeof response.data === 'object') { - return response.data; - } else { - return $q.reject(response.data); - } - - }, function(response) { - // something went wrong - return $q.reject(response.data); - }); - } - }; - -}); \ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/ActionPolicyTemplate.html b/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/ActionPolicyTemplate.html deleted file mode 100644 index 30bf9fa2c..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/ActionPolicyTemplate.html +++ /dev/null @@ -1,103 +0,0 @@ - - -
- - -
diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/BRMSParamPolicyTemplate.html b/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/BRMSParamPolicyTemplate.html deleted file mode 100644 index a2bd4162f..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/BRMSParamPolicyTemplate.html +++ /dev/null @@ -1,112 +0,0 @@ - - -
- -
diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/BRMSRawPolicyTemplate.html b/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/BRMSRawPolicyTemplate.html deleted file mode 100644 index a32971463..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/BRMSRawPolicyTemplate.html +++ /dev/null @@ -1,99 +0,0 @@ - - -
- -
\ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/BasePolicyTemplate.html b/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/BasePolicyTemplate.html deleted file mode 100644 index b73092fd8..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/BasePolicyTemplate.html +++ /dev/null @@ -1,126 +0,0 @@ - - -
- -
\ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/ClosedLoopFaultPolicyTemplate.html b/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/ClosedLoopFaultPolicyTemplate.html deleted file mode 100644 index 8f44fab98..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/ClosedLoopFaultPolicyTemplate.html +++ /dev/null @@ -1,350 +0,0 @@ - - -
- - -
\ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/ClosedLoopPMPolicyTemplate.html b/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/ClosedLoopPMPolicyTemplate.html deleted file mode 100644 index c9a384656..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/ClosedLoopPMPolicyTemplate.html +++ /dev/null @@ -1,141 +0,0 @@ - - -
- -
\ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/DCAEMicroServicePolicyTemplate.html b/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/DCAEMicroServicePolicyTemplate.html deleted file mode 100644 index 183489816..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/DCAEMicroServicePolicyTemplate.html +++ /dev/null @@ -1,108 +0,0 @@ - - -
- - -
diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/DecisionPolicyTemplate.html b/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/DecisionPolicyTemplate.html deleted file mode 100644 index a79a193c7..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/DecisionPolicyTemplate.html +++ /dev/null @@ -1,130 +0,0 @@ - - -
- - -
diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/DescribePolicyTemplate.html b/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/DescribePolicyTemplate.html deleted file mode 100644 index 7fadd9438..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/DescribePolicyTemplate.html +++ /dev/null @@ -1,50 +0,0 @@ - - - \ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/ExportPolicyTemplate.html b/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/ExportPolicyTemplate.html deleted file mode 100644 index 0a3013381..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/ExportPolicyTemplate.html +++ /dev/null @@ -1,35 +0,0 @@ - - - \ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/FirewallPolicyTemplate.html b/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/FirewallPolicyTemplate.html deleted file mode 100644 index a143fbd52..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/FirewallPolicyTemplate.html +++ /dev/null @@ -1,116 +0,0 @@ - - -
- - -
\ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/PolicyTypeTemplate.html b/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/PolicyTypeTemplate.html deleted file mode 100644 index 80fe80ee7..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/PolicyTemplates/PolicyTypeTemplate.html +++ /dev/null @@ -1,79 +0,0 @@ - - - diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/css/normalize-legacy.css b/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/css/normalize-legacy.css deleted file mode 100644 index 021e5fb81..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/css/normalize-legacy.css +++ /dev/null @@ -1,545 +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========================================================= - */ - -/* ========================================================================== - HTML5 display definitions - ========================================================================== */ - -/** - * Correct `block` display not defined in IE 6/7/8/9 and Firefox 3. - */ - -article, -aside, -details, -figcaption, -figure, -footer, -header, -hgroup, -main, -nav, -section, -summary { - display: block; -} - -/** - * Correct `inline-block` display not defined in IE 6/7/8/9 and Firefox 3. - */ - -audio, -canvas, -video { - display: inline-block; - *display: inline; - *zoom: 1; -} - -/** - * Prevent modern browsers from displaying `audio` without controls. - * Remove excess height in iOS 5 devices. - */ - -audio:not([controls]) { - display: none; - height: 0; -} - -/** - * Address styling not present in IE 7/8/9, Firefox 3, and Safari 4. - * Known issue: no IE 6 support. - */ - -[hidden] { - display: none; -} - -/* ========================================================================== - Base - ========================================================================== */ - -/** - * 1. Correct text resizing oddly in IE 6/7 when body `font-size` is set using - * `em` units. - * 2. Prevent iOS text size adjust after orientation change, without disabling - * user zoom. - */ - -html { - font-size: 100%; /* 1 */ - -ms-text-size-adjust: 100%; /* 2 */ - -webkit-text-size-adjust: 100%; /* 2 */ -} - -/** - * Address `font-family` inconsistency between `textarea` and other form - * elements. - */ - -html, -button, -input, -select, -textarea { - font-family: sans-serif; -} - -/** - * Address margins handled incorrectly in IE 6/7. - */ - -body { - margin: 0; -} - -/* ========================================================================== - Links - ========================================================================== */ - -/** - * Address `outline` inconsistency between Chrome and other browsers. - */ - -a:focus { - outline: thin dotted; -} - -/** - * Improve readability when focused and also mouse hovered in all browsers. - */ - -a:active, -a:hover { - outline: 0; -} - -/* ========================================================================== - Typography - ========================================================================== */ - -/** - * Address font sizes and margins set differently in IE 6/7. - * Address font sizes within `section` and `article` in Firefox 4+, Safari 5, - * and Chrome. - */ - -h1 { - font-size: 2em; - margin: 0.67em 0; -} - -h2 { - font-size: 1.5em; - margin: 0.83em 0; -} - -h3 { - font-size: 1.17em; - margin: 1em 0; -} - -h4 { - font-size: 1em; - margin: 1.33em 0; -} - -h5 { - font-size: 0.83em; - margin: 1.67em 0; -} - -h6 { - font-size: 0.67em; - margin: 2.33em 0; -} - -/** - * Address styling not present in IE 7/8/9, Safari 5, and Chrome. - */ - -abbr[title] { - border-bottom: 1px dotted; -} - -/** - * Address style set to `bolder` in Firefox 3+, Safari 4/5, and Chrome. - */ - -b, -strong { - font-weight: bold; -} - -blockquote { - margin: 1em 40px; -} - -/** - * Address styling not present in Safari 5 and Chrome. - */ - -dfn { - font-style: italic; -} - -/** - * Address differences between Firefox and other browsers. - * Known issue: no IE 6/7 normalization. - */ - -hr { - -moz-box-sizing: content-box; - box-sizing: content-box; - height: 0; -} - -/** - * Address styling not present in IE 6/7/8/9. - */ - -mark { - background: #ff0; - color: #000; -} - -/** - * Address margins set differently in IE 6/7. - */ - -p, -pre { - margin: 1em 0; -} - -/** - * Correct font family set oddly in IE 6, Safari 4/5, and Chrome. - */ - -code, -kbd, -pre, -samp { - font-family: monospace, serif; - _font-family: 'courier new', monospace; - font-size: 1em; -} - -/** - * Improve readability of pre-formatted text in all browsers. - */ - -pre { - white-space: pre; - white-space: pre-wrap; - word-wrap: break-word; -} - -/** - * Address CSS quotes not supported in IE 6/7. - */ - -q { - quotes: none; -} - -/** - * Address `quotes` property not supported in Safari 4. - */ - -q:before, -q:after { - content: ''; - content: none; -} - -/** - * Address inconsistent and variable font size in all browsers. - */ - -small { - font-size: 80%; -} - -/** - * Prevent `sub` and `sup` affecting `line-height` in all browsers. - */ - -sub, -sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; -} - -sup { - top: -0.5em; -} - -sub { - bottom: -0.25em; -} - -/* ========================================================================== - Lists - ========================================================================== */ - -/** - * Address margins set differently in IE 6/7. - */ - -dl, -menu, -ol, -ul { - margin: 1em 0; -} - -dd { - margin: 0 0 0 40px; -} - -/** - * Address paddings set differently in IE 6/7. - */ - -menu, -ol, -ul { - padding: 0 0 0 40px; -} - -/** - * Correct list images handled incorrectly in IE 7. - */ - -nav ul, -nav ol { - list-style: none; - list-style-image: none; -} - -/* ========================================================================== - Embedded content - ========================================================================== */ - -/** - * 1. Remove border when inside `a` element in IE 6/7/8/9 and Firefox 3. - * 2. Improve image quality when scaled in IE 7. - */ - -img { - border: 0; /* 1 */ - -ms-interpolation-mode: bicubic; /* 2 */ -} - -/** - * Correct overflow displayed oddly in IE 9. - */ - -svg:not(:root) { - overflow: hidden; -} - -/* ========================================================================== - Figures - ========================================================================== */ - -/** - * Address margin not present in IE 6/7/8/9, Safari 5, and Opera 11. - */ - -figure { - margin: 0; -} - -/* ========================================================================== - Forms - ========================================================================== */ - -/** - * Correct margin displayed oddly in IE 6/7. - */ - -form { - margin: 0; -} - -/** - * Define consistent border, margin, and padding. - */ - -fieldset { - border: 1px solid #c0c0c0; - margin: 0 2px; - padding: 0.35em 0.625em 0.75em; -} - -/** - * 1. Correct color not being inherited in IE 6/7/8/9. - * 2. Correct text not wrapping in Firefox 3. - * 3. Correct alignment displayed oddly in IE 6/7. - */ - -legend { - border: 0; /* 1 */ - padding: 0; - white-space: normal; /* 2 */ - *margin-left: -7px; /* 3 */ -} - -/** - * 1. Correct font size not being inherited in all browsers. - * 2. Address margins set differently in IE 6/7, Firefox 3+, Safari 5, - * and Chrome. - * 3. Improve appearance and consistency in all browsers. - */ - -button, -input, -select, -textarea { - font-size: 100%; /* 1 */ - margin: 0; /* 2 */ - vertical-align: baseline; /* 3 */ - *vertical-align: middle; /* 3 */ -} - -/** - * Address Firefox 3+ setting `line-height` on `input` using `!important` in - * the UA stylesheet. - */ - -button, -input { - line-height: normal; -} - -/** - * Address inconsistent `text-transform` inheritance for `button` and `select`. - * All other form control elements do not inherit `text-transform` values. - * Correct `button` style inheritance in Chrome, Safari 5+, and IE 6+. - * Correct `select` style inheritance in Firefox 4+ and Opera. - */ - -button, -select { - text-transform: none; -} - -/** - * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` - * and `video` controls. - * 2. Correct inability to style clickable `input` types in iOS. - * 3. Improve usability and consistency of cursor style between image-type - * `input` and others. - * 4. Remove inner spacing in IE 7 without affecting normal text inputs. - * Known issue: inner spacing remains in IE 6. - */ - -button, -html input[type="button"], /* 1 */ -input[type="reset"], -input[type="submit"] { - -webkit-appearance: button; /* 2 */ - cursor: pointer; /* 3 */ - *overflow: visible; /* 4 */ -} - -/** - * Re-set default cursor for disabled elements. - */ - -button[disabled], -html input[disabled] { - cursor: default; -} - -/** - * 1. Address box sizing set to content-box in IE 8/9. - * 2. Remove excess padding in IE 8/9. - * 3. Remove excess padding in IE 7. - * Known issue: excess padding remains in IE 6. - */ - -input[type="checkbox"], -input[type="radio"] { - box-sizing: border-box; /* 1 */ - padding: 0; /* 2 */ - *height: 13px; /* 3 */ - *width: 13px; /* 3 */ -} - -/** - * 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome. - * 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome - * (include `-moz` to future-proof). - */ - -input[type="search"] { - -webkit-appearance: textfield; /* 1 */ - -moz-box-sizing: content-box; - -webkit-box-sizing: content-box; /* 2 */ - box-sizing: content-box; -} - -/** - * Remove inner padding and search cancel button in Safari 5 and Chrome - * on OS X. - */ - -input[type="search"]::-webkit-search-cancel-button, -input[type="search"]::-webkit-search-decoration { - -webkit-appearance: none; -} - -/** - * Remove inner padding and border in Firefox 3+. - */ - -button::-moz-focus-inner, -input::-moz-focus-inner { - border: 0; - padding: 0; -} - -/** - * 1. Remove default vertical scrollbar in IE 6/7/8/9. - * 2. Improve readability and alignment in all browsers. - */ - -textarea { - overflow: auto; /* 1 */ - vertical-align: top; /* 2 */ -} - -/* ========================================================================== - Tables - ========================================================================== */ - -/** - * Remove most spacing between table cells. - */ - -table { - border-collapse: collapse; - border-spacing: 0; -} \ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/css/normalize.css b/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/css/normalize.css deleted file mode 100644 index 9bfd183d3..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/css/normalize.css +++ /dev/null @@ -1,439 +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========================================================= - */ - -html { - font-family: sans-serif; /* 1 */ - -ms-text-size-adjust: 100%; /* 2 */ - -webkit-text-size-adjust: 100%; /* 2 */ -} - -/** - * Remove default margin. - */ - -body { - margin: 0; -} - -/* HTML5 display definitions - ========================================================================== */ - -/** - * Correct `block` display not defined for any HTML5 element in IE 8/9. - * Correct `block` display not defined for `details` or `summary` in IE 10/11 - * and Firefox. - * Correct `block` display not defined for `main` in IE 11. - */ - -article, -aside, -details, -figcaption, -figure, -footer, -header, -hgroup, -main, -menu, -nav, -section, -summary { - display: block; -} - -/** - * 1. Correct `inline-block` display not defined in IE 8/9. - * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera. - */ - -audio, -canvas, -progress, -video { - display: inline-block; /* 1 */ - vertical-align: baseline; /* 2 */ -} - -/** - * Prevent modern browsers from displaying `audio` without controls. - * Remove excess height in iOS 5 devices. - */ - -audio:not([controls]) { - display: none; - height: 0; -} - -/** - * Address `[hidden]` styling not present in IE 8/9/10. - * Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22. - */ - -[hidden], -template { - display: none; -} - -/* Links - ========================================================================== */ - -/** - * Remove the gray background color from active links in IE 10. - */ - -a { - background-color: transparent; -} - -/** - * Improve readability when focused and also mouse hovered in all browsers. - */ - -a:active, -a:hover { - outline: 0; -} - -/* Text-level semantics - ========================================================================== */ - -/** - * Address styling not present in IE 8/9/10/11, Safari, and Chrome. - */ - -abbr[title] { - border-bottom: 1px dotted; -} - -/** - * Address style set to `bolder` in Firefox 4+, Safari, and Chrome. - */ - -b, -strong { - font-weight: bold; -} - -/** - * Address styling not present in Safari and Chrome. - */ - -dfn { - font-style: italic; -} - -/** - * Address variable `h1` font-size and margin within `section` and `article` - * contexts in Firefox 4+, Safari, and Chrome. - */ - -h1 { - font-size: 2em; - margin: 0.67em 0; -} - -/** - * Address styling not present in IE 8/9. - */ - -mark { - background: #ff0; - color: #000; -} - -/** - * Address inconsistent and variable font size in all browsers. - */ - -small { - font-size: 80%; -} - -/** - * Prevent `sub` and `sup` affecting `line-height` in all browsers. - */ - -sub, -sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; -} - -sup { - top: -0.5em; -} - -sub { - bottom: -0.25em; -} - -/* Embedded content - ========================================================================== */ - -/** - * Remove border when inside `a` element in IE 8/9/10. - */ - -img { - border: 0; -} - -/** - * Correct overflow not hidden in IE 9/10/11. - */ - -svg:not(:root) { - overflow: hidden; -} - -/* Grouping content - ========================================================================== */ - -/** - * Address margin not present in IE 8/9 and Safari. - */ - -figure { - margin: 1em 40px; -} - -/** - * Address differences between Firefox and other browsers. - */ - -hr { - -moz-box-sizing: content-box; - box-sizing: content-box; - height: 0; -} - -/** - * Contain overflow in all browsers. - */ - -pre { - overflow: auto; -} - -/** - * Address odd `em`-unit font size rendering in all browsers. - */ - -code, -kbd, -pre, -samp { - font-family: monospace, monospace; - font-size: 1em; -} - -/* Forms - ========================================================================== */ - -/** - * Known limitation: by default, Chrome and Safari on OS X allow very limited - * styling of `select`, unless a `border` property is set. - */ - -/** - * 1. Correct color not being inherited. - * Known issue: affects color of disabled elements. - * 2. Correct font properties not being inherited. - * 3. Address margins set differently in Firefox 4+, Safari, and Chrome. - */ - -button, -input, -optgroup, -select, -textarea { - color: inherit; /* 1 */ - font: inherit; /* 2 */ - margin: 0; /* 3 */ -} - -/** - * Address `overflow` set to `hidden` in IE 8/9/10/11. - */ - -button { - overflow: visible; -} - -/** - * Address inconsistent `text-transform` inheritance for `button` and `select`. - * All other form control elements do not inherit `text-transform` values. - * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera. - * Correct `select` style inheritance in Firefox. - */ - -button, -select { - text-transform: none; -} - -/** - * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` - * and `video` controls. - * 2. Correct inability to style clickable `input` types in iOS. - * 3. Improve usability and consistency of cursor style between image-type - * `input` and others. - */ - -button, -html input[type="button"], /* 1 */ -input[type="reset"], -input[type="submit"] { - -webkit-appearance: button; /* 2 */ - cursor: pointer; /* 3 */ -} - -/** - * Re-set default cursor for disabled elements. - */ - -button[disabled], -html input[disabled] { - cursor: default; -} - -/** - * Remove inner padding and border in Firefox 4+. - */ - -button::-moz-focus-inner, -input::-moz-focus-inner { - border: 0; - padding: 0; -} - -/** - * Address Firefox 4+ setting `line-height` on `input` using `!important` in - * the UA stylesheet. - */ - -input { - line-height: normal; -} - -/** - * It's recommended that you don't attempt to style these elements. - * Firefox's implementation doesn't respect box-sizing, padding, or width. - * - * 1. Address box sizing set to `content-box` in IE 8/9/10. - * 2. Remove excess padding in IE 8/9/10. - */ - -input[type="checkbox"], -input[type="radio"] { - box-sizing: border-box; /* 1 */ - padding: 0; /* 2 */ -} - -/** - * Fix the cursor style for Chrome's increment/decrement buttons. For certain - * `font-size` values of the `input`, it causes the cursor style of the - * decrement button to change from `default` to `text`. - */ - -input[type="number"]::-webkit-inner-spin-button, -input[type="number"]::-webkit-outer-spin-button { - height: auto; -} - -/** - * 1. Address `appearance` set to `searchfield` in Safari and Chrome. - * 2. Address `box-sizing` set to `border-box` in Safari and Chrome - * (include `-moz` to future-proof). - */ - -input[type="search"] { - -webkit-appearance: textfield; /* 1 */ - -moz-box-sizing: content-box; - -webkit-box-sizing: content-box; /* 2 */ - box-sizing: content-box; -} - -/** - * Remove inner padding and search cancel button in Safari and Chrome on OS X. - * Safari (but not Chrome) clips the cancel button when the search input has - * padding (and `textfield` appearance). - */ - -input[type="search"]::-webkit-search-cancel-button, -input[type="search"]::-webkit-search-decoration { - -webkit-appearance: none; -} - -/** - * Define consistent border, margin, and padding. - */ - -fieldset { - border: 1px solid #c0c0c0; - margin: 0 2px; - padding: 0.35em 0.625em 0.75em; -} - -/** - * 1. Correct `color` not being inherited in IE 8/9/10/11. - * 2. Remove padding so people aren't caught out if they zero out fieldsets. - */ - -legend { - border: 0; /* 1 */ - padding: 0; /* 2 */ -} - -/** - * Remove default vertical scrollbar in IE 8/9/10/11. - */ - -textarea { - overflow: auto; -} - -/** - * Don't inherit the `font-weight` (applied by a rule above). - * NOTE: the default cannot safely be changed in Chrome and Safari on OS X. - */ - -optgroup { - font-weight: bold; -} - -/* Tables - ========================================================================== */ - -/** - * Remove most spacing between table cells. - */ - -table { - border-collapse: collapse; - border-spacing: 0; -} - -td, -th { - padding: 0; -} diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/css/styles.css b/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/css/styles.css deleted file mode 100644 index 9ce7ace9d..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/css/styles.css +++ /dev/null @@ -1,86 +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========================================================= - */ - -/* --------------------------------------------------------- - HTML5 Bones - This stylesheet contains print styling and a section for - you to simply add your own. This is a basic template - after all. - ---------------------------------------------------------*/ - body { - - } - /* Default link styling */ - a:link { color:#067ab4; } - a:visited { color:#067ab4; } - a:hover, a:focus { color:#000; } - a:active { color:#fb0e02; } - - - -/* --------------------------------------------------------- - Author's styles - ---------------------------------------------------------*/ - body { - - } - - h1 { - color: orange; - text-align: center; - } - - - -/* --------------------------------------------------------- - Print styles - ---------------------------------------------------------*/ -@media print { - * { - color:#000 !important; - box-shadow:none !important; - text-shadow:none !important; - background:transparent !important; - } - html { background-color:#fff; } - /* Hide navigation */ - nav { display:none; } - - /* Show link destinations in brackets after the link text */ - a[href]:after { content: " (" attr(href) ") "; } - a[href] { - font-weight:bold; - text-decoration:underline; - color:#06c; - border:none; - } - /* Don't show link destinations for JavaScript or internal links */ - a[href^="javascript:"]:after, a[href^="#"]:after { content:""; } - - /* Show abbr title value in brackets after the text */ - abbr[title]:after { content: " (" attr(title) ")"; } - - figure { - margin-bottom:1em; - overflow:hidden; - } - - figure img { border:1px solid #000; } -} \ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/css/animations.css b/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/css/animations.css deleted file mode 100644 index 50db9b001..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/css/animations.css +++ /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========================================================= - */ - -@-webkit-keyframes fadeIn { - 0% { - opacity: 0; - } - - 100% { - opacity: 1; - }; -} - -@keyframes fadeIn { - 0% { - opacity: 0; - } - - 100% { - opacity: 1; - }; -} - -@-webkit-keyframes fadeInDown { - 0% { - opacity: 0; - -webkit-transform: translate3d(0, -100%, 0); - transform: translate3d(0, -100%, 0); - } - - 100% { - opacity: 1; - -webkit-transform: none; - transform: none; - }; -} - -@keyframes fadeInDown { - 0% { - opacity: 0; - -webkit-transform: translate3d(0, -100%, 0); - transform: translate3d(0, -100%, 0); - } - - 100% { - opacity: 1; - -webkit-transform: none; - transform: none; - }; -} - -@keyframes rotate { - 100% { - transform: rotate(360deg); - }; -} - -@-webkit-keyframes rotate { - 100% { - -webkit-transform: rotate(360deg); - }; -} - -@keyframes colors { - 0% { - stroke: #4285F4; - } - - 25% { - stroke: #DE3E35; - } - - 50% { - stroke: #F7C223; - } - - 75% { - stroke: #1B9A59; - } - - 100% { - stroke: #4285F4; - }; -} - -@keyframes dash { - 0% { - stroke-dasharray: 1,150; - stroke-dashoffset: 0; - stroke: red; - } - - 50% { - stroke-dasharray: 90,150; - stroke-dashoffset: -35; - stroke: yellow; - } - - 100% { - stroke-dasharray: 90,150; - stroke-dashoffset: -124; - stroke: green; - }; -} - -@-webkit-keyframes dash { - 0% { - stroke-dasharray: 1,150; - stroke-dashoffset: 0; - } - - 50% { - stroke-dasharray: 90,150; - stroke-dashoffset: -35; - } - - 100% { - stroke-dasharray: 90,150; - stroke-dashoffset: -124; - }; -} - -.animated { - -webkit-animation-duration: .7s; - animation-duration: .7s; - -webkit-animation-fill-mode: both; - animation-fill-mode: both; -} - -.modal.animated, -.animated.fast { - -webkit-animation-duration: .2s; - animation-duration: .2s; -} - -.animated.slow { - -webkit-animation-duration: 1.1s; - animation-duration: 1.1s; -} - -.animated.fadeInDown { - -webkit-animation-name: fadeInDown; - animation-name: fadeInDown; -} - -.animated.fadeIn { - -webkit-animation-name: fadeIn; - animation-name: fadeIn; -} - -.spinner-container { - -webkit-animation: rotate 2s linear infinite; - animation: rotate 2s linear infinite; - z-index: 2; - width: 65px; - height: 65px; -} - -.spinner-container .path { - stroke-dasharray: 1,150; - stroke-dashoffset: 0; - stroke: #2196F3; - stroke-linecap: round; - -webkit-animation: dash 1.5s ease-in-out infinite, colors 5.6s ease-in-out infinite; - animation: dash 1.5s ease-in-out infinite, colors 5.6s ease-in-out infinite; -} \ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/css/dialogs.css b/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/css/dialogs.css deleted file mode 100644 index 60690c4fe..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/css/dialogs.css +++ /dev/null @@ -1,85 +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========================================================= - */ - -.modal { - word-wrap: break-word; -} - -.modal .label.error-msg { - display: block; - font-size: 12px; - margin-top: 5px; - padding: 0; - padding: 5px; - margin-top: 10px; - text-align: left; -} - -.modal .label.error-msg > span { - white-space: pre-wrap; -} - -.modal .modal-header { - padding-bottom: 0; -} - -.modal .breadcrumb { - margin-bottom: 10px; -} - -.modal-fullscreen .modal-dialog, -.modal-fullscreen .modal-content { - bottom: 0; - left: 0; - position: absolute; - right: 0; - top: 0; -} - -.modal-fullscreen .modal-dialog { - margin: 0; - width: 100%; -} - -.modal-fullscreen .modal-content { - border: none; - -moz-border-radius: 0; - border-radius: 0; - -webkit-box-shadow: inherit; - -moz-box-shadow: inherit; - -o-box-shadow: inherit; - box-shadow: inherit; -} - -.modal-fullscreen textarea.code { - min-height: 450px; -} - -.modal img.preview { - max-width: 100%; - max-height: 640px; - border-radius: 3px; -} - -.modal img.preview.loading { - width: 100%; - height: 1px; - opacity: 0; -} \ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/css/main.css b/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/css/main.css deleted file mode 100644 index 78001f400..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/css/main.css +++ /dev/null @@ -1,336 +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========================================================= - */ - -body { - padding-top: 55px; - font-size: 14px; -} - -*, -*:focus { - outline: 0!important; -} - -.navbar { - min-height: 32px; -} - -.navbar .navbar-toggle { - padding: 5px 10px; -} - -.navbar .navbar-brand { - font-size: inherit; - height: 55px; - line-height: 100%; -} - -.navbar .navbar-form { - border-bottom: none; - border-top: none; - box-shadow: none; - padding: 0 10px; - margin-top: 10px; -} - -.breadcrumb { - border-radius: 0; -} - -.breadcrumb .btn { - margin-top: -5px; -} - -.btn.btn-default { - color: #444; - background-color: #FAFAFA; -} - -.btn { - box-shadow: 0 2px 5px 0 rgba(0, 0, 0, .26); - font-weight: 500; - letter-spacing: .01em; - border: none; -} - -textarea.code { - font-family: Menlo, Monaco, Consolas, "Courier New", monospace; - font-size: 13px; - min-height: 250px; - resize: vertical; - color: #000; -} - -.sub-header { - padding-bottom: 10px; - border-bottom: 1px solid #eee; -} - -.navbar-fixed-top { - border: 0; -} - -.sidebar { - display: none; -} - -.btn-go-back { - margin-top: -5px; -} - -a:hover { - text-decoration: none; -} - -.nav-sidebar { - margin-right: -21px; - margin-bottom: 20px; - margin-left: -20px; -} - -.nav-sidebar > li > a { - padding-right: 20px; - padding-left: 20px; -} - -.nav-sidebar > .active > a, -.nav-sidebar > .active > a:hover, -.nav-sidebar > .active > a:focus { - color: #fff; - background-color: #2196F3; -} - -.main { - padding: 0; -} - -.main .page-header { - margin-top: 0; -} - -.file-tree ul.nav.nav-sidebar { - margin: 0; - padding: 0; - padding-left: 12px; -} - -.file-tree ul.nav.nav-sidebar > li { - border-left: 1px solid #ddd; - padding-left: 4px; -} - -.file-tree ul.nav.nav-sidebar > li > a { - padding: 2px 2px 2px 4px; -} - -.file-tree ul.nav.nav-sidebar:first-child { - padding-left: 0; -} - -.file-tree ul.nav.nav-sidebar.file-tree-root > li { - border-left: none; - padding-left: 0px; -} - -.table td { - vertical-align: middle; -} - -#context-menu { - position: absolute; - display: none; - z-index: 9999; -} - -.iconset { - padding: 10px; -} - -.col-120 { - width: 100px; - max-height: 100px; - float: left; - margin-bottom: 9px; - margin-right: 9px; -} - -.col-120:last-child { - margin-right: 0; -} - -.iconset .thumbnail { - border-radius: 0; - overflow: hidden; - margin: 0; - padding: 0; - padding: 10px 0; - border: none; -} - -.iconset .thumbnail .item-icon { - font-size: 32px; -} - -.detail-sources { - text-overflow: ellipsis; - overflow: hidden; - word-wrap: break-word; -} - -::-webkit-scrollbar { - width: 10px; - height: 10px; - background-color: #fff; - box-shadow: inset 1px 1px 0 rgba(0, 0, 0, .1), inset -1px -1px 0 rgba(0, 0, 0, .07); -} - -::-webkit-scrollbar:hover { - background-color: #eee; -} - -::-webkit-scrollbar-thumb { - min-height: 0.8em; - min-width: 0.8em; - background-color: rgba(0, 0, 0, .2); - box-shadow: inset 1px 1px 0 rgba(0, 0, 0, .1), inset -1px -1px 0 rgba(0, 0, 0, .07); -} - -::-webkit-scrollbar-thumb:hover { - background-color: #bbb; -} - -::-webkit-scrollbar-thumb:active { - background-color: #888; -} - -.dropdown-menu.dropdown-right-click { - display: block; - position: static; - margin-bottom: 5px; - font-size: 1em; -} - -.dropdown-menu.dropdown-right-click>li>a { - padding: 5px 12px; -} - -.dropdown-menu.dropdown-right-click>li>a>i { - font-size: .9em; - margin-right: 1px; -} - -.dropdown-menu.dropdown-right-click .divider { - margin: 3px 0; -} - -.spinner-wrapper { - margin: 0 auto; - text-align: center; - margin-top: 8%; -} - -table th > a:hover, -table th > a:active, -table th > a:focus { - text-decoration: none; -} - -.sortorder:after { - color: #2196f3; - content: '\25bc'; -} - -.sortorder.reverse:after { - color: #2196f3; - content: '\25b2'; -} - -[ng\:cloak], [ng-cloak], -[data-ng-cloak], [x-ng-cloak], -.ng-cloak, .x-ng-cloak { - display: none !important; -} - -.mr2 { - margin-right: 2px; -} - -.mr5 { - margin-right: 5px; -} - -.mt10 { - margin-top: 10px; -} - -.mb0 { - margin-bottom: 0; -} - -.pointer { - cursor: pointer; -} - -.block { - display: block; -} - -.ellipsis { - overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; -} - -.bold { - font-weight: bold; -} - -@media (min-width: 768px) { - .main { - padding-right: 0; - padding-left: 0; - } - - .sidebar { - position: fixed; - top: 50px; - bottom: 0; - left: 0; - z-index: 1000; - display: block; - padding: 5px 0; - overflow-x: hidden; - overflow-y: auto; - background-color: #f5f5f5; - border-right: 1px solid #eee; - } -} - -@media (max-width: 768px) { - .navbar-form .btn { - margin-top: 5px; - } -} - -@media (max-width: 475px) { - .table.table-files .btn { - display: none; - } -} \ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/js/app.js b/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/js/app.js deleted file mode 100644 index a5a8642bc..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/js/app.js +++ /dev/null @@ -1,47 +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========================================================= - */ - -(function(window, angular, $) { - 'use strict'; - angular.module("abs", ["att.abs","modalServices","ngRoute", 'pascalprecht.translate', 'ngCookies', 'ngSanitize', 'ui-notification', - 'ui.grid','ui.grid.pagination','ui.grid.selection', 'ui.grid.exporter', 'ui.grid.edit', 'ui.grid.autoResize', - 'ui.grid.resizeColumns', 'ui.grid.treeView']); - /** - * jQuery inits - */ - $(window.document).on('shown.bs.modal', '.modal', function() { - window.setTimeout(function() { - $('[autofocus]', this).focus(); - }.bind(this), 100); - }); - - $(window.document).on('click', function() { - $('#context-menu').hide(); - }); - - $(window.document).on('contextmenu', '.main-navigation .table-files td:first-child, .iconset a.thumbnail', function(e) { - $('#context-menu').hide().css({ - left: e.pageX, - top: e.pageY - }).show(); - e.preventDefault(); - }); - -})(window, angular, jQuery); diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/js/controllers/main.js b/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/js/controllers/main.js deleted file mode 100644 index 8153d679a..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/js/controllers/main.js +++ /dev/null @@ -1,426 +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========================================================= - */ - -(function(window, angular, $) { - 'use strict'; - angular.module('abs').controller('FileManagerCtrl', [ - '$scope', '$q', '$window', '$translate', '$cookies', 'fileManagerConfig', 'item', 'fileNavigator', 'fileUploader', 'AdminTabService', 'RolesService', 'Notification', 'PolicyDictionaryService', 'PapUrlService', - function($scope, $q, $Window, $translate, $cookies, fileManagerConfig, Item, FileNavigator, FileUploader, AdminTabService, RolesService, Notification, PolicyDictionaryService, PapUrlService ) { - - $scope.isDisabled = true; - $scope.superAdminId = false; - $scope.exportPolicyId = false; - $scope.importPolicyId = false; - $scope.createScopeId = false; - $scope.deleteScopeId = false; - $scope.renameId = false; - $scope.createPolicyId = false; - $scope.cloneId = false; - $scope.editPolicyId = false; - $scope.switchVersionId = false; - $scope.describePolicyId = false; - $scope.viewPolicyId = false; - $scope.deletePolicyId = false; - AdminTabService.getData().then(function(data){ - var j = data; - $scope.data = JSON.parse(j.data); - $scope.lockdowndata = JSON.parse($scope.data.lockdowndata); - if($scope.lockdowndata[0].lockdown == true){ - $scope.isDisabled = true; - }else{ - $scope.isDisabled = false; - } - console.log($scope.data); - },function(error){ - console.log("failed"); - }); - var papUrl; - PapUrlService.getPapUrl().then(function(data) { - var config = data; - papUrl = config.PAP_URL; - console.log(papUrl); - PolicyDictionaryService.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); - }, function (error) { - console.log("failed"); - }); - - PolicyDictionaryService.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); - }, function (error) { - console.log("failed"); - }); - - PolicyDictionaryService.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); - }, function (error) { - console.log("failed"); - }); - - PolicyDictionaryService.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); - }, function (error) { - console.log("failed"); - }); - }); - - RolesService.getRolesData().then(function (data) { - var j = data; - $scope.data = JSON.parse(j.data); - console.log($scope.data); - $scope.userRolesDatas = JSON.parse($scope.data.userRolesDatas); - console.log($scope.userRolesDatas); - if($scope.userRolesDatas[0] == 'super-admin'){ - $scope.superAdminId = true; - $scope.exportPolicyId = true; - $scope.importPolicyId = true; - $scope.createScopeId = true; - $scope.deleteScopeId = true; - $scope.renameId = true; - $scope.createPolicyId = true; - $scope.cloneId = true; - $scope.editPolicyId = true; - $scope.switchVersionId = true; - $scope.describePolicyId = true; - $scope.viewPolicyId = true; - $scope.deletePolicyId = true; - }else if($scope.userRolesDatas[0] == 'super-editor' || $scope.userRolesDatas[0] == 'editor'){ - $scope.exportPolicyId = true; - $scope.importPolicyId = true; - $scope.cloneId = true; - $scope.editPolicyId = true; - $scope.createPolicyId = true; - $scope.cloneId = true; - $scope.editPolicyId = true; - $scope.switchVersionId = true; - $scope.describePolicyId = true; - $scope.viewPolicyId = true; - $scope.deletePolicyId = true; - }else if($scope.userRolesDatas[0] == 'super-guest' || $scope.userRolesDatas[0] == 'guest'){ - $scope.describePolicyId = true; - $scope.viewPolicyId = true; - }else if($scope.userRolesDatas[0] == 'admin'){ - $scope.exportPolicyId = true; - $scope.importPolicyId = true; - $scope.createScopeId = true; - $scope.renameId = true; - $scope.createPolicyId = true; - $scope.cloneId = true; - $scope.editPolicyId = true; - $scope.switchVersionId = true; - $scope.describePolicyId = true; - $scope.viewPolicyId = true; - $scope.deletePolicyId = true; - } - }, function (error) { - console.log("failed"); - }); - - $scope.config = fileManagerConfig; - $scope.reverse = false; - $scope.predicate = ['model.type', 'model.name']; - $scope.order = function(predicate) { - $scope.reverse = ($scope.predicate[1] === predicate) ? !$scope.reverse : false; - $scope.predicate[1] = predicate; - }; - - $scope.query = ''; - $scope.temp = new Item(); - $scope.fileNavigator = new FileNavigator(); - $scope.fileUploader = FileUploader; - $scope.uploadFileList = []; - $scope.viewTemplate = $cookies.viewTemplate || 'main-table.html'; - - $scope.setTemplate = function(name) { - $scope.viewTemplate = $cookies.viewTemplate = name; - }; - - $scope.changeLanguage = function (locale) { - if (locale) { - return $translate.use($cookies.language = locale); - } - $translate.use($cookies.language || fileManagerConfig.defaultLang); - }; - - $scope.touch = function(item) { - item = item instanceof Item ? item : new Item(); - item.revert(); - $scope.temp = item; - }; - - $scope.smartClick = function(item) { - if (item.isFolder()) { - return $scope.fileNavigator.folderClick(item); - } - if (item.isImage()) { - return $scope.openImagePreview(item); - } - if (item.isEditable()) { - return $scope.openEditItem(item); - } - }; - - $scope.openImagePreview = function(item) { - item.inprocess = true; - $scope.modal('imagepreview') - .find('#imagepreview-target') - .attr('src', item.getUrl(true)) - .unbind('load error') - .on('load error', function() { - item.inprocess = false; - $scope.$apply(); - }); - return $scope.touch(item); - }; - - $scope.openEditItem = function(item) { - item.getContent(); - $scope.modal('createNewPolicy'); - return $scope.touch(item); - }; - - $scope.modal = function(id, hide) { - return $('#' + id).modal(hide ? 'hide' : 'show'); - }; - - $scope.isInThisPath = function(path) { - var currentPath = $scope.fileNavigator.currentPath.join('/'); - return currentPath.indexOf(path) !== -1; - }; - - $scope.edit = function(item) { - item.edit().then(function() { - $scope.modal('createNewPolicy', true); - }); - }; - - $scope.createNewPolicy = function(item) { - item.createNewPolicy().then(function() { - $scope.modal('createNewPolicy', true); - }); - }; - - $scope.watch = function(item){ - var uuu = "watchPolicy"; - var data = {name : item.model.name, - path : item.model.path}; - var postData={watchData: data}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){ - $scope.watchData=data.watchData;}); - Notification.success($scope.watchData); - console.log($scope.watchData); - }, - error : function(data){ - alert("Error while saving."); - } - }); - }; - - $scope.Search = function(search){ - var deferred = $q.defer(); - var uuu = "searchPolicy"; - var postData = {searchdata : search}; - $.ajax({ - type : 'POST', - url : uuu, - dataType: 'json', - contentType: 'application/json', - data: JSON.stringify(postData), - success : function(data){ - $scope.$apply(function(){ - $scope.searchdata=data.result;}); - if($scope.searchdata[0].error != undefined){ - Notification.info($scope.searchdata[0].error); - }else{ - var j = data; - $scope.data = JSON.stringify(data.result); - $scope.searchDatas = JSON.parse($scope.data); - var searchString = "Policies List" + "
"; - var i; - for(i = 0 ; i < $scope.searchDatas.length; i++){ - searchString += $scope.searchDatas[i].name + ".xml" + "
"; - } - var myWindow = window.open("", "MsgWindow", "width=500,height=500"); - myWindow.document.write("

Search List

"); - myWindow.document.write("

"+searchString+"

"); - } - }, - error : function(data){ - alert("Error while Searching."); - } - }); - }; - - - $scope.describePolicy = function(item){ - item.describePolicy().then(function(){ - $scope.modal('describePolicy', true); - }); - }; - - $scope.exportPolicy = function(item){ - item.exportPolicy().then(function(){ - $scope.modal('exportPolicy', true); - }); - }; - - $scope.switchVersion = function(item){ - if ($scope.fileNavigator.fileNameExists(item.tempModel.content.activeVersion)) { - item.error = $translate.instant('error_invalid_filename'); - return false; - } - item.getSwitchVersionContent().then(function(){ - $scope.fileNavigator.refresh(); - $scope.modal('switchVersion', true); - }); - }; - - - $scope.viewPolicy = function(item){ - item.viewPolicy().then(function(){ - $scope.modal('createNewPolicy', true); - }); - }; - - $scope.copy = function(item) { - var samePath = item.tempModel.path.join() === item.model.path.join(); - if (samePath && $scope.fileNavigator.fileNameExists(item.tempModel.name)) { - item.error = $translate.instant('error_invalid_filename'); - return false; - } - item.copy().then(function() { - $scope.fileNavigator.refresh(); - $scope.modal('copy', true); - }); - }; - - $scope.remove = function(item) { - item.remove().then(function() { - $scope.fileNavigator.refresh(); - $scope.modal('delete', true); - }); - }; - - $scope.removePolicy = function(item) { - item.removePolicy().then(function() { - $scope.fileNavigator.refresh(); - $scope.modal('deletePolicy', true); - }); - }; - - $scope.rename = function(item) { - var samePath = item.tempModel.path.join() === item.model.path.join(); - if (samePath && $scope.fileNavigator.fileNameExists(item.tempModel.name)) { - item.error = $translate.instant('error_invalid_filename'); - return false; - } - item.rename().then(function() { - $scope.fileNavigator.refresh(); - $scope.modal('rename', true); - }); - }; - - $scope.move = function(item) { - var samePath = item.tempModel.path.join() === item.model.path.join(); - if (samePath && $scope.fileNavigator.fileNameExists(item.tempModel.name)) { - item.error = $translate.instant('error_invalid_filename'); - return false; - } - item.move().then(function() { - $scope.fileNavigator.refresh(); - $scope.modal('move', true); - }); - }; - - $scope.createFolder = function(item) { - var name = item.tempModel.name && item.tempModel.name.trim(); - item.tempModel.type = 'dir'; - item.tempModel.path = $scope.fileNavigator.currentPath; - if (name && !$scope.fileNavigator.fileNameExists(name)) { - item.createFolder().then(function() { - $scope.fileNavigator.refresh(); - $scope.modal('newfolder', true); - }); - } else { - item.error = $translate.instant('error_invalid_filename'); - return false; - } - }; - - $scope.subScopeFolder = function(item) { - var name = item.tempModel.name +"\\" + item.tempModel.subScopename && item.tempModel.name.trim() + "\\"+item.tempModel.subScopename.trim() ; - item.tempModel.type = 'dir'; - item.tempModel.path = $scope.fileNavigator.currentPath; - if (name && !$scope.fileNavigator.fileNameExists(name)) { - item.getScopeContent().then(function() { - $scope.fileNavigator.refresh(); - $scope.modal('addSubScope', true); - }); - } else { - item.error = $translate.instant('error_invalid_filename'); - return false; - } - }; - - $scope.uploadFiles = function() { - $scope.fileUploader.upload($scope.uploadFileList, $scope.fileNavigator.currentPath).then(function() { - $scope.fileNavigator.refresh(); - $scope.modal('uploadfile', true); - }, function(data) { - var errorMsg = data.result && data.result.error || $translate.instant('error_uploading_files'); - $scope.temp.error = errorMsg; - }); - }; - - $scope.getQueryParam = function(param) { - var found; - window.location.search.substr(1).split('&').forEach(function(item) { - if (param === item.split('=')[0]) { - found = item.split('=')[1]; - return false; - } - }); - return found; - }; - - $scope.changeLanguage($scope.getQueryParam('lang')); - $scope.isWindows = $scope.getQueryParam('server') === 'Windows'; - $scope.fileNavigator.refresh(); - }]); -})(window, angular, jQuery); diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/js/controllers/selector-controller.js b/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/js/controllers/selector-controller.js deleted file mode 100644 index e775534c1..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/js/controllers/selector-controller.js +++ /dev/null @@ -1,47 +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========================================================= - */ - -(function(angular, $) { - 'use strict'; - angular.module('abs').controller('ModalFileManagerCtrl', - ['$scope', '$rootScope', 'fileNavigator', - function($scope, $rootScope, FileNavigator) { - - $scope.reverse = false; - $scope.predicate = ['model.type', 'model.name']; - $scope.order = function(predicate) { - $scope.reverse = ($scope.predicate[1] === predicate) ? !$scope.reverse : false; - $scope.predicate[1] = predicate; - }; - - $scope.fileNavigator = new FileNavigator(); - $rootScope.select = function(item, temp) { - temp.tempModel.path = item.model.fullPath().split('/'); - $('#selector').modal('hide'); - }; - - $rootScope.openNavigator = function(item) { - $scope.fileNavigator.currentPath = item.model.path.slice(); - $scope.fileNavigator.refresh(); - $('#selector').modal('show'); - }; - - }]); -})(angular, jQuery); \ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/js/directives/directives.js b/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/js/directives/directives.js deleted file mode 100644 index 861f32ac5..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/js/directives/directives.js +++ /dev/null @@ -1,60 +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========================================================= - */ - -(function(angular) { - 'use strict'; - var app = angular.module('abs'); - - app.directive('angularFilemanager', ['$parse', 'fileManagerConfig', function($parse, fileManagerConfig) { - return { - restrict: 'EA', - templateUrl: fileManagerConfig.tplPath + '/main.html' - }; - }]); - - app.directive('ngFile', ['$parse', function($parse) { - return { - restrict: 'A', - link: function(scope, element, attrs) { - var model = $parse(attrs.ngFile); - var modelSetter = model.assign; - - element.bind('change', function() { - scope.$apply(function() { - modelSetter(scope, element[0].files); - }); - }); - } - }; - }]); - - app.directive('ngRightClick', ['$parse', function($parse) { - return function(scope, element, attrs) { - var fn = $parse(attrs.ngRightClick); - element.bind('contextmenu', function(event) { - scope.$apply(function() { - event.preventDefault(); - fn(scope, {$event: event}); - }); - }); - }; - }]); - -})(angular); diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/js/entities/item.js b/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/js/entities/item.js deleted file mode 100644 index 709404e8c..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/js/entities/item.js +++ /dev/null @@ -1,351 +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========================================================= - */ - -(function(window, angular, $) { - 'use strict'; - angular.module('abs').factory('item', ['$http', '$q', '$translate', 'fileManagerConfig', function($http, $q, $translate, fileManagerConfig) { - - var Item = function(model, path) { - var rawModel = { - name: model && model.name || '', - subScopename: model && model.subScopename || '', - path: path || [], - type: model && model.type || 'file', - size: model && parseInt(model.size || 0), - date: parseMySQLDate(model && model.date), - version: model && model.version || '', - createdBy: model && model.createdBy || '', - modifiedBy: model && model.modifiedBy || '', - content: model && model.content || '', - recursive: false, - sizeKb: function() { - return Math.round(this.size / 1024, 1); - }, - fullPath: function() { - if(this.version == ""){ - return ('/' + this.path.join('/') + '/' + this.name).replace(/\/\//, '/'); - }else{ - return ('/' + this.path.join('/') + '/' + this.name + '.' + this.version + '.xml').replace(/\/\//, '/'); - } - } - }; - - this.error = ''; - this.inprocess = false; - - this.model = angular.copy(rawModel); - this.tempModel = angular.copy(rawModel); - - function parseMySQLDate(mysqlDate) { - var d = (mysqlDate || '').toString().split(/[- :]/); - return new Date(d[0], d[1] - 1, d[2], d[3], d[4], d[5]); - } - }; - - Item.prototype.update = function() { - angular.extend(this.model, angular.copy(this.tempModel)); - }; - - Item.prototype.revert = function() { - angular.extend(this.tempModel, angular.copy(this.model)); - this.error = ''; - }; - - Item.prototype.deferredHandler = function(data, deferred, defaultMsg) { - if (!data || typeof data !== 'object') { - this.error = 'Bridge response error, please check the docs'; - } - if (data.result && data.result.error) { - this.error = data.result.error; - } - if (!this.error && data.error) { - this.error = data.error.message; - } - if (!this.error && defaultMsg) { - this.error = defaultMsg; - } - if (this.error) { - return deferred.reject(data); - } - this.update(); - return deferred.resolve(data); - }; - - Item.prototype.createFolder = function() { - var self = this; - var deferred = $q.defer(); - var data = {params: { - mode: 'ADDFOLDER', - path: self.tempModel.path.join('/'), - name: self.tempModel.name - }}; - - self.inprocess = true; - self.error = ''; - $http.post(fileManagerConfig.createFolderUrl, data).success(function(data) { - self.deferredHandler(data, deferred); - }).error(function(data) { - self.deferredHandler(data, deferred, $translate.instant('error_creating_folder')); - })['finally'](function() { - self.inprocess = false; - }); - - return deferred.promise; - }; - - Item.prototype.rename = function() { - var self = this; - var deferred = $q.defer(); - var data = {params: { - mode: 'RENAME', - path: self.model.fullPath(), - newPath: self.tempModel.fullPath() - }}; - self.inprocess = true; - self.error = ''; - $http.post(fileManagerConfig.renameUrl, data).success(function(data) { - self.deferredHandler(data, deferred); - }).error(function(data) { - self.deferredHandler(data, deferred, $translate.instant('error_renaming')); - })['finally'](function() { - self.inprocess = false; - }); - return deferred.promise; - }; - - - Item.prototype.move = function() { - var self = this; - var deferred = $q.defer(); - var data = {params: { - mode: 'RENAME', - path: self.model.fullPath(), - newPath: self.tempModel.fullPath() - }}; - self.inprocess = true; - self.error = ''; - $http.post(fileManagerConfig.renameUrl, data).success(function(data) { - self.deferredHandler(data, deferred); - }).error(function(data) { - self.deferredHandler(data, deferred, $translate.instant('error_moving')); - })['finally'](function() { - self.inprocess = false; - }); - return deferred.promise; - }; - - Item.prototype.copy = function() { - var self = this; - var deferred = $q.defer(); - var data = {params: { - mode: 'COPY', - path: self.model.fullPath(), - newPath: self.tempModel.fullPath() - }}; - - self.inprocess = true; - self.error = ''; - $http.post(fileManagerConfig.copyUrl, data).success(function(data) { - self.deferredHandler(data, deferred); - }).error(function(data) { - self.deferredHandler(data, deferred, $translate.instant('error_copying')); - })['finally'](function() { - self.inprocess = false; - }); - return deferred.promise; - }; - - - Item.prototype.getContent = function() { - var self = this; - var deferred = $q.defer(); - var data = {params: { - mode: 'EDITFILE', - path: self.tempModel.fullPath() - }}; - - self.inprocess = true; - self.error = ''; - $http.post(fileManagerConfig.getContentUrl, data).success(function(data) { - self.tempModel.content = self.model.content = data.result; - var json = data.result; - var policy = JSON.parse(json); - self.policy = policy; - console.log(policy); - self.deferredHandler(data, deferred); - }).error(function(data) { - self.deferredHandler(data, deferred, $translate.instant('error_getting_content')); - })['finally'](function() { - self.inprocess = false; - }); - return deferred.promise; - }; - - Item.prototype.getViewPolicyContent = function() { - var self = this; - var deferred = $q.defer(); - var data = {params: { - mode: 'VIEWPOLICY', - path: self.tempModel.fullPath() - }}; - - self.inprocess = true; - self.error = ''; - $http.post(fileManagerConfig.viewPolicyUrl, data).success(function(data) { - self.tempModel.content = self.model.content = data.result; - var json = data.result; - var policy = JSON.parse(json); - self.policy = policy; - console.log(data.result); - console.log(policy); - self.deferredHandler(data, deferred); - }).error(function(data) { - self.deferredHandler(data, deferred, $translate.instant('error_getting_content')); - })['finally'](function() { - self.inprocess = false; - }); - return deferred.promise; - }; - - Item.prototype.getSwitchVersionContent = function() { - var self = this; - var deferred = $q.defer(); - var data = {params: { - mode: 'SWITCHVERSION', - path: self.tempModel.fullPath(), - activeVersion : self.tempModel.content.activeVersion, - highestVersion : self.tempModel.content.highestVersion - }}; - - self.inprocess = true; - self.error = ''; - $http.post(fileManagerConfig.switchVersionUrl, data).success(function(data) { - self.tempModel.content = self.model.content = data; - self.deferredHandler(data, deferred); - }).error(function(data) { - self.deferredHandler(data, deferred, $translate.instant('error_getting_content')); - })['finally'](function() { - self.inprocess = false; - }); - return deferred.promise; - }; - - Item.prototype.getDescribePolicyContent = function() { - var self = this; - var deferred = $q.defer(); - var data = {params: { - mode: 'DESCRIBEPOLICYFILE', - path: self.tempModel.fullPath() - }}; - - self.inprocess = true; - self.error = ''; - $http.post(fileManagerConfig.describePolicyUrl, data).success(function(data) { - self.tempModel.content = self.model.content = data.html; - var describeTemplate = self.tempModel.content; - - self.deferredHandler(data, deferred); - }).error(function(data) { - self.deferredHandler(data, deferred, $translate.instant('error_getting_content')); - })['finally'](function() { - self.inprocess = false; - }); - return deferred.promise; - }; - - Item.prototype.getScopeContent = function() { - var self = this; - var deferred = $q.defer(); - var data = {params: { - mode: 'ADDSUBSCOPE', - name: self.tempModel.name, - subScopename: self.tempModel.subScopename, - path: self.tempModel.fullPath() - }}; - - self.inprocess = true; - self.error = ''; - $http.post(fileManagerConfig.addSubScopeUrl, data).success(function(data) { - self.deferredHandler(data, deferred); - }).error(function(data) { - self.deferredHandler(data, deferred, $translate.instant('error_adding_Scope')); - })['finally'](function() { - self.inprocess = false; - }); - return deferred.promise; - }; - - Item.prototype.remove = function() { - var self = this; - var deferred = $q.defer(); - var data = {params: { - mode: 'DELETE', - path: self.tempModel.fullPath(), - deleteVersion : self.model.versions - }}; - - self.inprocess = true; - self.error = ''; - $http.post(fileManagerConfig.removeUrl, data).success(function(data) { - self.deferredHandler(data, deferred); - }).error(function(data) { - self.deferredHandler(data, deferred, $translate.instant('error_deleting')); - })['finally'](function() { - self.inprocess = false; - }); - return deferred.promise; - }; - - Item.prototype.removePolicy = function() { - var self = this; - var deferred = $q.defer(); - var data = {params: { - mode: 'DELETE', - path: self.tempModel.fullPath(), - deleteVersion : self.model.versions - }}; - - self.inprocess = true; - self.error = ''; - $http.post(fileManagerConfig.removeUrl, data).success(function(data) { - self.deferredHandler(data, deferred); - }).error(function(data) { - self.deferredHandler(data, deferred, $translate.instant('error_deleting')); - })['finally'](function() { - self.inprocess = false; - }); - return deferred.promise; - }; - - Item.prototype.isFolder = function() { - return this.model.type === 'dir'; - }; - - Item.prototype.isEditable = function() { - return !this.isFolder() && fileManagerConfig.isEditableFilePattern.test(this.model.name); - }; - - Item.prototype.isImage = function() { - return fileManagerConfig.isImageFilePattern.test(this.model.name); - }; - - return Item; - }]); -})(window, angular, jQuery); diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/js/filters/filters.js b/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/js/filters/filters.js deleted file mode 100644 index 895b7ab5b..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/js/filters/filters.js +++ /dev/null @@ -1,41 +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========================================================= - */ - -(function(angular) { - 'use strict'; - var app = angular.module('abs'); - - app.filter('strLimit', ['$filter', function($filter) { - return function(input, limit) { - if (input.length <= limit) { - return input; - } - return $filter('limitTo')(input, limit) + '...'; - }; - }]); - - app.filter('formatDate', ['$filter', function() { - return function(input) { - return input instanceof Date ? - input.toISOString().substring(0, 19).replace('T', ' ') : - (input.toLocaleString || input.toString).apply(input); - }; - }]); -})(angular); diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/js/providers/config.js b/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/js/providers/config.js deleted file mode 100644 index f861dd5a1..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/js/providers/config.js +++ /dev/null @@ -1,90 +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========================================================= - */ - -(function(angular) { - 'use strict'; - - angular.module('abs').provider('fileManagerConfig', function() { - - var values = { - appName: 'Policy Editor', - defaultLang: 'en', - listUrl: 'fm/listUrl', - uploadUrl: 'fm/uploadUrl', - renameUrl: 'fm/renameUrl', - copyUrl: 'fm/copyUrl', - removeUrl: 'fm/removeUrl', - editUrl: 'fm/editUrl', - getContentUrl: 'fm/getContentUrl', - createFolderUrl: 'fm/createFolderUrl', - downloadFileUrl: 'fm/downloadFileUrl', - compressUrl: 'fm/compressUrl', - extractUrl: 'fm/extractUrl', - permissionsUrl: 'fm/permissionsUrl', - describePolicyUrl : 'fm/describePolicyUrl', - viewPolicyUrl : 'fm/viewPolicyUrl', - addSubScopeUrl : 'fm/addSubScopeUrl', - switchVersionUrl : 'fm/switchVersionUrl', - exportUrl : 'fm/exportUrl', - - sidebar: true, - breadcrumb: true, - allowedActions: { - upload: true, - rename: true, - copy: true, - edit: true, - describePolicy: true, - createNewPolicy: true, - viewPolicy: true, - changePermissions: true, - compress: true, - compressChooseName: true, - extract: true, - download: true, - preview: true, - remove: true, - addSubScope : true, - switchVersion : true, - exportPolicy : true, - removePolicy : true - }, - - enablePermissionsRecursive: true, - compressAsync: true, - extractAsync: true, - - isEditableFilePattern: /\.(txt|html?|aspx?|ini|pl|py|md|css|js|log|htaccess|htpasswd|json|sql|xml|xslt?|sh|rb|as|bat|cmd|coffee|php[3-6]?|java|c|cbl|go|h|scala|vb)$/i, - isImageFilePattern: /\.(jpe?g|gif|bmp|png|svg|tiff?)$/i, - isExtractableFilePattern: /\.(gz|tar|rar|g?zip)$/i, - tplPath: 'app/policyApp/policy-models/Editor/src/templates' - }; - - return { - $get: function() { - return values; - }, - set: function (constants) { - angular.extend(values, constants); - } - }; - - }); -})(angular); diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/js/providers/translations.js b/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/js/providers/translations.js deleted file mode 100644 index 394781cd4..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/js/providers/translations.js +++ /dev/null @@ -1,353 +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========================================================= - */ - -angular.module('abs').config(['$translateProvider', function($translateProvider) { - $translateProvider.translations('en', { - filemanager: 'File Manager', - language: 'Language', - english: 'English', - spanish: 'Spanish', - portuguese: 'Portuguese', - french: 'French', - confirm: 'Confirm', - cancel: 'Cancel', - close: 'Close', - upload_file: 'Import', - files_will_uploaded_to: 'Files will be uploaded to', - uploading: 'Uploading', - permissions: 'Permissions', - select_destination_folder: 'Select the destination folder', - source: 'Source', - destination: 'Destination', - copy_file: 'Copy file', - sure_to_delete: 'Are you sure to delete', - change_name_move: 'Change name / move', - enter_new_name_for: 'Enter new name for', - extract_item: 'Extract item', - extraction_started: 'Extraction started in a background process', - compression_started: 'Compression started in a background process', - enter_folder_name_for_extraction: 'Enter the folder name for the extraction of', - enter_folder_name_for_compression: 'Enter the folder name for the compression of', - toggle_fullscreen: 'Toggle fullscreen', - edit_file: 'Edit file', - file_content: 'File content', - loading: 'Loading', - search: 'Search', - create_folder: 'Add Scope', - create: 'Create', - folder_name: 'Folder name', - upload: 'Upload', - change_permissions: 'Change permissions', - change: 'Change', - details: 'Details', - icons: 'Icons', - list: 'List', - name: 'Name', - size: 'Size', - actions: 'Actions', - date: 'Date', - no_files_in_folder: 'No files in this folder', - no_folders_in_folder: 'This folder not contains children folders', - select_this: 'Select this', - go_back: 'Go back', - wait: 'Wait', - move: 'Move', - download: 'Download', - view_item: 'View item', - remove: 'Delete', - edit: 'Edit', - copy: 'Copy', - rename: 'Rename', - extract: 'Extract', - compress: 'Compress', - error_invalid_filename: 'Invalid filename or already exists, specify another name', - error_modifying: 'An error occurred modifying the file', - error_deleting: 'An error occurred deleting the file or folder', - error_renaming: 'An error occurred renaming the file', - error_copying: 'An error occurred copying the file', - error_compressing: 'An error occurred compressing the file or folder', - error_extracting: 'An error occurred extracting the file', - error_creating_folder: 'An error occurred creating the folder', - error_getting_content: 'An error occurred getting the content of the file', - error_changing_perms: 'An error occurred changing the permissions of the file', - error_uploading_files: 'An error occurred uploading files', - sure_to_start_compression_with: 'Are you sure to compress', - owner: 'Owner', - group: 'Group', - others: 'Others', - read: 'Read', - write: 'Write', - exec: 'Exec', - original: 'Original', - changes: 'Changes', - recursive: 'Recursive', - preview: 'Item preview', - open: 'Open' - }); - - $translateProvider.translations('pt', { - filemanager: 'Gerenciador de arquivos', - language: 'Língua', - english: 'Inglês', - spanish: 'Espanhol', - portuguese: 'Portugues', - french: 'Francês', - confirm: 'Confirmar', - cancel: 'Cancelar', - close: 'Fechar', - upload_file: 'Carregar arquivo', - files_will_uploaded_to: 'Os arquivos serão enviados para', - uploading: 'Carregar', - permissions: 'Autorizações', - select_destination_folder: 'Selecione a pasta de destino', - source: 'Origem', - destination: 'Destino', - copy_file: 'Copiar arquivo', - sure_to_delete: 'Tem certeza de que deseja apagar', - change_name_move: 'Renomear / mudança', - enter_new_name_for: 'Digite o novo nome para', - extract_item: 'Extrair arquivo', - extraction_started: 'A extração começou em um processo em segundo plano', - compression_started: 'A compressão começou em um processo em segundo plano', - enter_folder_name_for_extraction: 'Digite o nome da pasta para a extração de', - enter_folder_name_for_compression: 'Digite o nome da pasta para Compressão', - toggle_fullscreen: 'Ativar/desativar tela cheia', - edit_file: 'Editar arquivo', - file_content: 'Conteúdo do arquivo', - loading: 'Carregando', - search: 'Localizar', - create_folder: 'Criar Pasta', - create: 'Criar', - folder_name: 'Nome da pasta', - upload: 'Fazer', - change_permissions: 'Alterar permissões', - change: 'Alterar', - details: 'Detalhes', - icons: 'Icones', - list: 'Lista', - name: 'Nome', - size: 'Tamanho', - actions: 'Ações', - date: 'Data', - no_files_in_folder: 'Não há arquivos nesta pasta', - no_folders_in_folder: 'Esta pasta não contém subpastas', - select_this: 'Selecione esta', - go_back: 'Voltar', - wait: 'Espere', - move: 'Mover', - download: 'Baixar', - view_item: 'Veja o arquivo', - remove: 'Excluir', - edit: 'Editar', - copy: 'Copiar', - rename: 'Renomear', - extract: 'Extrair', - compress: 'Comprimir', - error_invalid_filename: 'Nome do arquivo inválido ou nome de arquivo já existe, especifique outro nome', - error_modifying: 'Ocorreu um erro ao modificar o arquivo', - error_deleting: 'Ocorreu um erro ao excluir o arquivo ou pasta', - error_renaming: 'Ocorreu um erro ao mudar o nome do arquivo', - error_copying: 'Ocorreu um erro ao copiar o arquivo', - error_compressing: 'Ocorreu um erro ao comprimir o arquivo ou pasta', - error_extracting: 'Ocorreu um erro ao extrair o arquivo', - error_creating_folder: 'Ocorreu um erro ao criar a pasta', - error_getting_content: 'Ocorreu um erro ao obter o conteúdo do arquivo', - error_changing_perms: 'Ocorreu um erro ao alterar as permissões do arquivo', - error_uploading_files: 'Ocorreu um erro upload de arquivos', - sure_to_start_compression_with: 'Tem certeza que deseja comprimir', - owner: 'Proprietário', - group: 'Grupo', - others: 'Outros', - read: 'Leitura', - write: 'Escrita ', - exec: 'Execução', - original: 'Original', - changes: 'Mudanças', - recursive: 'Recursiva', - preview: 'Visualização', - open: 'Abrir' - }); - - $translateProvider.translations('es', { - filemanager: 'Administrador de archivos', - language: 'Idioma', - english: 'Ingles', - spanish: 'Español', - portuguese: 'Portugues', - french: 'Francés', - confirm: 'Confirmar', - cancel: 'Cancelar', - close: 'Cerrar', - upload_file: 'Subir archivo', - files_will_uploaded_to: 'Los archivos seran subidos a', - uploading: 'Subiendo', - permissions: 'Permisos', - select_destination_folder: 'Seleccione la carpeta de destino', - source: 'Origen', - destination: 'Destino', - copy_file: 'Copiar archivo', - sure_to_delete: 'Esta seguro que desea eliminar', - change_name_move: 'Renombrar / mover', - enter_new_name_for: 'Ingrese el nuevo nombre para', - extract_item: 'Extraer archivo', - extraction_started: 'La extraccion ha comenzado en un proceso de segundo plano', - compression_started: 'La compresion ha comenzado en un proceso de segundo plano', - enter_folder_name_for_extraction: 'Ingrese el nombre de la carpeta para la extraccion de', - enter_folder_name_for_compression: 'Ingrese el nombre de la carpeta para la compresion de', - toggle_fullscreen: 'Activar/Desactivar pantalla completa', - edit_file: 'Editar archivo', - file_content: 'Contenido del archivo', - loading: 'Cargando', - search: 'Buscar', - create_folder: 'Crear carpeta', - create: 'Crear', - folder_name: 'Nombre de la carpeta', - upload: 'Subir', - change_permissions: 'Cambiar permisos', - change: 'Cambiar', - details: 'Detalles', - icons: 'Iconos', - list: 'Lista', - name: 'Nombre', - size: 'Tamaño', - actions: 'Acciones', - date: 'Fecha', - no_files_in_folder: 'No hay archivos en esta carpeta', - no_folders_in_folder: 'Esta carpeta no contiene sub-carpetas', - select_this: 'Seleccionar esta', - go_back: 'Volver', - wait: 'Espere', - move: 'Mover', - download: 'Descargar', - view_item: 'Ver archivo', - remove: 'Eliminar', - edit: 'Editar', - copy: 'Copiar', - rename: 'Renombrar', - extract: 'Extraer', - compress: 'Comprimir', - error_invalid_filename: 'El nombre del archivo es invalido o ya existe', - error_modifying: 'Ocurrio un error al intentar modificar el archivo', - error_deleting: 'Ocurrio un error al intentar eliminar el archivo', - error_renaming: 'Ocurrio un error al intentar renombrar el archivo', - error_copying: 'Ocurrio un error al intentar copiar el archivo', - error_compressing: 'Ocurrio un error al intentar comprimir el archivo', - error_extracting: 'Ocurrio un error al intentar extraer el archivo', - error_creating_folder: 'Ocurrio un error al intentar crear la carpeta', - error_getting_content: 'Ocurrio un error al obtener el contenido del archivo', - error_changing_perms: 'Ocurrio un error al cambiar los permisos del archivo', - error_uploading_files: 'Ocurrio un error al subir archivos', - sure_to_start_compression_with: 'Esta seguro que desea comprimir', - owner: 'Propietario', - group: 'Grupo', - others: 'Otros', - read: 'Lectura', - write: 'Escritura', - exec: 'Ejecucion', - original: 'Original', - changes: 'Cambios', - recursive: 'Recursivo', - preview: 'Vista previa', - open: 'Abrir' - }); - - $translateProvider.translations('fr', { - filemanager: 'Gestionnaire de fichier', - language: 'Langue', - english: 'Anglais', - spanish: 'Espagnol', - portuguese: 'Portugais', - french: 'Français', - confirm: 'Confirmer', - cancel: 'Annuler', - close: 'Fermer', - upload_file: 'Uploader un fichier', - files_will_uploaded_to: 'Les fichiers seront uploadé dans', - uploading: 'Upload en cours', - permissions: 'Permissions', - select_destination_folder: 'Sélectionné le dossier de destination', - source: 'Source', - destination: 'Destination', - copy_file: 'Copier le fichier', - sure_to_delete: 'Êtes-vous sûr de vouloir supprimer', - change_name_move: 'Renommer / Déplacer', - enter_new_name_for: 'Entrer le nouveau nom pour', - extract_item: 'Extraires les éléments', - extraction_started: 'L\'extraction a démarré en tâche de fond', - compression_started: 'La compression a démarré en tâche de fond', - enter_folder_name_for_extraction: 'Entrer le nom du dossier pour l\'extraction de', - enter_folder_name_for_compression: 'Entrer le nom du dossier pour la compression de', - toggle_fullscreen: 'Basculer en plein écran', - edit_file: 'Éditer le fichier', - file_content: 'Contenu du fichier', - loading: 'Chargement en cours', - search: 'Recherche', - create_folder: 'Créer un dossier', - create: 'Créer', - folder_name: 'Nom du dossier', - upload: 'Upload', - change_permissions: 'Changer les permissions', - change: 'Changer', - details: 'Details', - icons: 'Icons', - list: 'Liste', - name: 'Nom', - size: 'Taille', - actions: 'Actions', - date: 'Date', - no_files_in_folder: 'Aucun fichier dans ce dossier', - no_folders_in_folder: 'Ce dossier ne contiens pas de dossier', - select_this: 'Sélectionner', - go_back: 'Retour', - wait: 'Patienter', - move: 'Déplacer', - download: 'Télécharger', - view_item: 'Voir l\'élément', - remove: 'Supprimer', - edit: 'Éditer', - copy: 'Copier', - rename: 'Renommer', - extract: 'Extraire', - compress: 'Compresser', - error_invalid_filename: 'Nom de fichier invalide ou déjà existant, merci de spécifier un autre nom', - error_modifying: 'Une erreur est survenue pendant la modification du fichier', - error_deleting: 'Une erreur est survenue pendant la suppression du fichier ou du dossier', - error_renaming: 'Une erreur est survenue pendant le renommage du fichier', - error_copying: 'Une erreur est survenue pendant la copie du fichier', - error_compressing: 'Une erreur est survenue pendant la compression du fichier ou du dossier', - error_extracting: 'Une erreur est survenue pendant l\'extraction du fichier', - error_creating_folder: 'Une erreur est survenue pendant la création du dossier', - error_getting_content: 'Une erreur est survenue pendant la récupération du contenu du fichier', - error_changing_perms: 'Une erreur est survenue pendant le changement des permissions du fichier', - error_uploading_files: 'Une erreur est survenue pendant l\'upload des fichiers', - sure_to_start_compression_with: 'Êtes-vous sûre de vouloir compresser', - owner: 'Propriétaire', - group: 'Groupe', - others: 'Autres', - read: 'Lecture', - write: 'Écriture', - exec: 'Éxécution', - original: 'Original', - changes: 'Modifications', - recursive: 'Récursif', - preview: 'Aperçu', - open: 'Ouvrir' - }); - }]); diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/js/services/RolesService.js b/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/js/services/RolesService.js deleted file mode 100644 index f661e3796..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/js/services/RolesService.js +++ /dev/null @@ -1,41 +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========================================================= - */ - -/** - * - */ -angular.module("abs").factory('RolesService', function ($http, $q) { - return { - getRolesData: function() { - return $http.get('get_UserRolesData') - .then(function(response) { - if (typeof response.data === 'object') { - return response.data; - } else { - return $q.reject(response.data); - } - - }, function(response) { - // something went wrong - return $q.reject(response.data); - }); - } - }; -}); \ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/js/services/filenavigator.js b/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/js/services/filenavigator.js deleted file mode 100644 index 95d22bd7a..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/js/services/filenavigator.js +++ /dev/null @@ -1,199 +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========================================================= - */ - -(function(angular) { - 'use strict'; - angular.module('abs').service('fileNavigator', [ - '$http', '$q', 'fileManagerConfig', 'item', function ($http, $q, fileManagerConfig, Item) { - - $http.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; - - var FileNavigator = function() { - this.requesting = false; - this.fileList = []; - this.currentPath = []; - this.history = []; - this.error = ''; - }; - - FileNavigator.prototype.deferredHandler = function(data, deferred, defaultMsg) { - if (!data || typeof data !== 'object') { - this.error = 'Bridge response error, please check the docs'; - } - if (!this.error && data.result && data.result.error) { - this.error = data.result.error; - } - if (!this.error && data.error) { - this.error = data.error.message; - } - if (!this.error && defaultMsg) { - this.error = defaultMsg; - } - if (this.error) { - return deferred.reject(data); - } - return deferred.resolve(data); - }; - - FileNavigator.prototype.deferredSearchHandler = function(data, deferred, defaultMsg) { - self.fileList = []; - self.error = ''; - if (!data || typeof data !== 'object') { - this.error = 'Bridge response error, please check the docs'; - } - if (!this.error && data.result && data.result.error) { - this.error = data.result.error; - } - if (!this.error && data.error) { - this.error = data.error.message; - } - if (!this.error && defaultMsg) { - this.error = defaultMsg; - } - if (this.error) { - return deferred.reject(data); - } - return deferred.resolve(data); - }; - - FileNavigator.prototype.list = function() { - var self = this; - var deferred = $q.defer(); - var path = self.currentPath.join('/'); - var data = {params: { - mode: 'LIST', - onlyFolders: false, - path: '/' + path - }}; - - self.requesting = true; - self.fileList = []; - self.error = ''; - - $http.post(fileManagerConfig.listUrl, data).success(function(data) { - self.deferredHandler(data, deferred); - }).error(function(data) { - self.deferredHandler(data, deferred, 'Unknown error listing, check the response'); - })['finally'](function() { - self.requesting = false; - }); - return deferred.promise; - }; - - FileNavigator.prototype.refresh = function() { - var self = this; - var path = self.currentPath.join('/'); - return self.list().then(function(data) { - self.fileList = (data.result || []).map(function(file) { - return new Item(file, self.currentPath); - }); - self.buildTree(path); - }); - }; - - FileNavigator.prototype.buildTree = function(path) { - var flatNodes = [], selectedNode = {}; - - function recursive(parent, item, path) { - var absName = path ? (path + '/' + item.model.name) : item.model.name; - if (parent.name.trim() && path.trim().indexOf(parent.name) !== 0) { - parent.nodes = []; - } - if (parent.name !== path) { - for (var i in parent.nodes) { - recursive(parent.nodes[i], item, path); - } - } else { - for (var e in parent.nodes) { - if (parent.nodes[e].name === absName) { - return; - } - } - parent.nodes.push({item: item, name: absName, nodes: []}); - } - parent.nodes = parent.nodes.sort(function(a, b) { - return a.name.toLowerCase() < b.name.toLowerCase() ? -1 : a.name.toLowerCase() === b.name.toLowerCase() ? 0 : 1; - }); - } - - function flatten(node, array) { - array.push(node); - for (var n in node.nodes) { - flatten(node.nodes[n], array); - } - } - - function findNode(data, path) { - return data.filter(function (n) { - return n.name === path; - })[0]; - } - - !this.history.length && this.history.push({name: '', nodes: []}); - flatten(this.history[0], flatNodes); - selectedNode = findNode(flatNodes, path); - selectedNode.nodes = []; - - for (var o in this.fileList) { - var item = this.fileList[o]; - item.isFolder() && recursive(this.history[0], item, path); - } - }; - - FileNavigator.prototype.folderClick = function(item) { - this.currentPath = []; - if (item && item.isFolder()) { - this.currentPath = item.model.fullPath().split('/').splice(1); - } - this.refresh(); - }; - - FileNavigator.prototype.upDir = function() { - if (this.currentPath[0]) { - this.currentPath = this.currentPath.slice(0, -1); - this.refresh(); - } - }; - - FileNavigator.prototype.goTo = function(index) { - this.currentPath = this.currentPath.slice(0, index + 1); - this.refresh(); - }; - - FileNavigator.prototype.fileNameExists = function(fileName) { - for (var item in this.fileList) { - item = this.fileList[item]; - if (fileName.trim && item.model.name.trim() === fileName.trim()) { - return true; - } - } - }; - - FileNavigator.prototype.listHasFolders = function() { - for (var item in this.fileList) { - if (this.fileList[item].model.type === 'dir') { - return true; - } - } - }; - - return FileNavigator; - }]); -})(angular); \ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/js/services/fileuploader.js b/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/js/services/fileuploader.js deleted file mode 100644 index 8bf6e194f..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/js/services/fileuploader.js +++ /dev/null @@ -1,73 +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========================================================= - */ - -(function(window, angular) { - 'use strict'; - angular.module('abs').service('fileUploader', ['$http', '$q', 'fileManagerConfig', function ($http, $q, fileManagerConfig) { - - function deferredHandler(data, deferred, errorMessage) { - if (!data || typeof data !== 'object') { - return deferred.reject('Bridge response error, please check the docs'); - } - if (data.result && data.result.error) { - return deferred.reject(data); - } - if (data.error) { - return deferred.reject(data); - } - if (errorMessage) { - return deferred.reject(errorMessage); - } - deferred.resolve(data); - } - - this.requesting = false; - this.upload = function(fileList, path) { - if (! window.FormData) { - throw new Error('Unsupported browser version'); - } - var self = this; - var form = new window.FormData(); - var deferred = $q.defer(); - form.append('destination', '/' + path.join('/')); - - for (var i = 0; i < fileList.length; i++) { - var fileObj = fileList.item(i); - fileObj instanceof window.File && form.append('file-' + i, fileObj); - } - - self.requesting = true; - $http.post(fileManagerConfig.uploadUrl, form, { - transformRequest: angular.identity, - headers: { - 'Content-Type': undefined - } - }).success(function(data) { - deferredHandler(data, deferred); - }).error(function(data) { - deferredHandler(data, deferred, 'Unknown error uploading files'); - })['finally'](function() { - self.requesting = false; - }); - - return deferred.promise; - }; - }]); -})(window, angular); \ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/templates/current-folder-breadcrumb.html b/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/templates/current-folder-breadcrumb.html deleted file mode 100644 index b2ea4e8cd..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/templates/current-folder-breadcrumb.html +++ /dev/null @@ -1,34 +0,0 @@ - - - \ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/templates/item-context-menu.html b/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/templates/item-context-menu.html deleted file mode 100644 index 1e93cf0a6..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/templates/item-context-menu.html +++ /dev/null @@ -1,102 +0,0 @@ - - - \ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/templates/item-toolbar.html b/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/templates/item-toolbar.html deleted file mode 100644 index 1b767e3a2..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/templates/item-toolbar.html +++ /dev/null @@ -1,25 +0,0 @@ - - -
- -
\ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/templates/main-icons.html b/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/templates/main-icons.html deleted file mode 100644 index 8487d4838..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/templates/main-icons.html +++ /dev/null @@ -1,43 +0,0 @@ - - -
- - -
-
-
- -
- {{"no_files_in_folder" | translate}}... -
- -
- {{ fileNavigator.error }} -
-
\ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/templates/main-table-modal.html b/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/templates/main-table-modal.html deleted file mode 100644 index 12b2cf048..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/templates/main-table-modal.html +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - -
- - {{"name" | translate}} - - -
-
-
- {{"no_folders_in_folder" | translate}}... - - -
- {{ fileNavigator.error }} -
- - - {{item.model.name | strLimit : 32}} - - - -
\ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/templates/main-table.html b/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/templates/main-table.html deleted file mode 100644 index 6a576f2fb..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/templates/main-table.html +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - {{"name" | translate}} - - -
-
-
- {{"no_files_in_folder" | translate}}... -
- {{ fileNavigator.error }} -
- - - - {{item.model.name | strLimit : 64}} - -
\ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/templates/main.html b/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/templates/main.html deleted file mode 100644 index 6db7c8423..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/templates/main.html +++ /dev/null @@ -1,34 +0,0 @@ - - -
-
-
-
-
- -
-
-
-
-
-
-
-
\ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/templates/modals.html b/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/templates/modals.html deleted file mode 100644 index 0adb1c407..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/templates/modals.html +++ /dev/null @@ -1,385 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/templates/navbar.html b/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/templates/navbar.html deleted file mode 100644 index 9bd272819..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/templates/navbar.html +++ /dev/null @@ -1,127 +0,0 @@ - - -
- - -
- -
-
-
-
- -
-
-
- -
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
-
-
-
diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/templates/sidebar.html b/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/templates/sidebar.html deleted file mode 100644 index 89c7b2f23..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/templates/sidebar.html +++ /dev/null @@ -1,34 +0,0 @@ - - - - - \ No newline at end of file diff --git a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/templates/spinner.html b/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/templates/spinner.html deleted file mode 100644 index 16f682e87..000000000 --- a/ecomp-sdk-app/src/main/webapp/app/policyApp/policy-models/Editor/src/templates/spinner.html +++ /dev/null @@ -1,25 +0,0 @@ - - -
- - - -
\ No newline at end of file -- cgit 1.2.3-korg