diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_android_battery_execution_plan/artifact.xml b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_android_battery_execution_plan/artifact.xml index 522f0bb2f..70ab416ec 100644 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_android_battery_execution_plan/artifact.xml +++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_android_battery_execution_plan/artifact.xml @@ -17,7 +17,8 @@ ~ under the License. --> - + Android-Battery-ExecutionPlan.siddhiql diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_battery_percentage_chart_gadget/Android_Battery_Percentage_Chart/js/provider-libs/ws-client.js b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_battery_percentage_chart_gadget/Android_Battery_Percentage_Chart/js/provider-libs/ws-client.js index c62651037..ab7263155 100644 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_battery_percentage_chart_gadget/Android_Battery_Percentage_Chart/js/provider-libs/ws-client.js +++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_battery_percentage_chart_gadget/Android_Battery_Percentage_Chart/js/provider-libs/ws-client.js @@ -158,10 +158,9 @@ var webSocketOnOpen = function () { var params = getAllQueryParamsFromURL(); var deviceId; var owner; - if (params != null) { + if (params) { owner = params["owner"]; deviceId = params["deviceId"]; - } var filterPropNames = ["meta_owner", "meta_deviceId"]; var filterPropVals = [owner, deviceId]; diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_battery_script/AndroidBatteryScript.xml b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_battery_script/AndroidBatteryScript.xml new file mode 100644 index 000000000..8eadaa5fc --- /dev/null +++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_battery_script/AndroidBatteryScript.xml @@ -0,0 +1,22 @@ + + + true + AndriodCallScript + + 0 0/5 * * * ? + diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_battery_level_chart_gadget/artifact.xml b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_battery_script/artifact.xml similarity index 81% rename from components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_battery_level_chart_gadget/artifact.xml rename to components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_battery_script/artifact.xml index 4128fdf2c..ef0064603 100644 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_battery_level_chart_gadget/artifact.xml +++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_battery_script/artifact.xml @@ -17,7 +17,7 @@ ~ under the License. --> - - Android_Battery_Level_Chart + + AndroidBatteryScript.xml diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_battery_stats_event_sink/artifact.xml b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_battery_stats_event_sink/artifact.xml new file mode 100644 index 000000000..41994b061 --- /dev/null +++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_battery_stats_event_sink/artifact.xml @@ -0,0 +1,24 @@ + + + + + org_wso2_iot_android_battery_stats.xml + + diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_battery_stats_event_sink/org_wso2_iot_android_battery_stats.xml b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_battery_stats_event_sink/org_wso2_iot_android_battery_stats.xml new file mode 100755 index 000000000..143d5d53d --- /dev/null +++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_battery_stats_event_sink/org_wso2_iot_android_battery_stats.xml @@ -0,0 +1,106 @@ + + + + + meta_owner + false + false + false + false + STRING + + + meta_deviceId + false + false + false + false + STRING + + + meta_timestamp + false + false + false + false + LONG + + + level + false + false + false + false + INTEGER + + + state + false + false + false + false + STRING + + + status + false + false + false + false + LONG + + + temperature + false + false + false + false + INTEGER + + + year + false + false + false + false + INTEGER + + + month + false + false + false + false + INTEGER + + + day + false + false + false + false + INTEGER + + + hour + false + false + false + false + INTEGER + + + minute + false + false + false + false + INTEGER + + + + org.wso2.iot.android.battery.stats:1.0.0 + + false + PROCESSED_DATA_STORE + \ No newline at end of file diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_battery_stats_streams/artifact.xml b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_battery_stats_streams/artifact.xml new file mode 100644 index 000000000..56cda93fd --- /dev/null +++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_battery_stats_streams/artifact.xml @@ -0,0 +1,23 @@ + + + + + org.wso2.iot.android.battery.stats_1.0.0.json + + diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_battery_stats_streams/org.wso2.iot.android.battery.stats_1.0.0.json b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_battery_stats_streams/org.wso2.iot.android.battery.stats_1.0.0.json new file mode 100755 index 000000000..7879b1317 --- /dev/null +++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_battery_stats_streams/org.wso2.iot.android.battery.stats_1.0.0.json @@ -0,0 +1,58 @@ +{ + "name": "org.wso2.iot.android.battery.stats", + "version": "1.0.0", + "nickName": "", + "description": "", + "metaData": [ + { + "name": "owner", + "type": "STRING" + }, + { + "name": "deviceId", + "type": "STRING" + }, + { + "name": "timestamp", + "type": "LONG" + } + ], + "payloadData": [ + { + "name": "level", + "type": "INT" + }, + { + "name": "state", + "type": "STRING" + }, + { + "name": "status", + "type": "STRING" + }, + { + "name": "temperature", + "type": "INT" + }, + { + "name": "year", + "type": "INT" + }, + { + "name": "month", + "type": "INT" + }, + { + "name": "day", + "type": "INT" + }, + { + "name": "hour", + "type": "INT" + }, + { + "name": "minute", + "type": "INT" + } + ] +} \ No newline at end of file diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_battery_stats_ui_event_publisher/artifact.xml b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_battery_stats_ui_event_publisher/artifact.xml new file mode 100644 index 000000000..d95e208cf --- /dev/null +++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_battery_stats_ui_event_publisher/artifact.xml @@ -0,0 +1,24 @@ + + + + + org.wso2.iot.android.battery.stats.ui.publisher.xml + + diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_battery_stats_ui_event_publisher/org.wso2.iot.android.battery.stats.ui.publisher.xml b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_battery_stats_ui_event_publisher/org.wso2.iot.android.battery.stats.ui.publisher.xml new file mode 100644 index 000000000..f75b4f49f --- /dev/null +++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_battery_stats_ui_event_publisher/org.wso2.iot.android.battery.stats.ui.publisher.xml @@ -0,0 +1,9 @@ + + + + + + + + diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_audio_gadget/Android_Realtime_Audio/js/provider-libs/ws-client.js b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_audio_gadget/Android_Realtime_Audio/js/provider-libs/ws-client.js index c62651037..ab7263155 100644 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_audio_gadget/Android_Realtime_Audio/js/provider-libs/ws-client.js +++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_audio_gadget/Android_Realtime_Audio/js/provider-libs/ws-client.js @@ -158,10 +158,9 @@ var webSocketOnOpen = function () { var params = getAllQueryParamsFromURL(); var deviceId; var owner; - if (params != null) { + if (params) { owner = params["owner"]; deviceId = params["deviceId"]; - } var filterPropNames = ["meta_owner", "meta_deviceId"]; var filterPropVals = [owner, deviceId]; diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_battery_gadget/Android_Realtime_Battery/js/provider-libs/ws-client.js b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_battery_gadget/Android_Realtime_Battery/js/provider-libs/ws-client.js index c62651037..ab7263155 100644 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_battery_gadget/Android_Realtime_Battery/js/provider-libs/ws-client.js +++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_battery_gadget/Android_Realtime_Battery/js/provider-libs/ws-client.js @@ -158,10 +158,9 @@ var webSocketOnOpen = function () { var params = getAllQueryParamsFromURL(); var deviceId; var owner; - if (params != null) { + if (params) { owner = params["owner"]; deviceId = params["deviceId"]; - } var filterPropNames = ["meta_owner", "meta_deviceId"]; var filterPropVals = [owner, deviceId]; diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_call_gadget/Android_Realtime_Call/js/provider-libs/ws-client.js b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_call_gadget/Android_Realtime_Call/js/provider-libs/ws-client.js index b24b3d350..85f23c101 100644 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_call_gadget/Android_Realtime_Call/js/provider-libs/ws-client.js +++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_call_gadget/Android_Realtime_Call/js/provider-libs/ws-client.js @@ -158,10 +158,9 @@ var webSocketOnOpen = function () { var params = getAllQueryParamsFromURL(); var deviceId; var owner; - if (params != null) { + if (params) { owner = params["owner"]; deviceId = params["deviceId"]; - } var filterPropNames = ["meta_owner", "meta_deviceId"]; var filterPropVals = [owner, deviceId]; diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_data_gadget/Android_Realtime_Data/js/provider-libs/ws-client.js b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_data_gadget/Android_Realtime_Data/js/provider-libs/ws-client.js index c62651037..ab7263155 100644 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_data_gadget/Android_Realtime_Data/js/provider-libs/ws-client.js +++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_data_gadget/Android_Realtime_Data/js/provider-libs/ws-client.js @@ -158,10 +158,9 @@ var webSocketOnOpen = function () { var params = getAllQueryParamsFromURL(); var deviceId; var owner; - if (params != null) { + if (params) { owner = params["owner"]; deviceId = params["deviceId"]; - } var filterPropNames = ["meta_owner", "meta_deviceId"]; var filterPropVals = [owner, deviceId]; diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_screen_gadget/Android_Realtime_Screen/js/provider-libs/ws-client.js b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_screen_gadget/Android_Realtime_Screen/js/provider-libs/ws-client.js index c62651037..ab7263155 100644 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_screen_gadget/Android_Realtime_Screen/js/provider-libs/ws-client.js +++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_screen_gadget/Android_Realtime_Screen/js/provider-libs/ws-client.js @@ -158,10 +158,9 @@ var webSocketOnOpen = function () { var params = getAllQueryParamsFromURL(); var deviceId; var owner; - if (params != null) { + if (params) { owner = params["owner"]; deviceId = params["deviceId"]; - } var filterPropNames = ["meta_owner", "meta_deviceId"]; var filterPropVals = [owner, deviceId]; diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_sms_gadget/Android_Realtime_SMS/js/provider-libs/ws-client.js b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_sms_gadget/Android_Realtime_SMS/js/provider-libs/ws-client.js index c4b8a7dea..357c2995b 100644 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_sms_gadget/Android_Realtime_SMS/js/provider-libs/ws-client.js +++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_realtime_sms_gadget/Android_Realtime_SMS/js/provider-libs/ws-client.js @@ -158,10 +158,9 @@ var webSocketOnOpen = function () { var params = getAllQueryParamsFromURL(); var deviceId; var owner; - if (params != null) { + if (params) { owner = params["owner"]; deviceId = params["deviceId"]; - } var filterPropNames = ["meta_owner", "meta_deviceId"]; var filterPropVals = [owner, deviceId]; diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_sense_dashboard/android-iot.json b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_sense_dashboard/android-iot.json index ec1c155ba..6be9afa05 100644 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_sense_dashboard/android-iot.json +++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/android_sense_dashboard/android-iot.json @@ -586,9 +586,9 @@ { "content": { "data": { - "url": "fs://gadget/Android_Battery_Level_Chart/gadget.xml" + "url": "fs://gadget/Android_Battery_History_Chart/gadget.xml" }, - "id": "Android_Battery_Level_Chart", + "id": "Android_Battery_History_Chart", "locale_titles": { "en-US": "History" }, @@ -611,11 +611,11 @@ "title": "History", "titlePosition": "center" }, - "thumbnail": "fs://gadget/Android_Battery_Level_Chart/thumbnail.png", - "title": "Android Battery Level Chart", + "thumbnail": "fs://gadget/Android_Battery_History_Chart/thumbnail.png", + "title": "Android Battery Hisory Chart", "type": "gadget" }, - "id": "Android_Battery_Level_Chart-0" + "id": "Android_Battery_History_Chart-0" } ], "e": [ diff --git a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/artifacts.xml b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/artifacts.xml index 2b17dde13..688db7abc 100644 --- a/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/artifacts.xml +++ b/components/device-types/androidsense-plugin/org.wso2.carbon.device.mgt.iot.androidsense.analytics/src/main/resources/carbonapps/androidsense/artifacts.xml @@ -56,11 +56,20 @@ + + + + +