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-unsubscr...@solr.apache.org

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


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

Reply via email to