SOLR-14112: do not display load average of -1.00 on windows in admin UI

This commit is contained in:
Robert Muir 2019-12-20 05:42:00 -05:00
parent 1333bd10a7
commit b7b6b0f3bf
1 changed files with 4 additions and 2 deletions

View File

@ -21,8 +21,10 @@ solrAdminApp.controller('IndexController', function($scope, System, Cores, Const
System.get(function(data) {
$scope.system = data;
// load average
$scope.load_average = data.system.systemLoadAverage.toFixed(2);
// load average, unless its negative (means n/a on windows, etc)
if (data.system.systemLoadAverage >= 0) {
$scope.load_average = data.system.systemLoadAverage.toFixed(2);
}
// physical memory
var memoryMax = parse_memory_value(data.system.totalPhysicalMemorySize);