From 0aff4193d3b57578b32a1fe5b1444b16ccc2306f Mon Sep 17 00:00:00 2001 From: Arcane94 Date: Mon, 12 Mar 2018 14:40:08 +0530 Subject: [PATCH] License year changes and comment changes --- .../cdmf.unit.geo-devices/geo-devices.js | 2 +- .../html_templates/modal/exit_alert.html | 52 ------------ .../html_templates/modal/speed_alert.html | 49 ----------- .../modal/stationery_alert.html | 83 ------------------- .../html_templates/modal/within_alert.html | 52 ------------ .../public/js/application_options.js | 2 +- .../public/js/firstTemp.js | 18 ++++ .../public/js/geo_exit_fence.js | 2 +- .../public/js/geo_fencing.js | 2 +- .../public/js/geo_proximity.js | 2 +- .../public/js/geo_remote.js | 64 +------------- .../public/js/geo_speed.js | 2 +- .../public/js/geo_stationary.js | 2 +- .../public/js/geo_within.js | 2 +- .../public/js/moment.min.js | 2 +- .../public/js/secondTemp.js | 17 ++++ .../public/js/show_alert_in_map.js | 9 -- .../public/js/websocket.js | 76 +---------------- 18 files changed, 46 insertions(+), 392 deletions(-) delete mode 100644 components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/assets/html_templates/modal/exit_alert.html delete mode 100644 components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/assets/html_templates/modal/speed_alert.html delete mode 100644 components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/assets/html_templates/modal/stationery_alert.html delete mode 100644 components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/assets/html_templates/modal/within_alert.html diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/geo-devices.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/geo-devices.js index fdf3565720..eddb14ea91 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/geo-devices.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/geo-devices.js @@ -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, * Version 2.0 (the "License"); you may not use this file except diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/assets/html_templates/modal/exit_alert.html b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/assets/html_templates/modal/exit_alert.html deleted file mode 100644 index de211e778d..0000000000 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/assets/html_templates/modal/exit_alert.html +++ /dev/null @@ -1,52 +0,0 @@ - - - - \ No newline at end of file diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/assets/html_templates/modal/speed_alert.html b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/assets/html_templates/modal/speed_alert.html deleted file mode 100644 index e3a2ecc364..0000000000 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/assets/html_templates/modal/speed_alert.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/assets/html_templates/modal/stationery_alert.html b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/assets/html_templates/modal/stationery_alert.html deleted file mode 100644 index 7a0431d827..0000000000 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/assets/html_templates/modal/stationery_alert.html +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/js/application_options.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/js/application_options.js index cd1915e67a..2ca6536b45 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/js/application_options.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/js/application_options.js @@ -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, * Version 2.0 (the "License"); you may not use this file except diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/js/firstTemp.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/js/firstTemp.js index 73f567fe0a..4956d676ae 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/js/firstTemp.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/js/firstTemp.js @@ -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() { $("#timeFromCal").datepicker({ orientation: 'top' diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/js/geo_exit_fence.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/js/geo_exit_fence.js index 6337711d90..78603dc415 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/js/geo_exit_fence.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/js/geo_exit_fence.js @@ -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, * Version 2.0 (the "License"); you may not use this file except diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/js/geo_fencing.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/js/geo_fencing.js index 233b0e80d2..945fe0da11 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/js/geo_fencing.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/js/geo_fencing.js @@ -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, * Version 2.0 (the "License"); you may not use this file except diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/js/geo_proximity.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/js/geo_proximity.js index b47a97fc0c..a1aee6a2c0 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/js/geo_proximity.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/js/geo_proximity.js @@ -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, * Version 2.0 (the "License"); you may not use this file except diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/js/geo_remote.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/js/geo_remote.js index bddac4133a..af47b6db21 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/js/geo_remote.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/js/geo_remote.js @@ -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, * Version 2.0 (the "License"); you may not use this file except @@ -106,21 +106,6 @@ function addWmsEndPoint() { noty({text: '' + message + '', 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) { wmsLayer = L.tileLayer.wms(serviceEndPoint, { layers: layers.split(','), @@ -133,15 +118,6 @@ function addWmsEndPoint() { layerControl.addOverlay(wmsLayer, serviceName, "Web Map Service layers"); 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 = { 'serviceName': serviceName, 'layers': layers, @@ -418,44 +394,6 @@ function setStationeryAlert(leafletId) { } 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) { /* diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/js/geo_speed.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/js/geo_speed.js index 648463dfcd..905da718d9 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/js/geo_speed.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/js/geo_speed.js @@ -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, * Version 2.0 (the "License"); you may not use this file except diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/js/geo_stationary.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/js/geo_stationary.js index 2011ca56d4..1fb0668a38 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/js/geo_stationary.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/js/geo_stationary.js @@ -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, * Version 2.0 (the "License"); you may not use this file except diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/js/geo_within.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/js/geo_within.js index 689eb31d86..aef0d4a510 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/js/geo_within.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/js/geo_within.js @@ -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, * Version 2.0 (the "License"); you may not use this file except diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/js/moment.min.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/js/moment.min.js index 78e5aaadc7..a3f5e2e653 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/js/moment.min.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/js/moment.min.js @@ -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, * Version 2.0 (the "License"); you may not use this file except diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/js/secondTemp.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/js/secondTemp.js index 11696560a0..870391a086 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/js/secondTemp.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/js/secondTemp.js @@ -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){ if(val != "" && !isNaN(val)){ diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/js/show_alert_in_map.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/js/show_alert_in_map.js index d41c1ce828..144f3f5cb5 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/js/show_alert_in_map.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/js/show_alert_in_map.js @@ -42,14 +42,5 @@ function showAlertInMap(alertData) { map.setView(alertLatLngPoint,18); /* TODO: for reference : 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); - */ - } diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/js/websocket.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/js/websocket.js index fccbc15462..7a80d50c46 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/js/websocket.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/js/websocket.js @@ -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, * Version 2.0 (the "License"); you may not use this file except @@ -98,8 +98,6 @@ function disconnect(){ } } - - function popupDateRange() { $('#dateRangePopup').attr('title', 'Device ID - ' + deviceId + " Device Type - " + deviceType).dialog(); } @@ -112,7 +110,6 @@ function angleToHeading(angle) { return headings[angle]; } - function processTrafficMessage(json) { 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) { 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; }; - -/* - 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) { this.id = json.id; this.type = "area";