From 7dc5a2000dbffa30315256334cade7b9e507893d Mon Sep 17 00:00:00 2001 From: dunithd Date: Thu, 5 Jan 2017 21:23:34 +0530 Subject: [PATCH] Adding Geo Dashboard link to device view page --- .../device-view.hbs | 16 ++++++++++++++++ .../device-view.js | 5 ++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.device-view/device-view.hbs b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.device-view/device-view.hbs index ba9322aca0..ce3f71d7c6 100644 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.device-view/device-view.hbs +++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.device-view/device-view.hbs @@ -73,4 +73,20 @@ +
+
Map
+ +
+
+ + + + + + + View Device Location + +
{{/zone}} diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.device-view/device-view.js b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.device-view/device-view.js index 32d8c813e1..999d4ee64c 100644 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.device-view/device-view.js +++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android_sense.device-view/device-view.js @@ -28,10 +28,13 @@ function onRequest(context) { var deviceModule = require("/app/modules/business-controllers/device.js")["deviceModule"]; var device = deviceModule.viewDevice(deviceType, deviceId); if (device && device.status != "error") { + var anchor = { "device" : { "id" : device.content.deviceIdentifier, "type" : device.content.type}}; return { "device": device.content, "autoCompleteParams": autoCompleteParams, - "encodedFeaturePayloads": "" + "encodedFeaturePayloads": "", + "portalUrl" : devicemgtProps['portalURL'], + "anchor" : JSON.stringify(anchor) }; } else { response.sendError(404, "Device Id " + deviceId + " of type " + deviceType + " cannot be found!");