<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
var dataStore = require('../include/commons.jag').dataStore;
var log = new Log();
var deviceIdSeperator = "---";
var constants = require("../controllers/constants.jag");
var getRegistry = function() {
var carbon = require("carbon");
var server = new carbon.server.Server();
return new carbon.registry.Registry(server, {
system: true
});
};
/**
* Get the registry path to save the alert
* @param {String} alert_type Type of the alert
* @param {String} id Id of the device
* @param {String} optional /optional identity
* @return {String} Registry Path to save teh alert
* */
var registryPath = function (alert_type, id, optional) {
if (alert_type && id ) {
if (alert_type === constants.EXECUTION_PLAN_TYPE_SPEED || alert_type === constants
@ -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)
}
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"){
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)