License year changes and comment changes

revert-70aa11f8
Arcane94 7 years ago
parent 8c303911b0
commit 0aff4193d3

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2018, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except

@ -1,52 +0,0 @@
<div class="modal-header">
<button class="close" type="button" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title">
<div class="col-lg-5 col-md-6 col-centered">
<h4>
Set 'Exit Fence' alerts
<br>
</h4>
</div>
</h4>
</div>
<div class="modal-body">
<div class="row">
<div class="col-lg-8 col-md-8 col-centered">
<div class="">
<table class="table table-hover" id="exit-alert">
<thead>
<tr>
<th>Fence Name</th>
<th>Query Name</th>
<th>Created On</th>
<th></th>
</tr>
</thead>
<tbody>
<div class="alert alert-info fence-not-exist" role="alert">
<strong>Oh snap!</strong> Can't find any geofence area, please draw a new area or try again.
</div>
</tbody>
</table>
</div>
<div class="pull-left">
<button style="background-color: #f4f4f4; float: left" type="button" class="btn btn-default"
onclick="viewAllFences('Exit')">View All
</button>
</div>
<div class="pull-right">
<button style="background-color: #f4f4f4;" type="button" class="btn btn-default"
onclick="openTools('Exit')">Draw area
</button>
<button style="background-color: #f4f4f4;" type="button" class="btn btn-default"
onclick="$('#editExitGeoJSON').modal('toggle')">Enter area
</button>
<br/>
<br/>
</div>
</div>
</div>
</div>
</div>
<script src="/devicemgt/public/cdmf.unit.geo-devices/js/geo_exit_fence.js"></script>

@ -1,49 +0,0 @@
<!--~ Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
~
~ WSO2 Inc. licenses this file to you under the Apache License,
~ Version 2.0 (the "License"); you may not use this file except
~ in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.-->
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
</head>
<body>
<div class="modal-header">
<button class="close" type="button" data-dismiss="modal" aria-hidden="true">&times;</button>
<div class="col-lg-5 col-md-6 col-centered">
<h4>
Setup global speed limit
<br>
</h4>
</div>
</div>
<div class="modal-body">
<div class="row">
<div class="col-lg-5 col-md-6 col-centered">
<div class="input-group input-group-sm">
<input autofocus="enable" id="speedAlertValue" type="number" min="0" class="form-control" placeholder="Speed alert value " autocomplete="off">
<span class="input-group-addon">km/h</span>
</div>
<br>
<button type="button" class="btn btn-default pull-right btn-sm" onclick="closeAll()">Cancel</button>
<button type="button" class="btn btn-info pull-right btn-sm" onclick="setSpeedAlert()" style="margin-right: 10px;">Set speed alert</button>
<br><br>
</div>
</div>
</div>
<script src="/devicemgt/public/cdmf.unit.geo-devices/js/geo_speed.js"></script>
</body>
</html>

@ -1,83 +0,0 @@
<!--~ Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
~
~ WSO2 Inc. licenses this file to you under the Apache License,
~ Version 2.0 (the "License"); you may not use this file except
~ in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.-->
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title></title>
<style>
.fa-trash-o:hover {
color: red;
}
</style>
<script>
</script>
</head>
<body>
<div class="modal-header">
<button class="close" type="button" data-dismiss="modal" aria-hidden="true">&times;</button>
<div class="col-lg-5 col-md-6 col-centered">
<h4>
Set 'Stationary' alerts
<br>
</h4>
</div>
</div>
<div class="modal-body">
<div class="row">
<div class="col-lg-8 col-md-8 col-centered">
<div class="">
<table class="table table-hover" id="stationary-alert-table">
<thead>
<tr>
<th>Stationary Name</th>
<th>Stationary Time</th>
<th>Fluctuation Radius</th>
<th>Query Name</th>
<th>Created On</th>
<th></th>
</tr>
</thead>
<tbody>
<div class="alert alert-info fence-not-exist" role="alert">
<strong>Oh snap!</strong> Can't find any geofence area, please draw a new area or try again.
</div>
</tbody>
</table>
</div>
<div class="pull-left">
<button style="background-color: #f4f4f4; float: left" type="button" class="btn btn-default"
onclick="viewAllFences('Stationery')">View All
</button>
</div>
<div class="pull-right">
<button style="background-color: #f4f4f4;" type="button" class="btn btn-default"
onclick="openTools('Stationery')">Draw area
</button>
<button style="background-color: #f4f4f4;" type="button" class="btn btn-default"
onclick="$('#editWithinGeoJSON').modal('toggle')">Enter area
</button>
</div>
<br/>
<br/>
</div>
</div>
<script src="/devicemgt/public/cdmf.unit.geo-devices/js/geo_stationary.js"></script>
</body>
</html>

