mirror of
https://github.com/vitodeploy/vito.git
synced 2025-04-21 19:01:37 +00:00
32 lines
716 B
PHP
32 lines
716 B
PHP
<?php
|
|
|
|
namespace App\Web\Pages\Servers\Metrics;
|
|
|
|
use App\Models\Metric;
|
|
use App\Web\Pages\Servers\Page;
|
|
|
|
class Index extends Page
|
|
{
|
|
protected static ?string $slug = 'servers/{server}/metrics';
|
|
|
|
protected static ?string $title = 'Metrics';
|
|
|
|
public static function canAccess(): bool
|
|
{
|
|
return auth()->user()?->can('viewAny', [Metric::class, static::getServerFromRoute()]) ?? false;
|
|
}
|
|
|
|
public function getWidgets(): array
|
|
{
|
|
return [
|
|
[Widgets\FilterForm::class, ['server' => $this->server]],
|
|
[Widgets\MetricDetails::class, ['server' => $this->server]],
|
|
];
|
|
}
|
|
|
|
protected function getHeaderActions(): array
|
|
{
|
|
return [];
|
|
}
|
|
}
|