Adding profiles to EnodeB and IMSI
diff --git a/mCordPortal/src/app/view/imsi-details/imsi-details.js b/mCordPortal/src/app/view/imsi-details/imsi-details.js
index 0628601..99204c4 100644
--- a/mCordPortal/src/app/view/imsi-details/imsi-details.js
+++ b/mCordPortal/src/app/view/imsi-details/imsi-details.js
@@ -8,7 +8,7 @@
         scope: {},
         controllerAs: 'vm',
         templateUrl: 'app/view/imsi-details/imsi-details.tpl.html',
-        controller: function($stateParams, _, Imsi){
+        controller: function($scope, $stateParams, $uibModal, _, Imsi){
 
           Imsi.get({id: $stateParams.id}).$promise
           .then((imsi) => {
@@ -16,10 +16,7 @@
             return imsi.getProfiles()
           })
           .then(profiles => {
-            this.data = _.reduce(profiles, (list, p) => {
-              list.push([p.DlAllocRBRate, p.UlAllocRBRate]);
-              return list;
-            }, [])
+            this.profiles = profiles;
           });
 
           this.config = {
@@ -29,14 +26,30 @@
               {
                 label: 'Update',
                 icon: 'ok',
-                cb: (enode) => {
-                  enode.$save();
+                cb: (imsi) => {
+                  imsi.$save();
                 },
                 class: 'primary-border'
               }
             ]
           };
-          
+
+          this.addProfile = () => {
+            const _this = this;
+            this.modalInstance = $uibModal.open({
+              animation: true,
+              templateUrl: 'addProfileToImsi',
+              controllerAs: 'vm',
+              controller: function ($uibModalInstance) {
+                this.modal    = $uibModalInstance;
+                this.callback = (profile) => {
+                  console.log(_this.imsi);
+                  $scope.$broadcast('profile.add', {targetId: _this.imsi.IMSI, profile: profile});
+                };
+                this.imsi = _this.imsi;
+              }
+            });
+          };
         }
       }
     });