@ -1,52 +0,0 @@
<div class="modal-header">
<button class="close" type="button" data-dismiss="modal" aria-hidden="true">&times;</button>
<h4 class="modal-title">
<div class="col-lg-5 col-md-6 col-centered">
<h4>
Set 'Within' alerts
<br>
</h4>
</div>
</h4>
</div>
<div class="modal-body">
<div class="row">
<div class="col-lg-8 col-md-8 col-centered">
<div class="">
<table class="table table-hover" id="within-alert">
<thead>
<tr>
<th>Fence Name</th>
<th>Query Name</th>
<th>Created On</th>
<th></th>
</tr>
</thead>
<tbody>
<div class="alert alert-info fence-not-exist" role="alert">
<strong>Oh snap!</strong> Can't find any geofence area, please draw a new area or try again.
</div>
</tbody>
</table>
</div>
<div class="pull-left">
<button style="background-color: #f4f4f4; float: left" type="button" class="btn btn-default"
onclick="viewAllFences('WithIn')">View All
</button>
</div>
<div class="pull-right">
<button style="background-color: #f4f4f4;" type="button" class="btn btn-default"
onclick="openTools('WithIn')">Draw area
</button>
<button style="background-color: #f4f4f4;" type="button" class="btn btn-default"
onclick="$('#editWithinGeoJSON').modal('toggle')">Enter area
</button>
<br/>
<br/>
</div>
</div>
</div>
</div>
</div>
<script src="/devicemgt/public/cdmf.unit.geo-devices/js/geo_within.js"></script>

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2018, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except

