diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/resources/alerts/Geo-ExecutionPlan-Exit_alert.siddhiql b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/resources/alerts/Geo-ExecutionPlan-Exit_alert.siddhiql index ac6d350cf6..f4e47bb2fa 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/resources/alerts/Geo-ExecutionPlan-Exit_alert.siddhiql +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/resources/alerts/Geo-ExecutionPlan-Exit_alert.siddhiql @@ -12,12 +12,9 @@ define stream dataIn (id string, latitude double, longitude double, timeStamp lo @Export('org.wso2.geo.ProcessedSpatialEvents:1.0.0') define stream dataOut (id string, latitude double, longitude double, timeStamp long, type string ,speed float, heading float, eventId string, state string, information string); -from dataIn[geo:within(longitude,latitude,"$geoFenceGeoJSON")==false and id == "$deviceId"]#geodashboard:subscribe() +from dataIn[geo:within(longitude,latitude,"$geoFenceGeoJSON")==false and id == "$deviceId"] select id , latitude, longitude,timeStamp, type, speed, heading ,eventId , "ALERTED" as state, str:concat(str:concat(str:concat(type," device "),id), " is outside $areaName area!!!") as information insert into dataOut; from dataIn[geo:within(longitude,latitude,"$geoFenceGeoJSON")!=false and id == "$deviceId"] select id , latitude, longitude,timeStamp, type, speed, heading ,eventId , "NORMAL" as state, "" as information insert into dataOut; -from dataIn[id != "$deviceId"] -select id , latitude, longitude,timeStamp, type, speed, heading ,eventId , "NORMAL" as state, "" as information -insert into dataOut; diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/resources/alerts/Geo-ExecutionPlan-Exit_alert_for_GeoClusters.siddhiql b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/resources/alerts/Geo-ExecutionPlan-Exit_alert_for_GeoClusters.siddhiql index 68fe23e0b8..71d5e10114 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/resources/alerts/Geo-ExecutionPlan-Exit_alert_for_GeoClusters.siddhiql +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/resources/alerts/Geo-ExecutionPlan-Exit_alert_for_GeoClusters.siddhiql @@ -12,7 +12,7 @@ define stream dataIn (id string, latitude double, longitude double, timeStamp lo @Export('org.wso2.geo.ProcessedSpatialEvents:1.0.0') define stream dataOut (id string, latitude double, longitude double, timeStamp long, type string ,speed float, heading float, eventId string, state string, information string); -from dataIn[geo:within(longitude,latitude,"$geoFenceGeoJSON")==false]#geodashboard:subscribe() +from dataIn[geo:within(longitude,latitude,"$geoFenceGeoJSON")==false] select id , latitude, longitude,timeStamp, type, speed, heading ,eventId , "ALERTED" as state, str:concat(str:concat(str:concat(type," device "),id), " is outside $areaName area!!!") as information insert into dataOut; from dataIn[geo:within(longitude,latitude,"$geoFenceGeoJSON")!=false] diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/resources/alerts/Geo-ExecutionPlan-Proximity_alert.siddhiql b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/resources/alerts/Geo-ExecutionPlan-Proximity_alert.siddhiql index fb64720391..58ac836c47 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/resources/alerts/Geo-ExecutionPlan-Proximity_alert.siddhiql +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/resources/alerts/Geo-ExecutionPlan-Proximity_alert.siddhiql @@ -18,7 +18,7 @@ define table ProximityTable(id string, timeStamp long); @IndexBy('id') define table AlertsTable(id string , proximityWith string, eventId string); -from dataIn#geodashboard:subscribe() +from dataIn select id, latitude, longitude, timeStamp, type, speed, heading, eventId insert into initialStream; diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/resources/alerts/Geo-ExecutionPlan-Proximity_alert_for_GeoClusters.siddhiql b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/resources/alerts/Geo-ExecutionPlan-Proximity_alert_for_GeoClusters.siddhiql index fb64720391..58ac836c47 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/resources/alerts/Geo-ExecutionPlan-Proximity_alert_for_GeoClusters.siddhiql +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/resources/alerts/Geo-ExecutionPlan-Proximity_alert_for_GeoClusters.siddhiql @@ -18,7 +18,7 @@ define table ProximityTable(id string, timeStamp long); @IndexBy('id') define table AlertsTable(id string , proximityWith string, eventId string); -from dataIn#geodashboard:subscribe() +from dataIn select id, latitude, longitude, timeStamp, type, speed, heading, eventId insert into initialStream; diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/resources/alerts/Geo-ExecutionPlan-Speed_alert.siddhiql b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/resources/alerts/Geo-ExecutionPlan-Speed_alert.siddhiql index 39c4a0b280..6cc4581394 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/resources/alerts/Geo-ExecutionPlan-Speed_alert.siddhiql +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/resources/alerts/Geo-ExecutionPlan-Speed_alert.siddhiql @@ -12,12 +12,9 @@ define stream dataIn (id string, latitude double, longitude double, timeStamp lo @Export('org.wso2.geo.ProcessedSpatialEvents:1.0.0') define stream dataOut (id string, latitude double, longitude double, timeStamp long, type string, speed float, heading float, eventId string, state string, information string); -from dataIn[speed >= $speedAlertValue and id == "$deviceId"]#geodashboard:subscribe() +from dataIn[speed >= $speedAlertValue and id == "$deviceId"] select id , latitude, longitude,timeStamp, type ,speed, heading ,eventId , "ALERTED" as state, str:concat(str:concat(str:concat(str:concat("Movement of ",type), " device "), id), " is not normal!!") as information insert into dataOut; from dataIn[speed < $speedAlertValue and id == "$deviceId"] select id , latitude, longitude,timeStamp, type ,speed, heading ,eventId , "NORMAL" as state, str:concat(str:concat(str:concat(str:concat("Movement of ",type), " device "), id), " is normal") as information insert into dataOut; -from dataIn[id != "$deviceId"] -select id , latitude, longitude,timeStamp, type, speed, heading ,eventId , "NORMAL" as state, "" as information -insert into dataOut; diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/resources/alerts/Geo-ExecutionPlan-Speed_alert_for_GeoClusters.siddhiql b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/resources/alerts/Geo-ExecutionPlan-Speed_alert_for_GeoClusters.siddhiql index ba7a6d24d9..7ecd9948cd 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/resources/alerts/Geo-ExecutionPlan-Speed_alert_for_GeoClusters.siddhiql +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/resources/alerts/Geo-ExecutionPlan-Speed_alert_for_GeoClusters.siddhiql @@ -12,7 +12,7 @@ define stream dataIn (id string, latitude double, longitude double, timeStamp lo @Export('org.wso2.geo.ProcessedSpatialEvents:1.0.0') define stream dataOut (id string, latitude double, longitude double, timeStamp long, type string, speed float, heading float, eventId string, state string, information string); -from dataIn[speed >= $speedAlertValue]#geodashboard:subscribe() +from dataIn[speed >= $speedAlertValue] select id , latitude, longitude,timeStamp, type ,speed, heading ,eventId , "ALERTED" as state, str:concat(str:concat(str:concat(str:concat("Movement of ",type), " device "), id), " is not normal!!") as information insert into dataOut; from dataIn[speed < $speedAlertValue] diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/resources/alerts/Geo-ExecutionPlan-Stationery_alert.siddhiql b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/resources/alerts/Geo-ExecutionPlan-Stationery_alert.siddhiql index 6f0e8aac75..f29f50be68 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/resources/alerts/Geo-ExecutionPlan-Stationery_alert.siddhiql +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/resources/alerts/Geo-ExecutionPlan-Stationery_alert.siddhiql @@ -19,7 +19,7 @@ define table StationeryTable(id string, timeStamp long); @IndexBy('id') define table AlertsTable(id string, stationary bool); -from dataIn#geodashboard:subscribe() +from dataIn select id, latitude, longitude, timeStamp, type, speed, heading, eventId,geo:within(longitude,latitude,"$geoFenceGeoJSON") as isWithin insert into innerStreamOne; diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/resources/alerts/Geo-ExecutionPlan-Stationery_alert_for_GeoClusters.siddhiql b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/resources/alerts/Geo-ExecutionPlan-Stationery_alert_for_GeoClusters.siddhiql index 6f0e8aac75..f29f50be68 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/resources/alerts/Geo-ExecutionPlan-Stationery_alert_for_GeoClusters.siddhiql +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/resources/alerts/Geo-ExecutionPlan-Stationery_alert_for_GeoClusters.siddhiql @@ -19,7 +19,7 @@ define table StationeryTable(id string, timeStamp long); @IndexBy('id') define table AlertsTable(id string, stationary bool); -from dataIn#geodashboard:subscribe() +from dataIn select id, latitude, longitude, timeStamp, type, speed, heading, eventId,geo:within(longitude,latitude,"$geoFenceGeoJSON") as isWithin insert into innerStreamOne; diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/resources/alerts/Geo-ExecutionPlan-Within_alert.siddhiql b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/resources/alerts/Geo-ExecutionPlan-Within_alert.siddhiql index 38240e4937..f88e1a8d24 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/resources/alerts/Geo-ExecutionPlan-Within_alert.siddhiql +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/resources/alerts/Geo-ExecutionPlan-Within_alert.siddhiql @@ -12,12 +12,9 @@ define stream dataIn (id string, latitude double, longitude double, timeStamp lo @Export('org.wso2.geo.ProcessedSpatialEvents:1.0.0') define stream dataOut (id string, latitude double, longitude double, timeStamp long, type string ,speed float, heading float, eventId string, state string, information string); -from dataIn[geo:within(longitude,latitude,"$geoFenceGeoJSON")==true and id == "$deviceId"]#geodashboard:subscribe() +from dataIn[geo:within(longitude,latitude,"$geoFenceGeoJSON")==true and id == "$deviceId"] select id , latitude, longitude,timeStamp, type, speed, heading ,eventId , "ALERTED" as state, str:concat(str:concat(str:concat(type," device "), id), " is in $areaName restricted area!!!") as information insert into dataOut; from dataIn[geo:within(longitude,latitude,"$geoFenceGeoJSON")!=true and id == "$deviceId"] select id , latitude, longitude,timeStamp, type, speed, heading ,eventId , "NORMAL" as state, "" as information insert into dataOut; -from dataIn[id != "$deviceId"] -select id , latitude, longitude,timeStamp, type, speed, heading ,eventId , "NORMAL" as state, "" as information -insert into dataOut; diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/resources/alerts/Geo-ExecutionPlan-Within_alert_for_GeoClusters.siddhiql b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/resources/alerts/Geo-ExecutionPlan-Within_alert_for_GeoClusters.siddhiql index 67fa2df594..9c6862662f 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/resources/alerts/Geo-ExecutionPlan-Within_alert_for_GeoClusters.siddhiql +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/main/resources/alerts/Geo-ExecutionPlan-Within_alert_for_GeoClusters.siddhiql @@ -12,7 +12,7 @@ define stream dataIn (id string, latitude double, longitude double, timeStamp lo @Export('org.wso2.geo.ProcessedSpatialEvents:1.0.0') define stream dataOut (id string, latitude double, longitude double, timeStamp long, type string ,speed float, heading float, eventId string, state string, information string); -from dataIn[geo:within(longitude,latitude,"$geoFenceGeoJSON")==true]#geodashboard:subscribe() +from dataIn[geo:within(longitude,latitude,"$geoFenceGeoJSON")==true] select id , latitude, longitude,timeStamp, type, speed, heading ,eventId , "ALERTED" as state, str:concat(str:concat(str:concat(type," device "), id), " is in $areaName restricted area!!!") as information insert into dataOut; from dataIn[geo:within(longitude,latitude,"$geoFenceGeoJSON")!=true] diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-dashboard/geo-dashboard.hbs b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-dashboard/geo-dashboard.hbs index fdb006aeb5..e2a5018d80 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-dashboard/geo-dashboard.hbs +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-dashboard/geo-dashboard.hbs @@ -521,10 +521,10 @@
{{#if geoServicesEnabled}}