From abf21d29315504969e32f2199d8f2c176058addf Mon Sep 17 00:00:00 2001 From: kevgliss Date: Sat, 1 Aug 2015 15:37:47 -0700 Subject: [PATCH] Adding in frontend javascript for sources --- lemur/static/app/angular/elbs/elb/elb.js | 3 - .../static/app/angular/elbs/elb/elb.tpl.html | 10 -- lemur/static/app/angular/elbs/services.js | 59 -------- lemur/static/app/angular/elbs/view/view.js | 34 ----- .../app/angular/elbs/view/view.tpl.html | 128 ------------------ .../static/app/angular/listeners/services.js | 37 ----- lemur/static/app/index.html | 1 + 7 files changed, 1 insertion(+), 271 deletions(-) delete mode 100644 lemur/static/app/angular/elbs/elb/elb.js delete mode 100644 lemur/static/app/angular/elbs/elb/elb.tpl.html delete mode 100644 lemur/static/app/angular/elbs/services.js delete mode 100644 lemur/static/app/angular/elbs/view/view.js delete mode 100644 lemur/static/app/angular/elbs/view/view.tpl.html delete mode 100644 lemur/static/app/angular/listeners/services.js diff --git a/lemur/static/app/angular/elbs/elb/elb.js b/lemur/static/app/angular/elbs/elb/elb.js deleted file mode 100644 index d35be162..00000000 --- a/lemur/static/app/angular/elbs/elb/elb.js +++ /dev/null @@ -1,3 +0,0 @@ -/** - * Created by kglisson on 1/19/15. - */ diff --git a/lemur/static/app/angular/elbs/elb/elb.tpl.html b/lemur/static/app/angular/elbs/elb/elb.tpl.html deleted file mode 100644 index d0658f25..00000000 --- a/lemur/static/app/angular/elbs/elb/elb.tpl.html +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/lemur/static/app/angular/elbs/services.js b/lemur/static/app/angular/elbs/services.js deleted file mode 100644 index 83d98dc5..00000000 --- a/lemur/static/app/angular/elbs/services.js +++ /dev/null @@ -1,59 +0,0 @@ -'use strict'; - -angular.module('lemur') - .service('ELBApi', function (LemurRestangular) { - LemurRestangular.extendModel('elbs', function (obj) { - return angular.extend(obj, { - attachListener: function (listener) { - if (this.listeners === undefined) { - this.listeners = []; - } - this.listeners.push(listener); - }, - removeListener: function (index) { - this.listeners.splice(index, 1); - } - }); - }); - return LemurRestangular.all('elbs'); - }) - .service('ELBService', function ($location, ELBApi, toaster) { - var ELBService = this; - ELBService.findELBByName = function (filterValue) { - return ELBApi.getList({'filter[name]': filterValue}) - .then(function (elbs) { - return elbs; - }); - }; - - ELBService.getListeners = function (elb) { - elb.getList('listeners').then(function (listeners) { - elb.listeners = listeners; - }); - return elb; - }; - - ELBService.create = function (elb) { - ELBApi.post(elb).then(function () { - toaster.pop({ - type: 'success', - title: 'ELB ' + elb.name, - body: 'Has been successfully created!' - }); - $location.path('elbs'); - }); - }; - - ELBService.update = function (elb) { - elb.put().then(function () { - toaster.pop({ - type: 'success', - title: 'ELB ' + elb.name, - body: 'Has been successfully updated!' - }); - $location.path('elbs'); - }); - }; - - return ELBService; - }); diff --git a/lemur/static/app/angular/elbs/view/view.js b/lemur/static/app/angular/elbs/view/view.js deleted file mode 100644 index 6a7bd825..00000000 --- a/lemur/static/app/angular/elbs/view/view.js +++ /dev/null @@ -1,34 +0,0 @@ -'use strict'; - -angular.module('lemur') - .config(function config($routeProvider) { - $routeProvider.when('/elbs', { - templateUrl: '/angular/elbs/view/view.tpl.html', - controller: 'ELBViewController' - }); - }) - - .controller('ELBViewController', function ($scope, ELBApi, ELBService, ngTableParams) { - $scope.filter = {}; - $scope.elbsTable = new ngTableParams({ - page: 1, // show first page - count: 10, // count per page - sorting: { - id: 'desc' // initial sorting - }, - filter: $scope.filter - }, { - total: 0, // length of data - getData: function ($defer, params) { - ELBApi.getList(params.url()) - .then(function (data) { - params.total(data.total); - $defer.resolve(data); - }); - } - }); - - $scope.toggleFilter = function (params) { - params.settings().$scope.show_filter = !params.settings().$scope.show_filter; - }; - }); diff --git a/lemur/static/app/angular/elbs/view/view.tpl.html b/lemur/static/app/angular/elbs/view/view.tpl.html deleted file mode 100644 index b3e4dad5..00000000 --- a/lemur/static/app/angular/elbs/view/view.tpl.html +++ /dev/null @@ -1,128 +0,0 @@ -
-
-

ELBs - Bring Balance to the Force

-
-
-
-
-
- -
-
-
-
- - - - - - - - - - - - - - -
-
{{ elb.name }}
-
-
{{ elb.account.label }} -
-
-
{{ elb.region }}
-
-
- - -
-
-
- - -
-
-
- - -
-
- - - - - - - - - - - - - - - - - - - - - -
- Certificate NameInstance PortInstance ProtocolLoad Balancer PortLoad Balancer Protocol
-
- -
-
-
- - -
-
-
-
-
- -
-
-
- -
-
-
- -
-
-
- -
-
- -
-
-
-
-
diff --git a/lemur/static/app/angular/listeners/services.js b/lemur/static/app/angular/listeners/services.js deleted file mode 100644 index ef141c17..00000000 --- a/lemur/static/app/angular/listeners/services.js +++ /dev/null @@ -1,37 +0,0 @@ -'use strict'; - -angular.module('lemur') - .service('ListenerApi', function (LemurRestangular) { - return LemurRestangular.all('listeners'); - }) - .service('ListenerService', function ($location, ListenerApi) { - var ListenerService = this; - ListenerService.findListenerByName = function (filterValue) { - return ListenerApi.getList({'filter[name]': filterValue}) - .then(function (roles) { - return roles; - }); - }; - - ListenerService.create = function (role) { - ListenerApi.post(role).then(function () { - toaster.pop({ - type: 'success', - title: 'Listener ' + role.name, - body: 'Has been successfully created!' - }); - $location.path('roles/view'); - }); - }; - - ListenerService.update = function (role) { - role.put().then(function () { - toaster.pop({ - type: 'success', - title: 'Listener ' + role.name, - body: 'Has been successfully updated!' - }); - $location.path('roles/view'); - }); - }; - }); diff --git a/lemur/static/app/index.html b/lemur/static/app/index.html index 3ef93dd7..46dcd3a9 100644 --- a/lemur/static/app/index.html +++ b/lemur/static/app/index.html @@ -54,6 +54,7 @@
  • Authorities
  • Notifications
  • Destinations
  • +
  • Sources