mirror of
https://github.com/vitodeploy/vito.git
synced 2025-07-08 01:12:34 +00:00
reverse proxy sites
This commit is contained in:
@ -20,6 +20,7 @@
|
||||
use Filament\Forms\Set;
|
||||
use Filament\Notifications\Notification;
|
||||
use Filament\Support\Enums\MaxWidth;
|
||||
use Illuminate\Support\HtmlString;
|
||||
use Throwable;
|
||||
|
||||
class Index extends \App\Web\Pages\Servers\Page
|
||||
@ -84,6 +85,14 @@ protected function getHeaderActions(): array
|
||||
->options(collect($this->server->installedPHPVersions())->mapWithKeys(fn ($version) => [$version => $version]))
|
||||
->visible(fn (Get $get): bool => isset(CreateSite::rules($this->server, $get())['php_version']))
|
||||
->rules(fn (Get $get) => CreateSite::rules($this->server, $get())['php_version']),
|
||||
TextInput::make('port')
|
||||
->placeholder('Reverse Proxy Port')
|
||||
->rules(fn (Get $get) => CreateSite::rules($this->server, $get())['port'])
|
||||
->helperText(
|
||||
new HtmlString(
|
||||
'The port to use for the reverse proxy (<a href="https://vitodeploy.com/docs/sites/create" class="text-primary-500" target="_blank">Read more</a>)'
|
||||
)
|
||||
),
|
||||
TextInput::make('web_directory')
|
||||
->placeholder('For / leave empty')
|
||||
->rules(fn (Get $get) => CreateSite::rules($this->server, $get())['web_directory'])
|
||||
|
@ -66,16 +66,6 @@ public function getSecondSubNavigation(): array
|
||||
]));
|
||||
}
|
||||
|
||||
if ($user->can('update', [$this->site, $this->server])) {
|
||||
$items[] = NavigationItem::make(Settings::getNavigationLabel())
|
||||
->icon('heroicon-o-wrench-screwdriver')
|
||||
->isActiveWhen(fn () => request()->routeIs(Settings::getRouteName()))
|
||||
->url(Settings::getUrl(parameters: [
|
||||
'server' => $this->server,
|
||||
'site' => $this->site,
|
||||
]));
|
||||
}
|
||||
|
||||
if ($user->can('view', [Redirect::class, $this->site, $this->server])) {
|
||||
$items[] = NavigationItem::make(Pages\Redirects\Index::getNavigationLabel())
|
||||
->icon('heroicon-o-arrows-right-left')
|
||||
@ -86,6 +76,16 @@ public function getSecondSubNavigation(): array
|
||||
]));
|
||||
}
|
||||
|
||||
if ($user->can('update', [$this->site, $this->server])) {
|
||||
$items[] = NavigationItem::make(Settings::getNavigationLabel())
|
||||
->icon('heroicon-o-wrench-screwdriver')
|
||||
->isActiveWhen(fn () => request()->routeIs(Settings::getRouteName()))
|
||||
->url(Settings::getUrl(parameters: [
|
||||
'server' => $this->server,
|
||||
'site' => $this->site,
|
||||
]));
|
||||
}
|
||||
|
||||
return [
|
||||
NavigationGroup::make()
|
||||
->items($items),
|
||||
|
Reference in New Issue
Block a user