Enhance Proxmox components with input validation, error handling, and UI improvements
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user