From 6634dded555ec73b19f0a2757f22518fd6cd1393 Mon Sep 17 00:00:00 2001 From: Dunith Dhanushka Date: Tue, 17 Jan 2017 15:09:05 +0530 Subject: [PATCH 1/4] Building the anchor text --- .../cdmf.unit.device.type.android.device-view/device-view.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/device-view.js b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/device-view.js index c192718e8..4dcc25e5d 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/device-view.js +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/device-view.js @@ -213,7 +213,6 @@ function onRequest(context) { deviceViewData["autoCompleteParams"] = autoCompleteParams; deviceViewData["portalUrl"] = devicemgtProps['portalURL']; - deviceViewData["deviceId"] = deviceId; - deviceViewData["deviceType"] = deviceType; + deviceViewData["anchor"] = encodeURI(JSON.stringify({ "device" : { "id" : deviceId, "type" : deviceType}})); return deviceViewData; } From 54b08f9b7a7d99ae9df74252c34abec41661737d Mon Sep 17 00:00:00 2001 From: Dunith Dhanushka Date: Tue, 17 Jan 2017 15:10:46 +0530 Subject: [PATCH 2/4] Adding the JSON formatted anchor text --- .../cdmf.unit.device.type.android.device-view/device-view.hbs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/device-view.hbs b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/device-view.hbs index 38e3284f0..4a2461696 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/device-view.hbs +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.android.device-view/device-view.hbs @@ -339,7 +339,7 @@
+ href="{{portalUrl}}/portal/dashboards/geo-dashboard/?GLOBAL-STATE={{anchor}}"> From d4107747ab9f572580c1ac4100312d5d282ccc69 Mon Sep 17 00:00:00 2001 From: Dunith Dhanushka Date: Tue, 17 Jan 2017 15:35:59 +0530 Subject: [PATCH 3/4] Update device-view.js --- .../device-view.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 a3ef93ec7..e5ff0676c 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 @@ -35,11 +35,11 @@ function onRequest(context) { "autoCompleteParams": autoCompleteParams, "encodedFeaturePayloads": "", "portalUrl" : devicemgtProps['portalURL'], - "anchor" : JSON.stringify(anchor) + "anchor" : encodeURI(JSON.stringify(anchor)) }; } else { response.sendError(404, "Device Id " + deviceId + " of type " + deviceType + " cannot be found!"); exit(); } } -} \ No newline at end of file +} From bbbfff28d95ddf687a651b22070a0c9b7d03ebf1 Mon Sep 17 00:00:00 2001 From: Dunith Dhanushka Date: Tue, 17 Jan 2017 15:40:27 +0530 Subject: [PATCH 4/4] UI Improvements for Geo Fencing --- .../device-view.hbs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 e23f3c0c1..628f5fc11 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 @@ -44,7 +44,7 @@
  • Operations Log
  • Map
  • + aria-controls="geo_dashboard">Geo Fencing {{/zone}} {{#zone "device-view-tab-contents"}} @@ -77,18 +77,18 @@ {{/zone}}