@ -1,3 +1,21 @@
/*
* Copyright (c) 2018, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
$(function() { $(function() {
$("#timeFromCal").datepicker({ $("#timeFromCal").datepicker({
orientation: 'top' orientation: 'top'

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2018, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2018, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2018, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2018, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
@ -106,21 +106,6 @@ function addWmsEndPoint() {
noty({text: '<span style="color: red">' + message + '</span>', type: 'error'}); noty({text: '<span style="color: red">' + message + '</span>', type: 'error'});
} }
/* if(layers === undefined || layers == "" || layers == null){
layers = "";
}
if(wmsVersion === undefined || wmsVersion == "" || wmsVersion == null){
wmsVersion = "";
}
if(outputFormat === undefined || outputFormat == "" || outputFormat == null){
outputFormat = "image/png";
}*/
if (validated) { if (validated) {
wmsLayer = L.tileLayer.wms(serviceEndPoint, { wmsLayer = L.tileLayer.wms(serviceEndPoint, {
layers: layers.split(','), layers: layers.split(','),
@ -133,15 +118,6 @@ function addWmsEndPoint() {
layerControl.addOverlay(wmsLayer, serviceName, "Web Map Service layers"); layerControl.addOverlay(wmsLayer, serviceName, "Web Map Service layers");
map.addLayer(wmsLayer); map.addLayer(wmsLayer);
/*var temperature = L.tileLayer.wms('http://gis.srh.noaa.gov/arcgis/services/NDFDTemps/MapServer/WMSServer', {
format: 'img/png',
transparent: true,
layers: 16
});
layerControl.addOverlay(temperature, "testWms", "Web Map Service layers");
map.addLayer(temperature);*/
var data = { var data = {
'serviceName': serviceName, 'serviceName': serviceName,
'layers': layers, 'layers': layers,
@ -418,44 +394,6 @@ function setStationeryAlert(leafletId) {
} }
var toggeled = false; var toggeled = false;
/*function getPrediction(leafletId) {
*//*
* TODO: replace double quote to single quote because of a conflict when deploying execution plan in CEP
* this is against JSON standards so has been re-replaced when getting the data from governance registry
* (look in get_alerts for .replace() method)
* *//*
console.log("leafletId: " + leafletId);
var selectedAreaGeoJson = map._layers[leafletId].toGeoJSON().geometry;
var d = new Date();
console.log(d);
var selectedProcessedAreaGeoJson = JSON.stringify(selectedAreaGeoJson).replace(/"/g, "'");
requestPredictions(selectedAreaGeoJson.coordinates[0], selectedAreaGeoJson.coordinates[1], d);
if(!toggeled){
$('#predictionResults').animate({width: 'toggle'}, 100);
toggeled = true;
}
$.UIkit.notify({
message: "Generating Predictions",
status: 'warning',
timeout: 5000,
pos: 'top-center'
});
setTimeout(function() {
var arr = getPredictions(selectedAreaGeoJson.coordinates[0], selectedAreaGeoJson.coordinates[1], d);
createPredictionChart();
console.log(arr[1]);
predictionChart.load({columns: arr});
}
, 5000);
}*/
function setTrafficAlert(leafletId) { function setTrafficAlert(leafletId) {
/* /*

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2018, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2018, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2018, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2018, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except

@ -1,3 +1,20 @@
/*
* Copyright (c) 2018, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
function reformatRadius(val){ function reformatRadius(val){
if(val != "" && !isNaN(val)){ if(val != "" && !isNaN(val)){

@ -42,14 +42,5 @@ function showAlertInMap(alertData) {
map.setView(alertLatLngPoint,18); map.setView(alertLatLngPoint,18);
/* TODO: for reference <Update lib or remove if not in use>: This `R`(RaphaelLayer: https://github.com/dynmeth/RaphaelLayer) library is dam buggy can't use it reliably */ /* TODO: for reference <Update lib or remove if not in use>: This `R`(RaphaelLayer: https://github.com/dynmeth/RaphaelLayer) library is dam buggy can't use it reliably */
/*
var alertPulse = new R.Pulse(
alertLatLngPoint,
8,
{'stroke': '#FF9E0E', 'fill': '#FF0000'},
{'stroke': '#FF3E2F', 'stroke-width': 3});
map.addLayer(alertPulse);
*/
} }

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2016, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. * Copyright (c) 2018, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
* *
* WSO2 Inc. licenses this file to you under the Apache License, * WSO2 Inc. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except * Version 2.0 (the "License"); you may not use this file except
@ -98,8 +98,6 @@ function disconnect(){
} }
} }
function popupDateRange() { function popupDateRange() {
$('#dateRangePopup').attr('title', 'Device ID - ' + deviceId + " Device Type - " + deviceType).dialog(); $('#dateRangePopup').attr('title', 'Device ID - ' + deviceId + " Device Type - " + deviceType).dialog();
} }
@ -112,7 +110,6 @@ function angleToHeading(angle) {
return headings[angle]; return headings[angle];
} }
function processTrafficMessage(json) { function processTrafficMessage(json) {
if (json.id in currentSpatialObjects) { if (json.id in currentSpatialObjects) {
@ -132,25 +129,6 @@ function processAlertMessage(json) {
} }
} }
/*function setPropertySafe(obj)
{
function isObject(o)
{
if (o === null) return false;
var type = typeof o;
return type === 'object' || type === 'function';
}
if (!isObject(obj)) return;
var prop;
for (var i=1; i < arguments.length-1; i++)
{
prop = arguments[i];
if (!isObject(obj[prop])) obj[prop] = {};
if (i < arguments.length-2) obj = obj[prop];
}
obj[prop] = arguments[i];
}*/
function processPredictionMessage(json) { function processPredictionMessage(json) {
setPropertySafe(currentPredictions, json.day, json.hour, json.longitude, json.latitude, json.traffic - 1); setPropertySafe(currentPredictions, json.day, json.hour, json.longitude, json.latitude, json.traffic - 1);
} }
@ -163,58 +141,6 @@ WebSocket.prototype.get_opened = function () {
return this._opened || false; return this._opened || false;
}; };
/*
var _longitudeStart = -0.0925
var _latitudeStart = 51.4985
var _unit = 0.005;
function requestPredictions(longitude, latitude, d) {
var serverUrl = "http://localhost:9763/endpoints/GpsDataOverHttp/predictionInput";
function loop(i) {
setTimeout(function() {
var data = {
day : d.getUTCDate() - 3,
hour : d.getUTCHours() + i + 1,
latitude : Math.round((latitude - _latitudeStart)/_unit),
longitude : Math.round((longitude - _longitudeStart)/_unit)
};
var json = JSON.stringify(data);
$.ajax({
url: serverUrl,
type: "POST",
data: json,
contentType: "application/json; charset=UTF-8"
});
if(i<6) {
loop(i+1);
}
},500);
}
loop(0);
}
var d= new Date();
//requestPredictions(-0.09,51.5,d);
function getPredictions(longitude, latitude, d) {
var longitude = Math.round((longitude - _longitudeStart)/_unit);
var latitude = Math.round((latitude - _latitudeStart)/_unit);
var traffic = [['x',0,0,0,0,0,0],['data',0,0,0,0,0,0]];
var hour = d.getUTCHours();
var day = d.getUTCDate() - 3;
for (var i = 0; i < 6; i++) {
hour = hour + 1;
if (hour > 23) {
hour = hour - 24;
day = day + 1;
}
try{
traffic[0][i+1] = hour;
traffic[1][i+1] = currentPredictions[day][hour][longitude][latitude];
} catch(e) {
}
}
return traffic;
}*/
function GeoAreaObject(json) { function GeoAreaObject(json) {
this.id = json.id; this.id = json.id;
this.type = "area"; this.type = "area";

Loading…
Cancel
Save