<aid="exportGeoJson"download="geoJson.json"href="#"onclick="exportToGeoJSON(this,JSON.stringify(map._layers[$(this).attr('leaflet_id')].toGeoJSON(),null, '\t'))"class="btn btn-default btn-xs"data-toggle="tooltip"data-placement="left"title="Export selected area as a geoJson file">Export</a>
</div>
<divclass="btn-group">
<aid="hideViewFence"class="btn btn-default btn-xs"data-toggle="tooltip"data-placement="left"title="Hide this fence"onclick="map.removeLayer(map._layers[$(this).attr('leaflet_id')])">Hide</a>
<aid="exportGeoJson"download="geoJson.json"href="#"onclick="exportToGeoJSON(this,JSON.stringify(map._layers[$(this).attr('leaflet_id')].toGeoJSON(),null, '\t'))"class="btn btn-default btn-xs"data-toggle="tooltip"data-placement="left"title="Export selected area as a geoJson file">Export</a>
</div>
<divclass="btn-group">
<aid="hideViewFence"class="btn btn-default btn-xs"data-toggle="tooltip"data-placement="left"title="Hide this fence"onclick="map.removeLayer(map._layers[$(this).attr('leaflet_id')])">Hide</a>
// TODO: change the name of this jaggery file even thoe it says 'store_alerts' it is actually removing the alerts from the data store as well o.O wired
// TODO: change the name of this jaggery file even thoe it says 'store_alerts' it is actually removing the alerts from the data store as well o.O wired
var dataStore = require('../include/commons.jag').dataStore;
var log = new Log();
var log = new Log();
var deviceIdSeperator = "---";
var constants = require("../controllers/constants.jag");
function store(parameterKeyName, resourceContents, executionPlan, optional, deviceId) {
@ -595,7 +595,7 @@ function createExecutionPlanName(queryName, id, deviceId) {
return'Geo-ExecutionPlan-Within'+(queryName?'_'+queryName:'')+"---"+(deviceId?'_'+deviceId:'')+'_alert';// TODO: value of the `queryName` can't be empty, because it will cause name conflicts in CEP, have to do validation(check not empty String)
return'Geo-ExecutionPlan-Within'+(queryName?'_'+queryName:'')+"---"+(deviceId?'_'+deviceId:'')+'_alert';// TODO: value of the `queryName` can't be empty, because it will cause name conflicts in CEP, have to do validation(check not empty String)
}
}
elseif(id=="Stationery"){
elseif(id=="Stationery"){
return'Geo-ExecutionPlan-Stationery'+(queryName?'_'+queryName:'')+'_alert';// TODO: value of the `queryName` can't be empty, because it will cause name conflicts in CEP, have to do validation(check not empty String)
return'Geo-ExecutionPlan-Stationery'+(queryName?'_'+queryName:'')+"---"+(deviceId?'_'+deviceId:'')+'_alert';// TODO: value of the `queryName` can't be empty, because it will cause name conflicts in CEP, have to do validation(check not empty String)
}
}
elseif(id=="Traffic"){
elseif(id=="Traffic"){
return'Geo-ExecutionPlan-Traffic'+(queryName?'_'+queryName:'')+'_alert';// TODO: value of the `queryName` can't be empty, because it will cause name conflicts in CEP, have to do validation(check not empty String)
return'Geo-ExecutionPlan-Traffic'+(queryName?'_'+queryName:'')+'_alert';// TODO: value of the `queryName` can't be empty, because it will cause name conflicts in CEP, have to do validation(check not empty String)