This is an automated email from the ASF dual-hosted git repository.
elyograg pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr.git
The following commit(s) were added to refs/heads/main by this push:
new 5884467f490 SOLR-16605: fix CPU calculaton in cloud->nodes UI tab
5884467f490 is described below
commit 5884467f49024e2fa15eb51f77f04d21f626e367
Author: Shawn Heisey <[email protected]>
AuthorDate: Mon Jan 2 14:00:23 2023 -0700
SOLR-16605: fix CPU calculaton in cloud->nodes UI tab
---
solr/CHANGES.txt | 2 ++
solr/webapp/web/js/angular/controllers/cloud.js | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index ff425e966d1..08b0699cd43 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -151,6 +151,8 @@ Bug Fixes
* SOLR-10458: Fix followRedirect property on HttpSolrClient not set when using
Builder pattern. (Eric Pugh)
+* SOLR-16605: CPU percent calculation incorrect in admin UI cloud->nodes tab
(Shawn Heisey)
+
Build
---------------------
diff --git a/solr/webapp/web/js/angular/controllers/cloud.js
b/solr/webapp/web/js/angular/controllers/cloud.js
index cc947864a1a..97f2327675a 100644
--- a/solr/webapp/web/js/angular/controllers/cloud.js
+++ b/solr/webapp/web/js/angular/controllers/cloud.js
@@ -383,7 +383,7 @@ var nodesSubController = function($scope, Collections,
System, Metrics) {
nodes[node]['uptime'] = (s.system.uptime || "unknown").replace(/.*up
(.*?,.*?),.*/, "$1");
nodes[node]['loadAvg'] = Math.round(s.system.systemLoadAverage *
100) / 100;
- nodes[node]['cpuPct'] = Math.ceil(s.system.processCpuLoad);
+ nodes[node]['cpuPct'] = Math.ceil(s.system.processCpuLoad * 100);
nodes[node]['cpuPctStyle'] =
styleForPct(Math.ceil(s.system.processCpuLoad));
nodes[node]['maxFileDescriptorCount'] =
s.system.maxFileDescriptorCount;
nodes[node]['openFileDescriptorCount'] =
s.system.openFileDescriptorCount;