Fix: corrigido erro JavaScript que impedia carregamento de dados do dashboard

This commit is contained in:
2025-09-29 21:02:53 -03:00
parent 79548ff3a6
commit d0eeeb2d1a

View File

@@ -1664,7 +1664,7 @@
updateStats(data); updateStats(data);
// Update cluster health dashboard // Update cluster health dashboard
updateClusterHealthDisplay(data, { distribution: data.qos_distribution }); updateClusterHealthDisplay(data, data);
showSuccess('Cluster status loaded successfully. Loading analysis...'); showSuccess('Cluster status loaded successfully. Loading analysis...');
@@ -3083,7 +3083,7 @@
} else { } else {
overcommitText = '🟢 Normal'; overcommitText = '🟢 Normal';
} }
document.getElementById('overcommitStatus').textContent = overcommitText; // Overcommit status is now shown in individual metrics above
// Update resource consumption // Update resource consumption
updateResourceConsumption(healthData); updateResourceConsumption(healthData);
@@ -3092,7 +3092,7 @@
updateTopConsumers(healthData.top_resource_consumers); updateTopConsumers(healthData.top_resource_consumers);
// Update QoS distribution // Update QoS distribution
updateQoSDistribution(qosData.distribution); updateQoSDistribution(qosData);
} }
function formatCpuValue(value) { function formatCpuValue(value) {
@@ -3163,7 +3163,8 @@
}); });
} }
function updateQoSDistribution(distribution) { function updateQoSDistribution(qosData) {
const distribution = qosData.qos_distribution || {};
document.getElementById('guaranteedCount').textContent = distribution.Guaranteed || 0; document.getElementById('guaranteedCount').textContent = distribution.Guaranteed || 0;
document.getElementById('burstableCount').textContent = distribution.Burstable || 0; document.getElementById('burstableCount').textContent = distribution.Burstable || 0;
document.getElementById('besteffortCount').textContent = distribution.BestEffort || 0; document.getElementById('besteffortCount').textContent = distribution.BestEffort || 0;