blob: 0628601dba02542c2c0f26828f0d91f8dfd262d4 [file] [log] [blame]
Matteo Scandoloed9e3ec2016-06-13 15:20:11 -07001(function () {
2 'use strict';
3
4 angular.module('mCord')
5 .directive('imsiDetails', function () {
6 return {
7 restrict: 'E',
8 scope: {},
9 controllerAs: 'vm',
10 templateUrl: 'app/view/imsi-details/imsi-details.tpl.html',
11 controller: function($stateParams, _, Imsi){
12
13 Imsi.get({id: $stateParams.id}).$promise
14 .then((imsi) => {
15 this.imsi = imsi;
16 return imsi.getProfiles()
17 })
18 .then(profiles => {
19 this.data = _.reduce(profiles, (list, p) => {
20 list.push([p.DlAllocRBRate, p.UlAllocRBRate]);
21 return list;
22 }, [])
23 });
24
25 this.config = {
26 exclude: ['UeStatus'],
27 formName: 'updateEnode',
28 actions: [
29 {
30 label: 'Update',
31 icon: 'ok',
32 cb: (enode) => {
33 enode.$save();
34 },
35 class: 'primary-border'
36 }
37 ]
38 };
39
40 }
41 }
42 });
43}());