diff options
author | Thomas Duval <thomas.duval@orange.com> | 2020-06-03 10:06:52 +0200 |
---|---|---|
committer | Thomas Duval <thomas.duval@orange.com> | 2020-06-03 10:06:52 +0200 |
commit | 7bb53c64da2dcf88894bfd31503accdd81498f3d (patch) | |
tree | 4310e12366818af27947b5e2c80cb162da93a4b5 /moon_gui/static/app/policy/action/mapping/policy.controller.map.js | |
parent | cbea4e360e9bfaa9698cf7c61c83c96a1ba89b8c (diff) |
Update to new version 5.4HEADstable/jermamaster
Signed-off-by: Thomas Duval <thomas.duval@orange.com>
Change-Id: Idcd868133d75928a1ffd74d749ce98503e0555ea
Diffstat (limited to 'moon_gui/static/app/policy/action/mapping/policy.controller.map.js')
-rwxr-xr-x | moon_gui/static/app/policy/action/mapping/policy.controller.map.js | 106 |
1 files changed, 0 insertions, 106 deletions
diff --git a/moon_gui/static/app/policy/action/mapping/policy.controller.map.js b/moon_gui/static/app/policy/action/mapping/policy.controller.map.js deleted file mode 100755 index 6ad8caa7..00000000 --- a/moon_gui/static/app/policy/action/mapping/policy.controller.map.js +++ /dev/null @@ -1,106 +0,0 @@ -(function() { - - 'use strict'; - - angular - .module('moon') - .controller('PolicyMapController', PolicyMapController); - - PolicyMapController.$inject = ['$scope', 'alertService', '$translate', 'formService', 'policyService', 'pdpService', 'utilService']; - - function PolicyMapController($scope, alertService, $translate, formService, policyService, pdpService, utilService ) { - - var map = this; - - /* - * - */ - - map.pdps = []; - - map.pdp = $scope.pdp; - - map.addPolicyToList = false; - - map.map = mapToPdp; - - activate(); - - function activate() { - - resolvePolicies(); - - } - - function resolvePolicies() { - - map.policiesLoading = true; - - policyService.findAllWithCallback(function(policies){ - map.policies = policies; - map.policiesLoading = false; - } - ); - - } - - function mapToPdp() { - - if (formService.isInvalid(map.form)) { - - formService.checkFieldsValidity(map.form); - - } else { - - map.mappingLoading = true; - - var pdpToSend = angular.copy(map.pdp); - - pdpToSend.security_pipeline.push(map.selectedPolicy.id); - - pdpService.update(pdpToSend, mapSuccess, mapError); - - } - - function mapSuccess(data) { - - var pdpReceived = utilService.transformOne(data, 'pdps'); - - - $translate('moon.policy.map.success', {pdpName: pdpReceived.name, policyName: map.selectedPolicy.name}).then(function (translatedValue) { - - alertService.alertSuccess(translatedValue); - - }); - - map.mappingLoading = false; - - $scope.$emit('event:policyMapToPdpSuccess', pdpReceived); - - } - - function mapError(response) { - - $translate('moon.policy.map.error', { - - pdpName: map.pdp.name, - policyName: map.selectedPolicy.name - - }).then(function (translatedValue) { - - alertService.alertError(translatedValue); - - }); - - map.mappingLoading = false; - - $scope.$emit('event:policyMapToPdpError'); - - } - } - - - - } - -})();
\ No newline at end of file |