[ 
https://issues.apache.org/jira/browse/HDFS-16988?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17715429#comment-17715429
 ] 

ASF GitHub Bot commented on HDFS-16988:
---------------------------------------

ayushtkn commented on code in PR #5584:
URL: https://github.com/apache/hadoop/pull/5584#discussion_r1174552053


##########
hadoop-hdfs-project/hadoop-hdfs/src/main/webapps/journal/jn.js:
##########
@@ -61,7 +61,9 @@
 
     function workaround(journals) {
         for (var i in journals){
-            journals[i]['NameService']= 
journals[i]['modelerType'].split("-")[1];
+            var str= journals[i]['modelerType'];
+            var index= str.indexOf("-");
+            journals[i]['NameService']= str.substr(index + 1, str.length);

Review Comment:
   does just ```str.substr(index + 1);``` works?





> Improve NameServices info at JournalNode web UI
> -----------------------------------------------
>
>                 Key: HDFS-16988
>                 URL: https://issues.apache.org/jira/browse/HDFS-16988
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>            Reporter: Zhaohui Wang
>            Assignee: Zhaohui Wang
>            Priority: Trivial
>              Labels: pull-request-available
>         Attachments: Before.png, after.png
>
>
> If the NameServices is named xxx-abc-edg, only xxx will be displayed on the 
> JN web UI.
> If NS1 is named xxx-abc-edg, NS2 is named xxx-lmn-xyz. Show both NS as xxx on 
> the JN web UI.
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to