/** * 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( '
' +
' Application Metrics' + ' ApplicationSubmitted* : ' + capabilityObj.appsSubmitted + ' ' + ' ApplicationCompleted* : ' + capabilityObj.appsCompleted + ' ' + ' ApplicationPending* : ' + capabilityObj.appsPending + ' ' + ' ApplicationRunning* : ' + capabilityObj.appsRunning + ' ' + ' ApplicationFailed* : ' + capabilityObj.appsFailed + ' ' + ' ApplicationKilled* : ' + capabilityObj.appsKilled + ' ' + ' | ' +
' ' +
' Resource Metrics' + 'Memory' + ' TotalMB : ' + capabilityObj.totalMB + ' ' + ' ReservedMB : ' + capabilityObj.reservedMB + ' ' + ' AvailableMB : ' + capabilityObj.availableMB + ' ' + ' AllocatedMB : ' + capabilityObj.allocatedMB + ' ' + ' PendingMB : ' + capabilityObj.pendingMB + ' ' + 'VirtualCores' + ' TotalVirtualCores : ' + capabilityObj.totalVirtualCores + ' ' + ' ReservedVirtualCores : ' + capabilityObj.reservedVirtualCores + ' ' + ' AvailableVirtualCore : ' + capabilityObj.availableVirtualCores + ' ' + ' AllocatedVirtualCores : '+ capabilityObj.allocatedVirtualCores + ' ' + ' PendingVirtualCores : ' + capabilityObj.pendingVirtualCores + ' ' + 'Containers' + ' ContainersAllocated : ' + capabilityObj.containersAllocated + ' ' + ' ContainersReserved : ' + capabilityObj.containersReserved + ' ' + ' ContainersPending : ' + capabilityObj.containersPending + ' ' + ' | ' +
' ' +
' Node Metrics' + ' TotalNodes : ' + capabilityObj.totalNodes + ' ' + ' LostNodes : ' + capabilityObj.lostNodes + ' ' + ' UnhealthyNodes : ' + capabilityObj.unhealthyNodes + ' ' + ' DecommissioningNodes : ' + capabilityObj.decommissioningNodes + ' ' + ' DecommissionedNodes : ' + capabilityObj.decommissionedNodes + ' ' + ' RebootedNodes : ' + capabilityObj.rebootedNodes + ' ' + ' ActiveNodes : ' + capabilityObj.activeNodes + ' ' + ' ShutdownNodes : ' + capabilityObj.shutdownNodes + ' ' + ' | ' +
'