Fixed dev server to work both mock and real data
Fixed bugs: enodeb position, profile dates, imsi creation

Change-Id: Ic2f9a46ac129acbeeba2b35f0a1464cecc84d3db
diff --git a/mCordPortal/src/app/services/rest/profiles.js b/mCordPortal/src/app/services/rest/profiles.js
index 5a7d435..432c25a 100644
--- a/mCordPortal/src/app/services/rest/profiles.js
+++ b/mCordPortal/src/app/services/rest/profiles.js
@@ -1,6 +1,7 @@
 (function () {
+
   angular.module('mCord')
-  .service('Profile', function($injector, $resource, $q, $http, baseUrl){
+  .service('Profile', function($injector, $resource, $q, $http, baseUrl, Helpers){
     const r = $resource(`${baseUrl}onos/progran/profile/:id`, {id: '@Name'}, {
       save: {
         method: 'PUT'
@@ -13,7 +14,11 @@
         interceptor: {
           response: function(res){
             const Profile = $injector.get('Profile');
-            return res.data.ProfileArray.map(p => new Profile(p));
+            return res.data.ProfileArray.map(p => new Profile(p)).map(p => {
+              p.jsStart = Helpers.stringToTime(p.Start);
+              p.jsEnd = Helpers.stringToTime(p.End);
+              return p;
+            });
           }
         }
       },
@@ -22,6 +27,8 @@
         interceptor: {
           response: function(res){
             const Profile = $injector.get('Profile');
+            res.data.ProfileArray[0].jsStart = Helpers.stringToTime(res.data.ProfileArray[0].Start);
+            res.data.ProfileArray[0].jsEnd = Helpers.stringToTime(res.data.ProfileArray[0].End);
             return new Profile(res.data.ProfileArray[0]);
           }
         }
@@ -42,6 +49,18 @@
       return {$promise: d.promise};
     };
 
+    r.prototype.$save = function(){
+      const d = $q.defer();
+      $http.put(`${baseUrl}onos/progran/profile/${this.Name}`, this)
+        .then(res => {
+          d.resolve(res.data);
+        })
+        .catch(err => {
+          d.reject(err)
+        });
+      return {$promise: d.promise};
+    };
+
     r.prototype.getImsis = function(){
       const d = $q.defer();