From 9bcaea05fd8f4ba2a18773af54256e32435a6296 Mon Sep 17 00:00:00 2001 From: GPrathap Date: Mon, 5 Dec 2016 09:51:41 +0530 Subject: [PATCH 1/5] updated carbon messaging version --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index da02aee28c..7d938215f1 100644 --- a/pom.xml +++ b/pom.xml @@ -1346,7 +1346,7 @@ [0.0.0,1.0.0) - 3.1.11 + 3.1.3 9.3.1 From 752b2e8dbf8ded34094aefc87bdac3803af2fa3b Mon Sep 17 00:00:00 2001 From: GPrathap Date: Mon, 5 Dec 2016 09:57:10 +0530 Subject: [PATCH 2/5] added expiration time of application access token --- .../mgt/iot/arduino/service/impl/ArduinoServiceImpl.java | 3 ++- .../iot/arduino/service/impl/constants/ArduinoConstants.java | 2 ++ .../iot/raspberrypi/service/impl/RaspberryPiServiceImpl.java | 3 ++- .../service/impl/constants/RaspberrypiConstants.java | 2 ++ .../service/impl/VirtualFireAlarmServiceImpl.java | 3 ++- .../plugin/constants/VirtualFireAlarmConstants.java | 2 ++ 6 files changed, 12 insertions(+), 3 deletions(-) diff --git a/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.api/src/main/java/org/wso2/carbon/device/mgt/iot/arduino/service/impl/ArduinoServiceImpl.java b/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.api/src/main/java/org/wso2/carbon/device/mgt/iot/arduino/service/impl/ArduinoServiceImpl.java index fc4abd8582..7b903a5a64 100644 --- a/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.api/src/main/java/org/wso2/carbon/device/mgt/iot/arduino/service/impl/ArduinoServiceImpl.java +++ b/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.api/src/main/java/org/wso2/carbon/device/mgt/iot/arduino/service/impl/ArduinoServiceImpl.java @@ -226,7 +226,8 @@ public class ArduinoServiceImpl implements ArduinoService { APIManagementProviderService apiManagementProviderService = APIUtil.getAPIManagementProviderService(); String[] tags = {ArduinoConstants.DEVICE_TYPE}; apiApplicationKey = apiManagementProviderService.generateAndRetrieveApplicationKeys( - ArduinoConstants.DEVICE_TYPE, tags, KEY_TYPE, applicationUsername, true); + ArduinoConstants.DEVICE_TYPE, tags, KEY_TYPE, applicationUsername, true, + ArduinoConstants.APIM_APPLICATION_TOKEN_VALIDITY_PERIOD); } JWTClient jwtClient = APIUtil.getJWTClientManagerService().getJWTClient(); String scopes = " device_" + deviceId; diff --git a/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.api/src/main/java/org/wso2/carbon/device/mgt/iot/arduino/service/impl/constants/ArduinoConstants.java b/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.api/src/main/java/org/wso2/carbon/device/mgt/iot/arduino/service/impl/constants/ArduinoConstants.java index 8a438574e8..ebf84d9ea9 100644 --- a/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.api/src/main/java/org/wso2/carbon/device/mgt/iot/arduino/service/impl/constants/ArduinoConstants.java +++ b/components/device-types/arduino-plugin/org.wso2.carbon.device.mgt.iot.arduino.api/src/main/java/org/wso2/carbon/device/mgt/iot/arduino/service/impl/constants/ArduinoConstants.java @@ -25,4 +25,6 @@ public class ArduinoConstants { //sensor events summerized table name public static final String TEMPERATURE_EVENT_TABLE = "DEVICE_TEMPERATURE_SUMMARY"; + public static final String APIM_APPLICATION_TOKEN_VALIDITY_PERIOD = "3600"; + } diff --git a/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.api/src/main/java/org/wso2/carbon/device/mgt/iot/raspberrypi/service/impl/RaspberryPiServiceImpl.java b/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.api/src/main/java/org/wso2/carbon/device/mgt/iot/raspberrypi/service/impl/RaspberryPiServiceImpl.java index ed81d815ab..c0dec99731 100644 --- a/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.api/src/main/java/org/wso2/carbon/device/mgt/iot/raspberrypi/service/impl/RaspberryPiServiceImpl.java +++ b/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.api/src/main/java/org/wso2/carbon/device/mgt/iot/raspberrypi/service/impl/RaspberryPiServiceImpl.java @@ -210,7 +210,8 @@ public class RaspberryPiServiceImpl implements RaspberryPiService { APIManagementProviderService apiManagementProviderService = APIUtil.getAPIManagementProviderService(); String[] tags = {RaspberrypiConstants.DEVICE_TYPE}; apiApplicationKey = apiManagementProviderService.generateAndRetrieveApplicationKeys( - RaspberrypiConstants.DEVICE_TYPE, tags, KEY_TYPE, applicationUsername, true); + RaspberrypiConstants.DEVICE_TYPE, tags, KEY_TYPE, applicationUsername, true, + RaspberrypiConstants.APIM_APPLICATION_TOKEN_VALIDITY_PERIOD); } JWTClient jwtClient = APIUtil.getJWTClientManagerService().getJWTClient(); String scopes = " device_" + deviceId; diff --git a/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.api/src/main/java/org/wso2/carbon/device/mgt/iot/raspberrypi/service/impl/constants/RaspberrypiConstants.java b/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.api/src/main/java/org/wso2/carbon/device/mgt/iot/raspberrypi/service/impl/constants/RaspberrypiConstants.java index f77aabf808..168cb7d6d3 100644 --- a/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.api/src/main/java/org/wso2/carbon/device/mgt/iot/raspberrypi/service/impl/constants/RaspberrypiConstants.java +++ b/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.api/src/main/java/org/wso2/carbon/device/mgt/iot/raspberrypi/service/impl/constants/RaspberrypiConstants.java @@ -31,4 +31,6 @@ public class RaspberrypiConstants { //mqtt tranport related constants public static final String MQTT_ADAPTER_TOPIC_PROPERTY_NAME = "mqtt.adapter.topic"; + public static final String APIM_APPLICATION_TOKEN_VALIDITY_PERIOD = "3600"; + } diff --git a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmServiceImpl.java b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmServiceImpl.java index 7e63fbf21c..c00dd6ab79 100644 --- a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmServiceImpl.java +++ b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.api/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/service/impl/VirtualFireAlarmServiceImpl.java @@ -309,7 +309,8 @@ public class VirtualFireAlarmServiceImpl implements VirtualFireAlarmService { APIManagementProviderService apiManagementProviderService = APIUtil.getAPIManagementProviderService(); String[] tags = {VirtualFireAlarmConstants.DEVICE_TYPE}; apiApplicationKey = apiManagementProviderService.generateAndRetrieveApplicationKeys( - VirtualFireAlarmConstants.DEVICE_TYPE, tags, KEY_TYPE, applicationUsername, true); + VirtualFireAlarmConstants.DEVICE_TYPE, tags, KEY_TYPE, applicationUsername, true, + VirtualFireAlarmConstants.APIM_APPLICATION_TOKEN_VALIDITY_PERIOD); } JWTClient jwtClient = APIUtil.getJWTClientManagerService().getJWTClient(); String scopes = " device_" + deviceId; diff --git a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.plugin/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/plugin/constants/VirtualFireAlarmConstants.java b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.plugin/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/plugin/constants/VirtualFireAlarmConstants.java index 0d163c9fd2..5815fa1c7c 100644 --- a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.plugin/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/plugin/constants/VirtualFireAlarmConstants.java +++ b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.plugin/src/main/java/org/wso2/carbon/device/mgt/iot/virtualfirealarm/plugin/constants/VirtualFireAlarmConstants.java @@ -83,4 +83,6 @@ public class VirtualFireAlarmConstants { public static final String SERVER_NAME = "serverName"; public static final String MQTT_ADAPTER_TOPIC_PROPERTY_NAME = "mqtt.adapter.topic"; + + public static final String APIM_APPLICATION_TOKEN_VALIDITY_PERIOD = "3600"; } From b55c64d55115202b2caceb4e2d99b9ee6b86f375 Mon Sep 17 00:00:00 2001 From: Imesh Chandrasiri Date: Mon, 5 Dec 2016 11:49:40 +0530 Subject: [PATCH 3/5] Layout changes for device enrollment views --- .../public/css/styles.css | 12 ++++------ .../type-view.hbs | 23 ++++++++++--------- .../type-view.hbs | 4 ++-- .../type-view.hbs | 4 ++-- .../type-view.hbs | 4 ++-- 5 files changed, 23 insertions(+), 24 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.type-view/public/css/styles.css 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.type-view/public/css/styles.css index 0c138185a5..cdd2ea4151 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.type-view/public/css/styles.css +++ 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.type-view/public/css/styles.css @@ -56,13 +56,11 @@ hr { background-color: #f6f4f4; } -.doc-link { - background: #11375B; - padding: 20px; - color: white; - margin-top: 0; +.doc-link{ + background: none; + color: #000; + padding: 10px 0px; } - .doc-link a { - color: white; + color: #006eff; } \ No newline at end of file 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.type-view/type-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.type-view/type-view.hbs index 64d5287227..955e07b546 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.type-view/type-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.type-view/type-view.hbs @@ -20,17 +20,15 @@
-
+
- +
-
+

What it Does


Connect an Android device to WSO2 IoT Server and visualize sensor @@ -41,24 +39,27 @@

You should have an Android Device to get started.

  • - STEP 01 + STEP 01 Go ahead and click [Enroll Device].
  • -
  • - STEP 02 +
  • + STEP 02 You can either scan the QR code or directly download Android agent.
  • -
  • - STEP 03 +
  • + STEP 03 Install Android agent into your Android Device.
  • -
  • STEP 04 +
  • STEP 04 Proceed to [Prepare] section.

Enroll Device

+
-
+
@@ -28,7 +28,7 @@
-
+

What it Does


Connect Arduino UNO board to WSO2 IoT Server and visualize sensor diff --git a/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.type-view/type-view.hbs b/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.type-view/type-view.hbs index 4c9f690885..e900fbd1ac 100644 --- a/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.type-view/type-view.hbs +++ b/components/device-types/raspberrypi-plugin/org.wso2.carbon.device.mgt.iot.raspberrypi.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.raspberrypi.type-view/type-view.hbs @@ -20,12 +20,12 @@


-
+
-
+

What it Does


Connect a RaspberryPi to WSO2 IoT Server and manage it.

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.type-view/type-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.type-view/type-view.hbs index 3b1496c735..fa6eaefca6 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.type-view/type-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.type-view/type-view.hbs @@ -5,12 +5,12 @@

Android Mobile


-
+
-
+

What it Does


From 446e2427e075e8d03bef93e5b365ba0b3b8aa73e Mon Sep 17 00:00:00 2001 From: Imesh Chandrasiri Date: Mon, 5 Dec 2016 12:15:29 +0530 Subject: [PATCH 4/5] Layout changes for device enrollment views commit 2 --- .../public/css/styles.css | 12 ++++------ .../type-view.hbs | 23 ++++++++----------- 2 files changed, 15 insertions(+), 20 deletions(-) diff --git a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.type-view/public/css/styles.css b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.type-view/public/css/styles.css index 47250fc86a..84a4894b7a 100644 --- a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.type-view/public/css/styles.css +++ b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.type-view/public/css/styles.css @@ -56,13 +56,11 @@ hr { background-color: #f6f4f4; } -.doc-link { - background: #11375B; - padding: 20px; - color: white; - margin-top: 0; +.doc-link{ + background: none; + color: #000; + padding: 10px 0px; } - .doc-link a { - color: white; + color: #006eff; } diff --git a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.type-view/type-view.hbs b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.type-view/type-view.hbs index 1b026619ea..c2ad5fe225 100644 --- a/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.type-view/type-view.hbs +++ b/components/device-types/virtual-fire-alarm-plugin/org.wso2.carbon.device.mgt.iot.virtualfirealarm.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.type-view/type-view.hbs @@ -19,15 +19,10 @@

Virtual Firealarm


-
+
-
- -
-
+

What it Does


A Virtual Device that mimics the functionality of a real Firealarm. @@ -40,15 +35,15 @@


  • - STEP 01 + STEP 01 Go ahead and [Download] the Device.
  • -
  • - STEP 02 +
  • + STEP 02 Proceed to [Prepare] section.
  • -
  • - STEP 03 +
  • + STEP 03 Read [Try Out] section to further experiment with the device.
@@ -59,7 +54,9 @@ Download Agent - +