Remove GBP-UI and all Dlux dependencies
[groupbasedpolicy.git] / groupbasedpolicy-ui / module / src / main / resources / gbp / endpoints / endpoints.controller.js
diff --git a/groupbasedpolicy-ui/module/src/main/resources/gbp/endpoints/endpoints.controller.js b/groupbasedpolicy-ui/module/src/main/resources/gbp/endpoints/endpoints.controller.js
deleted file mode 100644 (file)
index 967886f..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-define([
-    'app/gbp/endpoints/endpoint.service',
-    'app/gbp/endpoints/endpoints-list.service',
-], function () {
-    'use strict';
-
-    angular.module('app.gbp').controller('EndpointsController', EndpointsController);
-
-    EndpointsController.$inject = ['$scope', '$mdDialog', 'EndpointsListService'];
-
-    function EndpointsController($scope, $mdDialog, EndpointsListService) {
-        /* properties */
-        $scope.endpoints = EndpointsListService.createList();
-        $scope.disableKeyFieldsEditing = false;
-        $scope.endpointsTableQuery = {
-            order: "data['context-id']",
-            limit: 25,
-            page: 1,
-            options: [25, 50, 100],
-            filter: '',
-        };
-        /* methods */
-        $scope.openEndpointDialog = openEndpointDialog;
-        $scope.getEndpointsList = getEndpointsList;
-        $scope.deleteEndpointDialog = deleteEndpointDialog;
-
-        $scope.getEndpointsList();
-
-        function getEndpointsList() {
-            $scope.endpoints.clearData();
-            $scope.rootTenant ? $scope.endpoints.getByTenantId($scope.rootTenant) : $scope.endpoints.get($scope.rootTenant);
-
-            $scope.endpointSgtList.clearData();
-            $scope.endpointSgtList.get();
-        }
-
-        function openEndpointDialog(operation, endpointData) {
-            $scope.disableKeyFieldsEditing = operation === 'edit';
-            $mdDialog.show({
-                clickOutsideToClose: true,
-                controller: 'AddEndpointController',
-                preserveScope: true,
-                templateUrl: $scope.viewPath + 'endpoints/dialog-add-endpoint.tpl.html',
-                parent: angular.element(document.body),
-                scope: $scope,
-                locals: {
-                    endpoint: endpointData,
-                },
-            });
-        }
-
-        function deleteEndpointDialog(endpointData) {
-            var confirm = $mdDialog.confirm()
-                .title('Delete endpoint')
-                .textContent('Do you want to delete endpoint?')
-                .ok('Delete')
-                .cancel('Cancel');
-
-            $mdDialog.show(confirm).then(function () {
-                endpointData.deleteEndpoint(function () {
-                    $scope.getEndpointsList();
-                });
-            }, function () {
-
-            });
-        }
-
-        $scope.$on('ROOT_TENANT_CHANGED', function () {
-            $scope.getEndpointsList();
-        });
-    }
-});