From ac6da35e3b033d28814eb6879f4db12c367d1c69 Mon Sep 17 00:00:00 2001 From: Eric Westphal Date: Sun, 2 Apr 2017 10:09:16 -0400 Subject: [PATCH] Tidy up UI Status page, display CPU stats always. --- web/plates/js/status.js | 6 +++-- web/plates/status.html | 56 +++++++++++++++++++++-------------------- 2 files changed, 33 insertions(+), 29 deletions(-) diff --git a/web/plates/js/status.js b/web/plates/js/status.js index b1b1dfed4..841f0cbab 100644 --- a/web/plates/js/status.js +++ b/web/plates/js/status.js @@ -54,7 +54,9 @@ function StatusCtrl($rootScope, $scope, $state, $http, $interval) { $scope.GPS_satellites_tracked = status.GPS_satellites_tracked; $scope.GPS_satellites_seen = status.GPS_satellites_seen; $scope.GPS_solution = status.GPS_solution; - $scope.GPS_position_accuracy = String(status.GPS_solution ? ", " + status.GPS_position_accuracy.toFixed(1) + " m" : " "); + var MiBFree = status.DiskBytesFree/1048576; + $scope.DiskSpace = MiBFree.toFixed(1); + $scope.GPS_position_accuracy = String(status.GPS_solution ? ", " + status.GPS_position_accuracy.toFixed(1) + " m" : " "); $scope.UAT_METAR_total = status.UAT_METAR_total; $scope.UAT_TAF_total = status.UAT_TAF_total; $scope.UAT_NEXRAD_total = status.UAT_NEXRAD_total; @@ -82,7 +84,7 @@ function StatusCtrl($rootScope, $scope, $state, $http, $interval) { var boardtemp = status.CPUTemp; if (boardtemp != undefined) { /* boardtemp is celcius to tenths */ - $scope.CPUTemp = String(boardtemp.toFixed(1) + 'C / ' + ((boardtemp * 9 / 5) + 32.0).toFixed(1) + 'F'); + $scope.CPUTemp = String(boardtemp.toFixed(1) + '°C / ' + ((boardtemp * 9 / 5) + 32.0).toFixed(1) + '°F'); } else { // $('#CPUTemp').text('unavailable'); } diff --git a/web/plates/status.html b/web/plates/status.html index 0ae62847b..421054f18 100644 --- a/web/plates/status.html +++ b/web/plates/status.html @@ -29,7 +29,7 @@
-
+
@@ -56,7 +56,7 @@
{{product_rows}}
---> + -->
 
@@ -72,8 +72,8 @@ {{GPS_satellites_locked}} in solution; {{GPS_satellites_seen}} seen; {{GPS_satellites_tracked}} tracked -
 
-
+
 
+
UAT Statistics @@ -107,36 +107,38 @@ {{UAT_SIGMET_total}} {{UAT_NOTAM_total}} {{UAT_OTHER_total}} -
-
- -
-
-
 
-
-
-
- Uptime: - {{Uptime}} -
-
- CPU Temp: - {{CPUTemp}} -
-
- CPU Load: - {{CPULoad}}
- + -
-
+
+
+
+ Uptime: + {{Uptime}} +
+
+ CPU Temp: + {{CPUTemp}} +
+
+ CPU Load: + {{CPULoad}} +
+
+ Free Storage: + {{DiskSpace}} MiB +
+
+
+
+
+
Errors
-
+
  • {{err}}