2023-05-16 09:47:39 +00:00
|
|
|
<div x-data="{ stopProxy: false }">
|
|
|
|
<x-naked-modal show="stopProxy" action="stopProxy"
|
|
|
|
message='Are you sure you would like to stop the proxy? All resources will be unavailable.' />
|
2023-06-15 11:51:31 +00:00
|
|
|
@if ($server->settings->is_reachable)
|
2023-05-16 09:39:18 +00:00
|
|
|
@if ($server->extra_attributes->proxy_type)
|
2023-05-22 20:30:33 +00:00
|
|
|
<div x-init="$wire.checkProxySettingsInSync">
|
|
|
|
<div wire:loading wire:target="checkProxySettingsInSync">
|
|
|
|
<x-loading />
|
2023-05-16 10:50:00 +00:00
|
|
|
</div>
|
2023-05-22 20:30:33 +00:00
|
|
|
@isset($proxy_settings)
|
|
|
|
@if ($selectedProxy->value === 'TRAEFIK_V2')
|
2023-06-02 13:15:12 +00:00
|
|
|
<form wire:submit.prevent='saveConfiguration({{ $server }})'>
|
2023-05-22 20:30:33 +00:00
|
|
|
<div class="flex items-center gap-2">
|
2023-06-02 13:15:12 +00:00
|
|
|
<h2>Proxy</h2>
|
2023-06-07 20:07:26 +00:00
|
|
|
<x-forms.button type="submit">Save</x-forms.button>
|
2023-06-08 06:39:00 +00:00
|
|
|
@if ($server->extra_attributes->proxy_status === 'exited')
|
|
|
|
<x-forms.button wire:click.prevent="switchProxy">Switch Proxy</x-forms.button>
|
|
|
|
@endif
|
2023-06-02 13:15:12 +00:00
|
|
|
<livewire:server.proxy.status :server="$server" />
|
2023-05-22 20:30:33 +00:00
|
|
|
</div>
|
2023-06-15 12:18:49 +00:00
|
|
|
<div class="pt-3 pb-4 text-sm">Traefik v2</div>
|
2023-06-02 13:15:12 +00:00
|
|
|
@if (
|
|
|
|
$server->extra_attributes->proxy_last_applied_settings &&
|
|
|
|
$server->extra_attributes->proxy_last_saved_settings !== $server->extra_attributes->proxy_last_applied_settings)
|
|
|
|
<div class="text-sm text-red-500">Configuration out of sync. Restart to get the new configs.
|
|
|
|
</div>
|
|
|
|
@endif
|
2023-06-16 08:45:27 +00:00
|
|
|
<div class="container w-full mx-auto">
|
2023-06-13 08:02:58 +00:00
|
|
|
<livewire:activity-monitor :header="true" />
|
|
|
|
</div>
|
2023-06-08 06:39:00 +00:00
|
|
|
<div class="flex flex-col gap-2">
|
|
|
|
<x-forms.textarea label="Configuration file: traefik.conf" class="text-xs" noDirty
|
|
|
|
name="proxy_settings" wire:model.defer="proxy_settings" rows="30" />
|
|
|
|
<x-forms.button wire:click.prevent="resetProxy">
|
|
|
|
Reset configuration to default
|
|
|
|
</x-forms.button>
|
|
|
|
</div>
|
2023-05-22 20:30:33 +00:00
|
|
|
</form>
|
|
|
|
@endif
|
|
|
|
@endisset
|
2023-05-15 19:14:45 +00:00
|
|
|
</div>
|
2023-05-16 09:39:18 +00:00
|
|
|
@else
|
2023-06-02 13:15:12 +00:00
|
|
|
<div>
|
2023-06-08 06:18:14 +00:00
|
|
|
<h2>Proxy</h2>
|
2023-06-08 06:39:00 +00:00
|
|
|
<div class="pt-2 pb-10 text-sm">Select a proxy you would like to use on this server.</div>
|
|
|
|
<div class="flex gap-2">
|
|
|
|
<x-forms.button class="w-32 box" wire:click="setProxy('{{ \App\Enums\ProxyTypes::TRAEFIK_V2 }}')">
|
|
|
|
Traefik
|
|
|
|
v2
|
|
|
|
</x-forms.button>
|
|
|
|
<x-forms.button disabled class="w-32 box">
|
|
|
|
Nginx
|
|
|
|
</x-forms.button>
|
|
|
|
<x-forms.button disabled class="w-32 box">
|
|
|
|
Caddy
|
|
|
|
</x-forms.button>
|
|
|
|
</div>
|
2023-06-02 13:15:12 +00:00
|
|
|
</div>
|
2023-05-15 19:14:45 +00:00
|
|
|
@endif
|
|
|
|
@else
|
2023-06-02 13:15:12 +00:00
|
|
|
<div class="text-sm">Server is not validated. Validate first.</div>
|
2023-05-03 05:23:45 +00:00
|
|
|
@endif
|
|
|
|
</div>
|