|
|
@@ -262,20 +262,15 @@ async function loadHostMetrics() {
|
|
|
const { data } = await axios.get('/superadmin/monitoring/host-metrics/recent', {
|
|
|
params: { limit: 30 }
|
|
|
})
|
|
|
- console.log('Host metrics loaded:', data.metrics.length, 'records')
|
|
|
hostMetrics.value = data.metrics // Already in chronological order
|
|
|
- console.log('Calling updateCharts()...')
|
|
|
updateCharts()
|
|
|
} catch (error) {
|
|
|
console.error('Failed to load host metrics:', error)
|
|
|
- console.error('Error details:', error.response?.data)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
function updateCharts() {
|
|
|
- console.log('updateCharts() called, metrics count:', hostMetrics.value.length)
|
|
|
if (hostMetrics.value.length === 0) {
|
|
|
- console.warn('No metrics data, skipping chart update')
|
|
|
return
|
|
|
}
|
|
|
|
|
|
@@ -285,7 +280,6 @@ function updateCharts() {
|
|
|
minute: '2-digit'
|
|
|
})
|
|
|
)
|
|
|
- console.log('Chart labels:', labels)
|
|
|
|
|
|
// CPU Chart
|
|
|
cpuChartData.value = {
|
|
|
@@ -306,7 +300,6 @@ function updateCharts() {
|
|
|
}
|
|
|
]
|
|
|
}
|
|
|
- console.log('CPU chart data set:', cpuChartData.value.datasets[0].data.length, 'points')
|
|
|
|
|
|
// Memory Chart
|
|
|
memoryChartData.value = {
|