Remove GBP-UI and all Dlux dependencies
[groupbasedpolicy.git] / groupbasedpolicy-ui / module / src / main / resources / gbp / epg / epg-list.service.js
diff --git a/groupbasedpolicy-ui/module/src/main/resources/gbp/epg/epg-list.service.js b/groupbasedpolicy-ui/module/src/main/resources/gbp/epg/epg-list.service.js
deleted file mode 100644 (file)
index d0a58ba..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-define([], function() {
-    'use strict';
-
-    angular.module('app.gbp').service('EpgListService', EpgListService);
-
-    EpgListService.$inject = ['Restangular', 'EpgService'];
-
-    function EpgListService(Restangular, EpgService) {
-        /* methods */
-        this.createList = createList;
-
-        function EpgList() {
-            /* properties */
-            this.data = [];
-            /* methods */
-            this.setData = setData;
-            this.get = get;
-
-            /* Implementation */
-            /**
-             * fills EpgList object with data
-             * @param data
-             */
-            function setData(data) {
-                var self = this;
-                data.forEach(function(dataElement) {
-                    self.data.push(EpgService.createObject(dataElement));
-                });
-            }
-
-            function get(dataStore, idTenant) {
-                /* jshint validthis:true */
-                var self = this;
-
-                var restObj = Restangular.one('restconf').one(dataStore).one('policy:tenants').one('tenant')
-                    .one(idTenant).one('policy');
-
-                return restObj.get().then(function(data) {
-                    if (data.policy['endpoint-group']) {
-                        self.setData(data.policy['endpoint-group']);
-                    }
-                });
-            }
-        }
-
-        function createList() {
-            var obj = new EpgList();
-
-            return obj;
-        }
-    }
-
-    return EpgListService;
-});
\ No newline at end of file