You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ja...@apache.org on 2018/08/08 13:27:47 UTC

lucene-solr:branch_7x: SOLR-8207: Collections with underscores in name no longer cause a crash the Cloud->Nodes UI

Repository: lucene-solr
Updated Branches:
  refs/heads/branch_7x 572557d8f -> 98fab3ee2


SOLR-8207: Collections with underscores in name no longer cause a crash the Cloud->Nodes UI

(cherry picked from commit 6845bbf)


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/98fab3ee
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/98fab3ee
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/98fab3ee

Branch: refs/heads/branch_7x
Commit: 98fab3ee2ed7191dce250039fe3bcdc2cc2242f7
Parents: 572557d
Author: Jan Høydahl <ja...@apache.org>
Authored: Wed Aug 8 15:25:43 2018 +0200
Committer: Jan Høydahl <ja...@apache.org>
Committed: Wed Aug 8 15:27:35 2018 +0200

----------------------------------------------------------------------
 solr/webapp/web/js/angular/controllers/cloud.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/98fab3ee/solr/webapp/web/js/angular/controllers/cloud.js
----------------------------------------------------------------------
diff --git a/solr/webapp/web/js/angular/controllers/cloud.js b/solr/webapp/web/js/angular/controllers/cloud.js
index abe0ef6..d913e71 100644
--- a/solr/webapp/web/js/angular/controllers/cloud.js
+++ b/solr/webapp/web/js/angular/controllers/cloud.js
@@ -407,13 +407,13 @@ var nodesSubController = function($scope, Collections, System, Metrics) {
               if (cores) {
                 for (coreId in cores) {
                   var core = cores[coreId];
-                  var keyName = "solr.core." + core['core'].replace('_', '.').replace('_', '.');
+                  var keyName = "solr.core." + core['core'].replace(/(.*?)_(shard\d+)_(replica_.\d+)/, '\$1.\$2.\$3');
                   var nodeMetric = m.metrics[keyName];
                   var size = nodeMetric['INDEX.sizeInBytes'];
                   size = (typeof size !== 'undefined') ? size : 0;
                   core['sizeInBytes'] = size;
                   core['size'] = bytesToSize(size);
-                  core['label'] = core['core'].replace('_shard', '_s').replace(/_replica_./, 'r');
+                  core['label'] = core['core'].replace(/(.*?)_shard(\d+)_replica_.(\d+)/, '\$1_s\$2r\$3');
                   indexSizeTotal += size;
                   var numDocs = nodeMetric['SEARCHER.searcher.numDocs'];
                   numDocs = (typeof numDocs !== 'undefined') ? numDocs : 0;