Enhance Proxmox components with input validation, error handling, and UI improvements

This commit is contained in:
2026-02-25 07:00:55 -05:00
parent 16cd5f05de
commit 8494f87aae
19 changed files with 182 additions and 64 deletions

View File

@@ -858,6 +858,12 @@ class Statistics extends Component
protected function fetchGraphData(string $graphType, string $timeRange, string $aggregation, bool $forceRefresh = false): void
{
$allowedRanges = ['hour', 'day', 'week', 'month', 'year'];
$allowedAggs = ['average', 'maximum'];
if (!in_array($timeRange, $allowedRanges, true) || !in_array($aggregation, $allowedAggs, true)) {
return;
}
$cacheKey = 'proxmox-stats-' . $this->server->id . '-' . $graphType . '-' . $timeRange . '-' . $aggregation;
try {