Skip to content

Commit

Permalink
Tidy up UI Status page, display CPU stats always.
Browse files Browse the repository at this point in the history
  • Loading branch information
westphae committed Apr 2, 2017
1 parent b9ebc3b commit ac6da35
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 29 deletions.
6 changes: 4 additions & 2 deletions web/plates/js/status.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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');
}
Expand Down
56 changes: 29 additions & 27 deletions web/plates/status.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
</div>
</div>
<div class="separator"></div>
<div class="row">
<div class="row" ng-class="{ 'section_invisible': (!visible_uat && !visible_es)}">
<label class="col-xs-4">Messages</label>
<label class="col-xs-6">Current</label>
<label class="col-xs-2 text-right">Peak</label>
Expand All @@ -56,7 +56,7 @@
</div>
<div>{{product_rows}}</div>
</div>
-->
-->
<div class="row" ng-class="{ 'section_invisible': (!visible_gps && !visible_uat)}">
<span class="col-xs-1">&nbsp;</span>
</div>
Expand All @@ -72,8 +72,8 @@
<label class="col-xs-6">GPS satellites:</label>
<span class="col-xs-6">{{GPS_satellites_locked}} in solution; {{GPS_satellites_seen}} seen; {{GPS_satellites_tracked}} tracked</span>
</div>
<div class="row"><span class="col-xs-1">&nbsp;</span></div>
<div class="separator"></div>
<div class="row" ng-class="{'section_invisible': !visible_uat}"><span class="col-xs-1">&nbsp;</span></div>
<div class="separator" ng-class="{'section_invisible': !visible_uat}"></div>
<div class="row" ng-class="{'section_invisible': !visible_uat}">
<div class="col-sm-6">
<span><strong>UAT Statistics</strong></span>
Expand Down Expand Up @@ -107,36 +107,38 @@
<span align="center" class="col-xs-3">{{UAT_SIGMET_total}}</span>
<span align="center" class="col-xs-3">{{UAT_NOTAM_total}}</span>
<span align="center" class="col-xs-3">{{UAT_OTHER_total}}</span>
</div>
</div>
</div>
<div class="row" ng-class="{'section_invisible': !visible_uat}">
<div class="separator"></div>
<div class="row"><span class="col-xs-1">&nbsp;</span></div>
<div class="separator"></div>
<div class="row">
<div class="col-sm-4 label_adj">
<span class="col-xs-5"><strong>Uptime:</strong></span>
<span class="col-xs-7">{{Uptime}}</span>
</div>
<div class="col-sm-4 label_adj">
<span class="col-xs-5"><strong>CPU Temp:</strong></span>
<span class="col-xs-7">{{CPUTemp}}</span>
</div>
<div class="col-sm-4 label_adj">
<span class="col-xs-5"><strong>CPU Load:</strong></span>
<span class="col-xs-7">{{CPULoad}}</span>
</div>
</div>
</div>
</div>
</div>
</div>

<div class="panel panel-default">
<div class="panel-heading" ng-class="{'section_invisible': !visible_errors}">
<div class="panel-body">
<div class="row">
<div class="col-sm-3 label_adj">
<span class="col-xs-6"><strong>Uptime:</strong></span>
<span class="col-xs-6">{{Uptime}}</span>
</div>
<div class="col-sm-3 label_adj">
<span class="col-xs-6"><strong>CPU Temp:</strong></span>
<span class="col-xs-6">{{CPUTemp}}</span>
</div>
<div class="col-sm-3 label_adj">
<span class="col-xs-6"><strong>CPU Load:</strong></span>
<span class="col-xs-6">{{CPULoad}}</span>
</div>
<div class="col-sm-3 label_adj">
<span class="col-xs-5"><strong>Free Storage:</strong></span>
<span class="col-xs-7">{{DiskSpace}} MiB</span>
</div>
</div>
</div>
</div>
<div class="panel panel-default" ng-class="{'section_invisible': !visible_errors}">
<div class="panel-heading">
<span class="panel_label">Errors</span>
</div>
<div class="panel-body" ng-class="{'section_invisible': !visible_errors}">
<div class="panel-body">
<ul>
<li class="status-error" ng-repeat="err in Errors">
<span class="fa fa-exclamation-triangle icon-red"></span> <span class="icon-red">{{err}}</span>
Expand Down

0 comments on commit ac6da35

Please sign in to comment.