Apache Solr open-source search software
SOLR-16439: Cloud Node does not have Core, the admin UI cannot be displayed properly (#1050)
Shiming Li087bc2682321
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txtindex c535eff1b42..a00a3c64706 100644--- a/solr/CHANGES.txt+++ b/solr/CHANGES.txt@@ -209,6 +209,8 @@ Bug Fixes* SOLR-16232: Fix EnvVar usage in bin/solr (Houston Putman)+* SOLR-16439: Cloud Node does not have Core, the admin UI cannot be displayed properly. (Shiming Li)+* SOLR-16229: Http2SolrClient aborts requests on exception (Daniel Rabus, Tomás Fernández Löbbe)* SOLR-16457: solr.data.home should not be set to empty string in bin/solr (Kevin Risden)diff --git a/solr/webapp/web/js/angular/controllers/cloud.js b/solr/webapp/web/js/angular/controllers/cloud.jsindex 0e4aea6b612..cc947864a1a 100644--- a/solr/webapp/web/js/angular/controllers/cloud.js+++ b/solr/webapp/web/js/angular/controllers/cloud.js@@ -423,9 +423,6 @@ var nodesSubController = function($scope, Collections, System, Metrics) {// These are the cores we _expect_ to find on this node according to the CLUSTERSTATUSvar cores = nodes[node]['cores'];- if (! cores) {- cores = {};- }var indexSizeTotal = 0;var docsTotal = 0;var graphData = [];@@ -467,9 +464,11 @@ var nodesSubController = function($scope, Collections, System, Metrics) {graphObj['pct'] = (core['sizeInBytes'] / indexSizeTotal) * 100;graphData.push(graphObj);}- cores.sort(function (a, b) {- return b.sizeInBytes - a.sizeInBytes- });+ if (cores) {+ cores.sort(function (a, b) {+ return b.sizeInBytes - a.sizeInBytes+ });+ }graphData.sort(function (a, b) {return b.size - a.size});