blob: 98dffeb02bcedf4c15e82093af8678adb8fb50c5 [file] [log] [blame]
Matteo Scandolo06107602016-06-03 16:37:24 -07001(function () {
2 'use strict';
3
4 angular.module('mCord')
5 .directive('eNodeList', function () {
6 return {
7 restrict: 'E',
8 scope: {},
9 controllerAs: 'vm',
10 templateUrl: 'app/view/enode-list/e-node-list.tpl.html',
Matteo Scandolobe342fa2016-06-08 15:54:55 -070011 controller: function($uibModal, Enodeb){
Matteo Scandolo06107602016-06-03 16:37:24 -070012
13 Enodeb.query().$promise
14 .then((enodes) => {
Matteo Scandolo06107602016-06-03 16:37:24 -070015 this.enodes = enodes;
16 })
17
18 this.tableConfig = {
19 columns: [
20 {
21 label: '#',
Matteo Scandolobe342fa2016-06-08 15:54:55 -070022 prop: 'eNBId',
23 link: item => `#/enode/${item.eNBId}`
Matteo Scandolo06107602016-06-03 16:37:24 -070024 },
25 {
26 label: 'Ip Address',
27 prop: 'IpAddr'
28 },
29 {
30 label: 'Description',
31 prop: 'Description'
32 },
33 {
34 label: 'Status',
35 prop: 'Status',
36 type: 'boolean'
37 }
38 ]
Matteo Scandolobe342fa2016-06-08 15:54:55 -070039 };
40
41 this.addEnode = () => {
42 this.modalInstance = $uibModal.open({
43 animation: true,
44 templateUrl: 'addEnode',
45 controllerAs: 'vm',
46 controller: function($uibModalInstance){
47 this.modal = $uibModalInstance;
48 }
49 });
50 };
Matteo Scandolo06107602016-06-03 16:37:24 -070051
52 }
53 }
54 });
55}());