You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by cp...@apache.org on 2022/10/12 16:13:59 UTC

[solr] branch main updated: SOLR-16439: Cloud Node does not have Core, the admin UI cannot be displayed properly (#1050)

This is an automated email from the ASF dual-hosted git repository.

cpoerschke 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 087bc268232 SOLR-16439: Cloud Node does not have Core, the admin UI cannot be displayed properly (#1050)
087bc268232 is described below

commit 087bc2682321a6c8f8f5f2ec0ed95b4fe27e7ad0
Author: Shiming Li <li...@live.com>
AuthorDate: Thu Oct 13 00:13:52 2022 +0800

    SOLR-16439: Cloud Node does not have Core, the admin UI cannot be displayed properly (#1050)
    
    Co-authored-by: Shiming Li <sh...@zhaopin.com.cn>
---
 solr/CHANGES.txt                                |  2 ++
 solr/webapp/web/js/angular/controllers/cloud.js | 11 +++++------
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 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.js
index 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 CLUSTERSTATUS
               var 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
               });