lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From da...@apache.org
Subject [15/31] lucene-solr:jira/http2: SOLR-8207: Collections with underscores in name no longer cause a crash the Cloud->Nodes UI
Date Fri, 10 Aug 2018 09:13:55 GMT
SOLR-8207: Collections with underscores in name no longer cause a crash the Cloud->Nodes
UI


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

Branch: refs/heads/jira/http2
Commit: 6845bbff55707ca219fd29f9c4d3d9e3c20175ec
Parents: 9306922
Author: Jan Høydahl <janhoy@apache.org>
Authored: Wed Aug 8 15:25:43 2018 +0200
Committer: Jan Høydahl <janhoy@apache.org>
Committed: Wed Aug 8 15:25:43 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/6845bbff/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 8cbd4db..8c65037 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;


Mime
View raw message