2023-05-03 05:23:45 +00:00
|
|
|
<div>
|
2023-05-16 09:39:18 +00:00
|
|
|
|
2023-05-15 19:14:45 +00:00
|
|
|
@if ($server->settings->is_validated)
|
2023-05-16 09:39:18 +00:00
|
|
|
<div class="flex items-center gap-2">
|
|
|
|
<h3>Proxy</h3>
|
|
|
|
<div>{{ $server->extra_attributes->proxy_status }}</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
@if ($server->extra_attributes->proxy_type)
|
2023-05-15 19:14:45 +00:00
|
|
|
<div wire:poll="proxyStatus">
|
|
|
|
@if (
|
2023-05-16 09:39:18 +00:00
|
|
|
$server->extra_attributes->last_applied_proxy_settings &&
|
|
|
|
$server->extra_attributes->last_saved_proxy_settings !== $server->extra_attributes->last_applied_proxy_settings)
|
2023-05-15 19:14:45 +00:00
|
|
|
<div class="text-red-500">Configuration out of sync.</div>
|
|
|
|
@endif
|
2023-05-16 09:39:18 +00:00
|
|
|
@if ($server->extra_attributes->proxy_status !== 'running')
|
2023-05-15 19:14:45 +00:00
|
|
|
<x-inputs.button isBold wire:click="installProxy">
|
2023-05-16 09:39:18 +00:00
|
|
|
Start
|
2023-05-15 19:14:45 +00:00
|
|
|
</x-inputs.button>
|
2023-05-16 09:39:18 +00:00
|
|
|
@else
|
|
|
|
<x-inputs.button isWarning wire:click="stopProxy">Stop</x-inputs.button>
|
2023-05-15 19:14:45 +00:00
|
|
|
@endif
|
|
|
|
<span x-data="{ showConfiguration: false }">
|
2023-05-15 20:17:31 +00:00
|
|
|
<x-inputs.button isBold x-on:click.prevent="showConfiguration = !showConfiguration">Show
|
|
|
|
Configuration
|
2023-05-15 19:14:45 +00:00
|
|
|
</x-inputs.button>
|
|
|
|
<div class="pt-4">
|
|
|
|
<livewire:activity-monitor />
|
2023-05-15 11:45:37 +00:00
|
|
|
</div>
|
2023-05-15 19:14:45 +00:00
|
|
|
<template x-if="showConfiguration">
|
|
|
|
<div x-init="$wire.checkProxySettingsInSync">
|
|
|
|
<h3>Configuration</h3>
|
|
|
|
<div wire:loading wire:target="checkProxySettingsInSync">
|
|
|
|
<x-proxy.loading />
|
|
|
|
</div>
|
2023-05-16 09:39:18 +00:00
|
|
|
@isset($proxy_settings)
|
2023-05-15 19:14:45 +00:00
|
|
|
<form wire:submit.prevent='saveConfiguration'>
|
2023-05-16 09:39:18 +00:00
|
|
|
<div class="pb-2">
|
|
|
|
<x-inputs.button isBold>Save</x-inputs.button>
|
|
|
|
<x-inputs.button wire:click.prevent="resetProxy">
|
|
|
|
Reset Configuration
|
|
|
|
</x-inputs.button>
|
|
|
|
</div>
|
2023-05-15 19:14:45 +00:00
|
|
|
<textarea wire:model.defer="proxy_settings" class="w-full" rows="30"></textarea>
|
|
|
|
</form>
|
|
|
|
@endisset
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</span>
|
|
|
|
</div>
|
2023-05-16 09:39:18 +00:00
|
|
|
@else
|
|
|
|
<select wire:model="selectedProxy">
|
|
|
|
<option value="{{ \App\Enums\ProxyTypes::TRAEFIK_V2 }}">
|
|
|
|
{{ \App\Enums\ProxyTypes::TRAEFIK_V2 }}
|
|
|
|
</option>
|
|
|
|
</select>
|
|
|
|
<x-inputs.button isBold wire:click="setProxy">Set Proxy</x-inputs.button>
|
2023-05-15 19:14:45 +00:00
|
|
|
@endif
|
|
|
|
@else
|
|
|
|
<p>Server is not validated. Validate first.</p>
|
2023-05-03 05:23:45 +00:00
|
|
|
@endif
|
2023-05-15 19:14:45 +00:00
|
|
|
|
2023-05-03 05:23:45 +00:00
|
|
|
</div>
|