diff --git a/modules/distribution/src/repository/jaggeryapps/iotserver/modules/constants.js b/modules/distribution/src/repository/jaggeryapps/iotserver/modules/constants.js index b05ebef0..bd03967a 100644 --- a/modules/distribution/src/repository/jaggeryapps/iotserver/modules/constants.js +++ b/modules/distribution/src/repository/jaggeryapps/iotserver/modules/constants.js @@ -38,6 +38,7 @@ var FEATURE_DESCRIPTION = "featureDescription"; var PLATFORM_ANDROID = "android"; var PLATFORM_IOS = "ios"; +var DEVICE_ENROLLMENT = "enrollment"; var VENDOR_APPLE = "Apple"; var ERRORS = { diff --git a/modules/distribution/src/repository/jaggeryapps/iotserver/modules/device.js b/modules/distribution/src/repository/jaggeryapps/iotserver/modules/device.js index bf69621c..8dfd6fcd 100644 --- a/modules/distribution/src/repository/jaggeryapps/iotserver/modules/device.js +++ b/modules/distribution/src/repository/jaggeryapps/iotserver/modules/device.js @@ -167,6 +167,7 @@ deviceModule = function () { var data = {}; //XMLHTTPRequest's GET + log.info(removeDeviceEndpoint); return del(removeDeviceEndpoint, data, "text"); }; @@ -177,6 +178,7 @@ deviceModule = function () { var data = {}; //XMLHTTPRequest's POST + log.info(updateDeviceEndpoint+ "?name="+device.name); return post(updateDeviceEndpoint+ "?name="+device.name, data, "text"); }; @@ -264,7 +266,7 @@ deviceModule = function () { properties[constants.DEVICE_VENDOR] = constants.VENDOR_APPLE; } deviceObject[constants.DEVICE_PROPERTIES] = properties; - + deviceObject[constants.DEVICE_ENROLLMENT] = device.getDateOfEnrolment(); return deviceObject; } }; diff --git a/modules/distribution/src/repository/jaggeryapps/iotserver/pages/devices/analytics.hbs b/modules/distribution/src/repository/jaggeryapps/iotserver/pages/devices/analytics.hbs index b373cc00..5f42efc4 100644 --- a/modules/distribution/src/repository/jaggeryapps/iotserver/pages/devices/analytics.hbs +++ b/modules/distribution/src/repository/jaggeryapps/iotserver/pages/devices/analytics.hbs @@ -4,6 +4,6 @@ WSO2 DC | FireAlarm {{/zone}} {{#zone "body"}} - {{unit "appbar" link="device-mgt" title="Device Management"}} + {{unit "appbar" link="analytics" title="Device Analytics"}} {{unit "analytics"}} {{/zone}} \ No newline at end of file diff --git a/modules/distribution/src/repository/jaggeryapps/iotserver/units/appbar/appbar.js b/modules/distribution/src/repository/jaggeryapps/iotserver/units/appbar/appbar.js index cb0d769b..7d0416b2 100644 --- a/modules/distribution/src/repository/jaggeryapps/iotserver/units/appbar/appbar.js +++ b/modules/distribution/src/repository/jaggeryapps/iotserver/units/appbar/appbar.js @@ -9,7 +9,7 @@ function onRequest(context) { "device-mgt": [], "store": [], "dashboard": [], - "statistics" : [] + "analytics" : [] }; var dashboardLink = { title: "Go back to Dashboard", @@ -35,7 +35,7 @@ function onRequest(context) { links.profiles.push(dashboardLink); links.store.push(dashboardLink); links.store.push(storeLink); - links.statistics.push(deviceMgtLink); + links.analytics.push(deviceMgtLink); links['device-mgt'].push(dashboardLink); if (user) { diff --git a/modules/distribution/src/repository/jaggeryapps/iotserver/units/device-detail/device-detail.hbs b/modules/distribution/src/repository/jaggeryapps/iotserver/units/device-detail/device-detail.hbs index 2228685c..bf566146 100644 --- a/modules/distribution/src/repository/jaggeryapps/iotserver/units/device-detail/device-detail.hbs +++ b/modules/distribution/src/repository/jaggeryapps/iotserver/units/device-detail/device-detail.hbs @@ -4,7 +4,9 @@ @@ -26,11 +28,13 @@
-
Device: {{device.viewModel.vendor}} {{device.properties.model}}
-
Model: {{device.viewModel.model}}
-
IMEI: {{device.viewModel.imei}}
- {{#if device.viewModel.udid}}
UDID: {{device.viewModel.udid}}
{{/if}} - {{#if device.viewModel.phoneNumber}}
Phone Number: {{device.viewModel.phoneNumber}}
{{/if}} +
Owner: {{device.owner}}
+
Date of Enrollment:
{{device.enrollment}}
+ + + + +
@@ -93,25 +97,46 @@
- +
-