From c8d41c7b3e4f3cde9f3de0f77b12e9c8786ff6ed Mon Sep 17 00:00:00 2001 From: Rasika Perera Date: Fri, 16 Jun 2017 12:45:29 +0530 Subject: [PATCH] Few more improvements into geo-dashboard --- .../app/units/cdmf.unit.geo-dashboard/geo-dashboard.hbs | 6 +++--- .../units/cdmf.unit.geo-dashboard/public/js/websocket.js | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) 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 3632433e3d..c1121ba4f5 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 @@ -482,7 +482,7 @@
Speed km/h
Heading
- + @@ -703,9 +703,9 @@ createGeoToolListItem(geoPublicUri + '/assets/html_templates/modal/stationery_alert.html', 'Add Stationary Alert', 'glyphicon glyphicon-link', geoToolsMenu); createGeoToolListItem(geoPublicUri + '/assets/html_templates/modal/within_alert.html', - 'Add Geo Fence Enter Alert', 'glyphicon glyphicon-edit', geoToolsMenu); + 'Add Geo Fence Enter Alert', 'glyphicon glyphicon-log-in', geoToolsMenu); createGeoToolListItem(geoPublicUri + '/assets/html_templates/modal/exit_alert.html', - 'Add Geo Fence Exit Alert', 'glyphicon glyphicon-edit', geoToolsMenu); + 'Add Geo Fence Exit Alert', 'glyphicon glyphicon-log-out', geoToolsMenu); {{/if}} } }); diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-dashboard/public/js/websocket.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-dashboard/public/js/websocket.js index bf161dbdd0..f8fb392397 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-dashboard/public/js/websocket.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-dashboard/public/js/websocket.js @@ -144,7 +144,9 @@ SpatialObject.prototype.update = function (geoJSON) { if (selectedSpatialObject == this.id) { this.updatePath([geoJSON.geometry.coordinates[1], geoJSON.geometry.coordinates[0]]); - chart.load({columns: [this.speedHistory.getArray()]}); + if (speedGraphControl) { + chart.load({columns: [this.speedHistory.getArray()]}); + } map.setView([this.latitude, this.longitude]); }