liuxiaocs7 commented on code in PR #7822:
URL: https://github.com/apache/hbase/pull/7822#discussion_r2890681157
##########
hbase-server/src/main/resources/hbase-webapps/master/processMaster.jsp:
##########
@@ -100,55 +94,42 @@ pageContext.setAttribute("pageTitle", "Process info for
PID: " + JSONMetricUtil.
<div class="page-header">
<h2>GC Collectors</h2>
</div>
- </div>
- <% if (gcBeans.size() == 2) { %>
+ </div>
+ <% if (gcBeans != null && !gcBeans.isEmpty()) { %>
<div class="tabbable">
<ul class="nav nav-pills" role="tablist">
+ <% int idx = 0; for (GarbageCollectorMXBean gc : gcBeans) { %>
<li class="nav-item">
- <a class="nav-link active" href="#tab_gc1" data-bs-toggle="tab"
role="tab"><%=collector1.getName() %></a>
+ <a class="nav-link <%= idx == 0 ? "active" : "" %>" href="#tab_gc_<%=
idx %>" data-bs-toggle="tab" role="tab">
+ <%= gc.getName() %>
+ </a>
</li>
- <li class="nav-item">
- <a class="nav-link" href="#tab_gc2" data-bs-toggle="tab"
role="tab"><%=collector2.getName() %></a>
- </li>
+ <% idx++; } %>
</ul>
<div class="tab-content">
- <div class="tab-pane active" id="tab_gc1" role="tabpanel">
+ <% idx = 0; long totalGcTime = 0; for (GarbageCollectorMXBean gc :
gcBeans) { totalGcTime += gc.getCollectionTime(); %>
+ <div class="tab-pane <%= idx == 0 ? "active" : "" %>" id="tab_gc_<%= idx
%>" role="tabpanel">
Review Comment:
this is the fix
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]