Merge branch 'webimprovements'

pull/827/head
Adrian Batzill 2024-03-26 17:51:32 +00:00
commit 56d1e9d468
4 zmienionych plików z 16 dodań i 1 usunięć

Wyświetl plik

@ -1,3 +1,4 @@
<div ui-content-for="title">Developer</div>
<div class="col-sm-12">
<div class="panel-group col-sm-6">
<div class="panel panel-default">

Wyświetl plik

@ -45,6 +45,11 @@ function GPSCtrl($rootScope, $scope, $state, $http, $interval) {
};
socket.onmessage = function (msg) {
if ($scope === undefined || $scope === null) {
socket.close();
return;
}
loadSituation(msg.data);
$scope.$apply(); // trigger any needed refreshing of data
};
@ -61,7 +66,11 @@ function GPSCtrl($rootScope, $scope, $state, $http, $interval) {
function sizeMap() {
var width = 0;
var el = document.getElementById("map_display").parentElement;
var div = document.getElementById("map_display");
if (div==null) {
return width;
}
var el = div.parentElement;
width = el.offsetWidth; // was (- (2 * el.offsetLeft))
if (width !== display_area_size) {
display_area_size = width;

Wyświetl plik

@ -210,6 +210,10 @@ function StatusCtrl($rootScope, $scope, $state, $http, $interval, craftService)
};
function getTowers() {
// Homepage status polling towers only if they are active
if ($scope.visible_uat===undefined || $scope.visible_uat==false) {
return;
}
// Simple GET request example (note: responce is asynchronous)
$http.get(URL_TOWERS_GET).
then(function (response) {

Wyświetl plik

@ -258,6 +258,7 @@ function TrafficCtrl($rootScope, $scope, $state, $http, $interval, craftService)
}
// stop stale traffic cleanup
$interval.cancel(clearStaleTraffic);
$interval.cancel(getClock);
};
// Traffic Controller tasks