[ https://issues.apache.org/jira/browse/YARN-11310?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17609764#comment-17609764 ]
ASF GitHub Bot commented on YARN-11310: --------------------------------------- slfan1989 commented on code in PR #4924: URL: https://github.com/apache/hadoop/pull/4924#discussion_r980626019 ########## hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/resources/webapps/static/federation/federation.js: ########## @@ -0,0 +1,77 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +$(document).ready(function() { + var table = $('#rms').DataTable(); + $('#rms tbody').on('click', 'td.details-control', function () { + var tr = $(this).closest('tr'); + var row = table.row(tr); + if (row.child.isShown()) { + row.child.hide(); + tr.removeClass('shown'); + } else { + var capabilityArr = scTableData.filter(item => (item.subcluster === row.id())); + var capabilityObj = JSON.parse(capabilityArr[0].capability).clusterMetrics; + row.child( + '<table>' + + ' <tr>' + + ' <td> ' + + ' <h3>Application Metrics</h3> ' + + ' ApplicationSubmitted* : '+ capabilityObj.appsSubmitted +' </p>' + + ' ApplicationCompleted* : '+ capabilityObj.appsCompleted +' </p>' + + ' ApplicationPending* : '+ capabilityObj.appsPending +' </p>' + + ' ApplicationRunning* : '+ capabilityObj.appsRunning +' </p>'+ + ' ApplicationFailed* : '+ capabilityObj.appsFailed +' </p>'+ + ' ApplicationKilled* : '+ capabilityObj.appsKilled +' </p>'+ + ' </td>' + + ' <td>' + + ' <h3>Resource Metrics</h3>'+ + ' <h4>Memory</h4>'+ + ' TotalMB : '+ capabilityObj.totalMB +' </p>' + + ' ReservedMB : '+ capabilityObj.reservedMB +' </p>'+ + ' AvailableMB : '+ capabilityObj.availableMB +' </p> '+ + ' AllocatedMB : '+ capabilityObj.allocatedMB +' </p> '+ + ' PendingMB : '+ capabilityObj.pendingMB +' </p>' + + ' <h4>VirtualCores</h4>'+ + ' TotalVirtualCores : '+capabilityObj.totalVirtualCores+' </p>'+ + ' ReservedVirtualCores : '+capabilityObj.reservedVirtualCores+' </p>'+ + ' AvailableVirtualCore : '+capabilityObj.availableVirtualCores+' </p>'+ + ' AllocatedVirtualCores : '+capabilityObj.allocatedVirtualCores+' </p>'+ + ' PendingVirtualCores : '+capabilityObj.pendingVirtualCores+' </p>'+ + ' <h4>Containers</h4>'+ Review Comment: Thank you very much for helping to review the code, I will modify the code. > [Yarn Federation] Refactoring Router's Federation Web Page > ---------------------------------------------------------- > > Key: YARN-11310 > URL: https://issues.apache.org/jira/browse/YARN-11310 > Project: Hadoop YARN > Issue Type: Improvement > Components: federation > Affects Versions: 3.4.0 > Reporter: fanshilun > Assignee: fanshilun > Priority: Major > Labels: pull-request-available > Attachments: Federation_Web_Page.gif, > image-2022-09-22-11-43-27-954.png, image-2022-09-22-11-49-10-974.png, > image-2022-09-22-11-52-50-188.png, image-2022-09-22-11-55-08-113.png > > > The Yarn Federation page before modification is as follows: > enable federation: > !image-2022-09-22-11-43-27-954.png|width=952,height=232! > federation is not enabled > !image-2022-09-22-11-49-10-974.png|width=958,height=209! > > The page needs to be optimized as follows: > 1. Title is inaccurate, should be "About The Federation" > 2.If the user does not configure federation.enable, the page should prompt > information instead of showing blank. > 3.For cluster information, we care more about the current sub-cluster status, > registration time, heartbeat time, etc., rather than capacity information. > > enable federation: > !image-2022-09-22-11-52-50-188.png|width=736,height=320! > federation is not enabled > !image-2022-09-22-11-55-08-113.png|width=733,height=211! > > -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: yarn-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: yarn-issues-h...@hadoop.apache.org