mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-03 15:02:34 +00:00
move site logs to separate sub-menu (#449)
This commit is contained in:
@ -3,6 +3,7 @@
|
||||
namespace App\Web\Pages\Servers\Sites;
|
||||
|
||||
use App\Models\Queue;
|
||||
use App\Models\ServerLog;
|
||||
use App\Models\Site;
|
||||
use App\Models\Ssl;
|
||||
use App\Web\Contracts\HasSecondSubNav;
|
||||
@ -52,6 +53,16 @@ public function getSecondSubNavigation(): array
|
||||
]));
|
||||
}
|
||||
|
||||
if ($user->can('viewAny', [ServerLog::class, $this->server])) {
|
||||
$items[] = NavigationItem::make(Pages\Logs\Index::getNavigationLabel())
|
||||
->icon('heroicon-o-square-3-stack-3d')
|
||||
->isActiveWhen(fn () => request()->routeIs(Pages\Logs\Index::getRouteName()))
|
||||
->url(Pages\Logs\Index::getUrl(parameters: [
|
||||
'server' => $this->server,
|
||||
'site' => $this->site,
|
||||
]));
|
||||
}
|
||||
|
||||
if ($user->can('update', [$this->site, $this->server])) {
|
||||
$items[] = NavigationItem::make(Settings::getNavigationLabel())
|
||||
->icon('heroicon-o-wrench-screwdriver')
|
||||
|
Reference in New Issue
Block a user