webapps.static.federation.federation.js Maven / Gradle / Ivy
The newest version!
/**
* 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
' +
' Total Memory : ' + capabilityArr[0].totalmemory + ' ' +
' Reserved Memory : ' + capabilityArr[0].reservedmemory + ' ' +
' Available Memory : ' + capabilityArr[0].availablememory + ' ' +
' Allocated Memory : ' + capabilityArr[0].allocatedmemory + ' ' +
' Pending Memory : ' + capabilityArr[0].pendingmemory + ' ' +
'
' +
' 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 + ' ' +
' ' +
' ' +
'
').show();
tr.addClass('shown');
}
});
});
© 2015 - 2025 Weber Informatics LLC | Privacy Policy