blob: 34a280ca83178a6fe174764997eda1782dd782c7 [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) => {
15 console.log(enodes);
16 this.enodes = enodes;
17 })
18
19 this.tableConfig = {
20 columns: [
21 {
22 label: '#',
Matteo Scandolobe342fa2016-06-08 15:54:55 -070023 prop: 'eNBId',
24 link: item => `#/enode/${item.eNBId}`
Matteo Scandolo06107602016-06-03 16:37:24 -070025 },
26 {
27 label: 'Ip Address',
28 prop: 'IpAddr'
29 },
30 {
31 label: 'Description',
32 prop: 'Description'
33 },
34 {
35 label: 'Status',
36 prop: 'Status',
37 type: 'boolean'
38 }
39 ]
Matteo Scandolobe342fa2016-06-08 15:54:55 -070040 };
41
42 this.addEnode = () => {
43 this.modalInstance = $uibModal.open({
44 animation: true,
45 templateUrl: 'addEnode',
46 controllerAs: 'vm',
47 controller: function($uibModalInstance){
48 this.modal = $uibModalInstance;
49 }
50 });
51 };
Matteo Scandolo06107602016-06-03 16:37:24 -070052
53 }
54 }
55 });
56}());