From c56bdd5d6b822e975c0ff32c4cad893a7d499e43 Mon Sep 17 00:00:00 2001 From: Rasika Perera Date: Tue, 23 Jan 2018 14:00:42 +0530 Subject: [PATCH 1/4] Fixing https://github.com/wso2/product-iots/issues/1611 --- .../device-view.js | 2 +- .../android/services/impl/EventReceiverServiceImpl.java | 2 +- .../android/services/impl/EventReceiverServiceImpl.java | 2 +- 3 files changed, 3 insertions(+), 3 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 f626c6856..49b35cf50 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 @@ -39,7 +39,7 @@ function onRequest(context) { viewObject.anchor = encodeURI(JSON.stringify(anchor)); viewObject.locationHistory = stringify(device.content.locationHistory); viewObject.locationEnabled = (device.content.locationHistory.length !== 0); - viewObject.geoServicesEnabled = devicemgtProps.serverConfig.operationAnalyticsConfiguration.isEnabled; + viewObject.geoServicesEnabled = devicemgtProps.serverConfig.geoLocationConfiguration.isEnabled; return viewObject; } else { response.sendError(404, "Device Id " + deviceId + " of type " + deviceType + " cannot be found!"); diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/impl/EventReceiverServiceImpl.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/impl/EventReceiverServiceImpl.java index 5616e571f..b7c9ac156 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/impl/EventReceiverServiceImpl.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/impl/EventReceiverServiceImpl.java @@ -70,7 +70,7 @@ public class EventReceiverServiceImpl implements EventReceiverService { log.debug("Invoking Android device event logging."); } try { - if (!DeviceManagerUtil.isOperationAnalyticsEnabled()) { + if (!DeviceManagerUtil.isPublishLocationResponseEnabled()) { return Response.status(Response.Status.ACCEPTED).entity("Event is publishing has not enabled.").build(); } DeviceIdentifier deviceIdentifier = new DeviceIdentifier(eventBeanWrapper.getDeviceIdentifier(), diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/services/impl/EventReceiverServiceImpl.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/services/impl/EventReceiverServiceImpl.java index 5616e571f..b7c9ac156 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/services/impl/EventReceiverServiceImpl.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.v09.api/src/main/java/org/wso2/carbon/mdm/services/android/services/impl/EventReceiverServiceImpl.java @@ -70,7 +70,7 @@ public class EventReceiverServiceImpl implements EventReceiverService { log.debug("Invoking Android device event logging."); } try { - if (!DeviceManagerUtil.isOperationAnalyticsEnabled()) { + if (!DeviceManagerUtil.isPublishLocationResponseEnabled()) { return Response.status(Response.Status.ACCEPTED).entity("Event is publishing has not enabled.").build(); } DeviceIdentifier deviceIdentifier = new DeviceIdentifier(eventBeanWrapper.getDeviceIdentifier(), From f578b395b9228c20f7a1475c1d90f493202b447b Mon Sep 17 00:00:00 2001 From: Rasika Perera Date: Tue, 23 Jan 2018 14:02:15 +0530 Subject: [PATCH 2/4] Updating devicemgt core version --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 042dbcaa0..17a8f5ea7 100644 --- a/pom.xml +++ b/pom.xml @@ -1215,7 +1215,7 @@ 1.1.1 - 3.0.205 + 3.0.207 [3.0.0, 4.0.0) From ddf2da18a32a42092ebb6cbec7faf166451eb642 Mon Sep 17 00:00:00 2001 From: Rasika Perera Date: Tue, 23 Jan 2018 14:59:51 +0530 Subject: [PATCH 3/4] Renamed isEnabled into Enabled for the consistency --- .../device-view.js | 2 +- 1 file changed, 1 insertion(+), 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.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 49b35cf50..68f5ae744 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 @@ -39,7 +39,7 @@ function onRequest(context) { viewObject.anchor = encodeURI(JSON.stringify(anchor)); viewObject.locationHistory = stringify(device.content.locationHistory); viewObject.locationEnabled = (device.content.locationHistory.length !== 0); - viewObject.geoServicesEnabled = devicemgtProps.serverConfig.geoLocationConfiguration.isEnabled; + viewObject.geoServicesEnabled = devicemgtProps.serverConfig.geoLocationConfiguration.enabled; return viewObject; } else { response.sendError(404, "Device Id " + deviceId + " of type " + deviceType + " cannot be found!"); From cf3b42af198085b33054d5155465351046cb78fe Mon Sep 17 00:00:00 2001 From: Rasika Perera Date: Tue, 23 Jan 2018 18:42:05 +0530 Subject: [PATCH 4/4] Updating devicemgt version --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 17a8f5ea7..79d9afae6 100644 --- a/pom.xml +++ b/pom.xml @@ -1215,7 +1215,7 @@ 1.1.1 - 3.0.207 + 3.0.208 [3.0.0, 4.0.0)