From b7b6b0f3bfe4cf27c73ec6f4da0e25a95f70a954 Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Fri, 20 Dec 2019 05:42:00 -0500 Subject: [PATCH] SOLR-14112: do not display load average of -1.00 on windows in admin UI --- solr/webapp/web/js/angular/controllers/index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/solr/webapp/web/js/angular/controllers/index.js b/solr/webapp/web/js/angular/controllers/index.js index 34299a772fe..d8052d4f8f3 100644 --- a/solr/webapp/web/js/angular/controllers/index.js +++ b/solr/webapp/web/js/angular/controllers/index.js @@ -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);