@@ -5157,29 +5086,6 @@
}, chartRetryDelay);
}
- // Check if all charts have loaded and dispatch event
- function checkAllChartsLoaded() {
- var allExpectedChartsHaveData =
- (!cpuChartExpected || cpuChartHasData) &&
- (!memoryChartExpected || memoryChartHasData) &&
- (!networkChartExpected || networkChartHasData) &&
- (!diskChartExpected || diskChartHasData);
-
- if (allExpectedChartsHaveData) {
- console.log('All expected charts have received data.');
- try {
- window.dispatchEvent(new CustomEvent('proxmox-all-stats-loaded'));
- } catch (e) {}
- }
- }
-
- // Dispatch progress event when individual chart loads
- function dispatchChartLoaded(chartType) {
- try {
- window.dispatchEvent(new CustomEvent('proxmox-chart-loaded', { detail: { chart: chartType } }));
- } catch (e) {}
- }
-
function dispatchStatsWithRetry() {
// Reset retry counters
chartRetryAttempts = { cpu: 0, memory: 0, network: 0, disk: 0 };
@@ -5344,10 +5250,7 @@
}),
}]);
- // Mark that this chart has successfully received data
cpuChartHasData = true;
- dispatchChartLoaded('cpu');
- checkAllChartsLoaded();
} catch (e) {
console.error('Error updating CPU chart:', e, eventData);
}
@@ -5378,10 +5281,7 @@
}),
}]);
- // Mark that this chart has successfully received data
memoryChartHasData = true;
- dispatchChartLoaded('memory');
- checkAllChartsLoaded();
} catch (e) {
console.error('Error updating Memory chart:', e, eventData);
}
@@ -5440,10 +5340,7 @@
})
}]);
- // Mark that this chart has successfully received data
networkChartHasData = true;
- dispatchChartLoaded('network');
- checkAllChartsLoaded();
} catch (e) {
console.error('Error updating Network chart:', e, eventData);
}
@@ -5482,10 +5379,7 @@
})
}]);
- // Mark that this chart has successfully received data
diskChartHasData = true;
- dispatchChartLoaded('disk');
- checkAllChartsLoaded();
} catch (e) {
console.error('Error updating Disk chart:', e, eventData);
}