Fixing rcord dashboard update
Change-Id: Ida3cce0a262404b90c1a56d4a78aad3819411852
diff --git a/xos/gui/src/app/subscriber-dashboard/subscriber-dashboard.component.ts b/xos/gui/src/app/subscriber-dashboard/subscriber-dashboard.component.ts
index 8dcff63..69fe149 100644
--- a/xos/gui/src/app/subscriber-dashboard/subscriber-dashboard.component.ts
+++ b/xos/gui/src/app/subscriber-dashboard/subscriber-dashboard.component.ts
@@ -16,6 +16,7 @@
import * as _ from 'lodash';
import './subscriber-dashboard.scss';
+
import {IRCordSubscriber, IRCordSubscriberDevice} from '../interfaces/rcord-subscriber.interface';
class RcordSubscriberDashboardCtrl {
@@ -33,7 +34,7 @@
floor: 0,
ceil: 1000000000,
translate: (value) => {
- return Math.floor(value / 1000000);
+ return `${Math.floor(value / 1000000)} MB`;
}
};
public selectedSubscriber: IRCordSubscriber;
@@ -72,6 +73,7 @@
if (angular.isUndefined(subscriber.service_specific_attribute.devices)) {
subscriber.service_specific_attribute.devices = [];
}
+
subscriber.service_specific_attribute.devices.push({
name: '',
mac: '',
@@ -86,6 +88,8 @@
public save(subscriber: IRCordSubscriber) {
const item: any = angular.copy(subscriber);
+ delete item.updated;
+
_.forEach(Object.keys(item), prop => {
if (prop.indexOf('-formatted') > -1 || prop.indexOf('_ptr') > -1) {
delete item[prop];
@@ -125,4 +129,4 @@
template: require('./subscriber-dashboard.html'),
controllerAs: 'vm',
controller: RcordSubscriberDashboardCtrl
-};
+}