refactor: Update ProxyTypes enum values to use TRAEFIK instead of TRAEFIK_V2

This commit is contained in:
Andras Bacsai
2024-08-07 17:52:51 +02:00
parent 13e8d3c17c
commit 59702c6dbc
11 changed files with 28 additions and 22 deletions

View File

@@ -5,11 +5,11 @@
<button>Configuration</button>
</a>
@if ($server->proxyType() !== 'NONE')
{{-- @if ($server->proxyType() === 'TRAEFIK_V2') --}}
<a class="{{ request()->routeIs('server.proxy.dynamic-confs') ? 'dark:text-white' : '' }}"
href="{{ route('server.proxy.dynamic-confs', $parameters) }}">
<button>Dynamic Configurations</button>
</a>
{{-- @if ($server->proxyType() === 'TRAEFIK') --}}
<a class="{{ request()->routeIs('server.proxy.dynamic-confs') ? 'dark:text-white' : '' }}"
href="{{ route('server.proxy.dynamic-confs', $parameters) }}">
<button>Dynamic Configurations</button>
</a>
{{-- @endif --}}
<a class="{{ request()->routeIs('server.proxy.logs') ? 'dark:text-white' : '' }}"
href="{{ route('server.proxy.logs', $parameters) }}">

View File

@@ -1,3 +1,4 @@
@php use App\Enums\ProxyTypes; @endphp
<div>
@if ($server->proxyType())
<div x-init="$wire.loadProxyConfiguration">
@@ -20,7 +21,7 @@
</svg>Before switching proxies, please read <a class="underline dark:text-white"
href="https://coolify.io/docs/knowledge-base/server/proxies#switch-between-proxies">this</a>.
</div>
@if ($server->proxyType() === 'TRAEFIK_V2')
@if ($server->proxyType() === ProxyTypes::TRAEFIK->value)
<h4>Traefik</h4>
@elseif ($server->proxyType() === 'CADDY')
<h4>Caddy</h4>
@@ -69,7 +70,7 @@
<x-forms.button class="box" wire:click="select_proxy('NONE')">
Custom (None)
</x-forms.button>
<x-forms.button class="box" wire:click="select_proxy('TRAEFIK_V2')">
<x-forms.button class="box" wire:click="select_proxy('TRAEFIK')">
Traefik
</x-forms.button>
<x-forms.button class="box" wire:click="select_proxy('CADDY')">

View File

@@ -1,3 +1,4 @@
@php use App\Enums\ProxyTypes; @endphp
<div>
@if (
$server->proxyType() !== 'NONE' &&
@@ -12,7 +13,10 @@
</x-slide-over>
@if (data_get($server, 'proxy.status') === 'running')
<div class="flex gap-2">
@if ($currentRoute === 'server.proxy' && $traefikDashboardAvailable && $server->proxyType() === 'TRAEFIK_V2')
@if (
$currentRoute === 'server.proxy' &&
$traefikDashboardAvailable &&
$server->proxyType() === ProxyTypes::TRAEFIK->value)
<button>
<a target="_blank" href="http://{{ $serverIp }}:8080">
Traefik Dashboard