You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "MarcusSorealheis (via GitHub)" <gi...@apache.org> on 2023/04/28 21:43:55 UTC

[GitHub] [solr] MarcusSorealheis commented on a diff in pull request #1593: SOLR-16773: UI: Cloud>Nodes screen fix display of cores with non-standard shard names

MarcusSorealheis commented on code in PR #1593:
URL: https://github.com/apache/solr/pull/1593#discussion_r1180838335


##########
solr/webapp/web/js/angular/controllers/cloud.js:
##########
@@ -198,10 +194,13 @@ var nodesSubController = function($scope, Collections, System, Metrics) {
           for (var replicaName in replicas) {
             var core = replicas[replicaName];
             core.name = replicaName;
-            core.label = coreNameToLabel(core['core']);
+            core.replica = core['core'].replace(/.*_(replica_.*)$/, '\$1');
             core.collection = collection.name;
             core.shard = shard.name;
             core.shard_state = shard.state;
+            core.label = core['collection'] + "_"
+              + (core['shard'] + "_").replace(/shard(\d+)_/, 's\$1')
+              + core['replica'].replace(/replica_?[ntp]?(\d+)/, 'r\$1');

Review Comment:
   I think could be made a bit clearer as to what is going here in the GitHub description, e.g. super imposing a box on what has changed  or a before/after, which is somewhat standard for UI. Alternatively, you could show how some of the names were treated in the past and how they will be treated going forward. Otherwise, mostly looks good.
   
   However, I know this is in maintenance mode. 



##########
solr/webapp/web/js/angular/controllers/cloud.js:
##########
@@ -198,10 +194,13 @@ var nodesSubController = function($scope, Collections, System, Metrics) {
           for (var replicaName in replicas) {
             var core = replicas[replicaName];
             core.name = replicaName;
-            core.label = coreNameToLabel(core['core']);
+            core.replica = core['core'].replace(/.*_(replica_.*)$/, '\$1');
             core.collection = collection.name;
             core.shard = shard.name;
             core.shard_state = shard.state;
+            core.label = core['collection'] + "_"
+              + (core['shard'] + "_").replace(/shard(\d+)_/, 's\$1')
+              + core['replica'].replace(/replica_?[ntp]?(\d+)/, 'r\$1');

Review Comment:
   My only question is, what is the ntp here for? I'm assuming NRT, Pull, and TLog replicas? 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org