show n8n version

This commit is contained in:
usmannasir
2025-04-12 23:51:50 +05:00
parent 1e4a5924b0
commit ce3f7dca5f
2 changed files with 19 additions and 25 deletions

View File

@@ -99,14 +99,11 @@ app.controller('ListDockersitecontainer', function ($scope, $http) {
$scope.ContainerList[i].memoryUsage = formatBytes(memoryBytes);
$scope.ContainerList[i].memoryUsagePercent = (memoryBytes / (1024 * 1024 * 1024)) * 100;
// Ensure CPU usage is a valid number and cap it at 800% (8 cores at 100% each)
// CPU Usage - ensure it's a valid number and keep original value
var cpuUsage = parseFloat(containerInfo.cpu_usage);
if (isNaN(cpuUsage) || cpuUsage < 0) {
cpuUsage = 0;
} else if (cpuUsage > 800) {
cpuUsage = 800;
}
$scope.ContainerList[i].cpuUsagePercent = cpuUsage;
$scope.ContainerList[i].cpuUsagePercent = isNaN(cpuUsage) ? 0 : cpuUsage;
console.log('Container CPU Usage:', containerInfo.name, cpuUsage);
// Network & Ports
$scope.ContainerList[i].ports = containerInfo.ports;