From 7045a94615494a618d52da117cb9a01b83c796c3 Mon Sep 17 00:00:00 2001 From: Megala Date: Sat, 3 Dec 2016 23:02:10 +0530 Subject: [PATCH] Changing the publishes and execution plans to work with android-sense --- .../GadgetGeoDashboard_1.0.0/geo-dashboard/js/websocket.js | 3 ++- ...utionPlan-EventsFusionGenerateNotifications-1.0.0.siddhiql | 4 ++-- .../Geo-Publisher-WebSocketLocal-FusedSpacialEvent-1.0.0.xml | 4 ++-- ...o-Publisher-WebSocketLocal-GeoAlertNotifications-1.0.0.xml | 2 +- .../org.wso2.geo.AlertsNotifications-1.0.0.json | 4 ++++ 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/components/analytics/iot-analytics/org.wso2.carbon.iot.geo.dashboard/src/main/resources/carbonapps/GadgetGeoDashboard_1.0.0/geo-dashboard/js/websocket.js b/components/analytics/iot-analytics/org.wso2.carbon.iot.geo.dashboard/src/main/resources/carbonapps/GadgetGeoDashboard_1.0.0/geo-dashboard/js/websocket.js index 4b413e1a1..87e500eee 100644 --- a/components/analytics/iot-analytics/org.wso2.carbon.iot.geo.dashboard/src/main/resources/carbonapps/GadgetGeoDashboard_1.0.0/geo-dashboard/js/websocket.js +++ b/components/analytics/iot-analytics/org.wso2.carbon.iot.geo.dashboard/src/main/resources/carbonapps/GadgetGeoDashboard_1.0.0/geo-dashboard/js/websocket.js @@ -706,7 +706,8 @@ intializeWebsocketUrls(); SpatialObject.prototype.stateIcon = function () { - var iconUrl = "/portal/store/carbon.super/fs/gadget/geo-dashboard/img/markers/object-types/" + this.type.toLowerCase(); + //TODO : Need to add separate icons for each device type + var iconUrl = "/portal/store/carbon.super/fs/gadget/geo-dashboard/img/markers/object-types/default_icons"; if (0 < this.speed && (-360 <= this.heading && 360 >= this.heading)) { iconUrl = iconUrl + "/moving/" + this.state.toLowerCase(); } else { diff --git a/components/analytics/iot-analytics/org.wso2.carbon.iot.geo.dashboard/src/main/resources/carbonapps/Geo-ExecutionPlan-EventsFusionGenerateNotifications_1.0.0/Geo-ExecutionPlan-EventsFusionGenerateNotifications-1.0.0.siddhiql b/components/analytics/iot-analytics/org.wso2.carbon.iot.geo.dashboard/src/main/resources/carbonapps/Geo-ExecutionPlan-EventsFusionGenerateNotifications_1.0.0/Geo-ExecutionPlan-EventsFusionGenerateNotifications-1.0.0.siddhiql index 71a2ee953..7c232af0c 100644 --- a/components/analytics/iot-analytics/org.wso2.carbon.iot.geo.dashboard/src/main/resources/carbonapps/Geo-ExecutionPlan-EventsFusionGenerateNotifications_1.0.0/Geo-ExecutionPlan-EventsFusionGenerateNotifications-1.0.0.siddhiql +++ b/components/analytics/iot-analytics/org.wso2.carbon.iot.geo.dashboard/src/main/resources/carbonapps/Geo-ExecutionPlan-EventsFusionGenerateNotifications_1.0.0/Geo-ExecutionPlan-EventsFusionGenerateNotifications-1.0.0.siddhiql @@ -12,7 +12,7 @@ define stream dataIn (id string, latitude double, longitude double, timeStamp long, type string, speed float, heading float, eventId string, state string, information string ); @Export('org.wso2.geo.AlertsNotifications:1.0.0') -define stream alertsOut ( id string, state string, information string, timeStamp long, latitude double, longitude double ); +define stream alertsOut ( id string, state string, information string, timeStamp long, latitude double, longitude double, type string); @Export('org.wso2.geo.FusedSpatialEvent:1.0.0') define stream dataOut ( id string, latitude double, longitude double, timeStamp long, type string, speed float, heading float, state string, information string, notify bool ); @@ -25,5 +25,5 @@ select id, latitude, longitude, timeStamp, type, speed, heading, state , informa insert into dataOut; from dataOut[notify == true] -select id,state,information,timeStamp, latitude, longitude +select id, state, information,timeStamp, latitude, longitude, type insert into alertsOut; \ No newline at end of file diff --git a/components/analytics/iot-analytics/org.wso2.carbon.iot.geo.dashboard/src/main/resources/carbonapps/Geo-Publisher-WebSocketLocal-FusedSpacialEvent_1.0.0/Geo-Publisher-WebSocketLocal-FusedSpacialEvent-1.0.0.xml b/components/analytics/iot-analytics/org.wso2.carbon.iot.geo.dashboard/src/main/resources/carbonapps/Geo-Publisher-WebSocketLocal-FusedSpacialEvent_1.0.0/Geo-Publisher-WebSocketLocal-FusedSpacialEvent-1.0.0.xml index f7f8f50ee..561ce7c05 100644 --- a/components/analytics/iot-analytics/org.wso2.carbon.iot.geo.dashboard/src/main/resources/carbonapps/Geo-Publisher-WebSocketLocal-FusedSpacialEvent_1.0.0/Geo-Publisher-WebSocketLocal-FusedSpacialEvent-1.0.0.xml +++ b/components/analytics/iot-analytics/org.wso2.carbon.iot.geo.dashboard/src/main/resources/carbonapps/Geo-Publisher-WebSocketLocal-FusedSpacialEvent_1.0.0/Geo-Publisher-WebSocketLocal-FusedSpacialEvent-1.0.0.xml @@ -7,8 +7,8 @@ "messageType" : "Point", "type": "Feature", "id": {{id}}, - "deviceId": "rkxb293yw2t2", - "deviceType": "virtual_firealarm", + "deviceId": {{id}}, + "deviceType": {{type}}, "properties": { "speed": {{speed}}, "heading": {{heading}}, diff --git a/components/analytics/iot-analytics/org.wso2.carbon.iot.geo.dashboard/src/main/resources/carbonapps/Geo-Publisher-WebSocketLocal-GeoAlertNotifications_1.0.0/Geo-Publisher-WebSocketLocal-GeoAlertNotifications-1.0.0.xml b/components/analytics/iot-analytics/org.wso2.carbon.iot.geo.dashboard/src/main/resources/carbonapps/Geo-Publisher-WebSocketLocal-GeoAlertNotifications_1.0.0/Geo-Publisher-WebSocketLocal-GeoAlertNotifications-1.0.0.xml index 264069b11..2e76ba16a 100644 --- a/components/analytics/iot-analytics/org.wso2.carbon.iot.geo.dashboard/src/main/resources/carbonapps/Geo-Publisher-WebSocketLocal-GeoAlertNotifications_1.0.0/Geo-Publisher-WebSocketLocal-GeoAlertNotifications-1.0.0.xml +++ b/components/analytics/iot-analytics/org.wso2.carbon.iot.geo.dashboard/src/main/resources/carbonapps/Geo-Publisher-WebSocketLocal-GeoAlertNotifications_1.0.0/Geo-Publisher-WebSocketLocal-GeoAlertNotifications-1.0.0.xml @@ -8,7 +8,7 @@ "messageType" : "Alert", "type": "Feature", "id": {{id}}, - "deviceId": "rkxb293yw2t2", + "deviceId": {{id}}, "deviceType" : "virtual_firealarm", "state": {{state}}, "information": {{information}}, diff --git a/components/analytics/iot-analytics/org.wso2.carbon.iot.geo.dashboard/src/main/resources/carbonapps/org.wso2.geo.AlertsNotifications_1.0.0/org.wso2.geo.AlertsNotifications-1.0.0.json b/components/analytics/iot-analytics/org.wso2.carbon.iot.geo.dashboard/src/main/resources/carbonapps/org.wso2.geo.AlertsNotifications_1.0.0/org.wso2.geo.AlertsNotifications-1.0.0.json index 23853ed93..767f9d6d1 100644 --- a/components/analytics/iot-analytics/org.wso2.carbon.iot.geo.dashboard/src/main/resources/carbonapps/org.wso2.geo.AlertsNotifications_1.0.0/org.wso2.geo.AlertsNotifications-1.0.0.json +++ b/components/analytics/iot-analytics/org.wso2.carbon.iot.geo.dashboard/src/main/resources/carbonapps/org.wso2.geo.AlertsNotifications_1.0.0/org.wso2.geo.AlertsNotifications-1.0.0.json @@ -27,6 +27,10 @@ { "name": "longitude", "type": "DOUBLE" + }, + { + "name": "type", + "type": "STRING" } ] } \ No newline at end of file