2024-02-22 12:29:28 +00:00
|
|
|
<div>
|
|
|
|
<x-server.navbar :server="$server" :parameters="$parameters" />
|
|
|
|
<div class="flex gap-2">
|
2024-02-26 11:38:15 +00:00
|
|
|
<x-server.sidebar :server="$server" :parameters="$parameters" />
|
2024-02-22 12:29:28 +00:00
|
|
|
<div class="w-full">
|
|
|
|
@if ($server->isFunctional())
|
|
|
|
<div class="flex gap-2">
|
|
|
|
<div>
|
|
|
|
<div class="flex gap-2">
|
|
|
|
<h2>Dynamic Configurations</h2>
|
|
|
|
<x-forms.button wire:click='loadDynamicConfigurations'>Reload</x-forms.button>
|
|
|
|
<x-slide-over>
|
|
|
|
<x-slot:title>New Dynamic Configuration</x-slot:title>
|
|
|
|
<x-slot:content>
|
|
|
|
<livewire:server.proxy.new-dynamic-configuration />
|
|
|
|
</x-slot:content>
|
|
|
|
<button @click="slideOverOpen=true"
|
2024-03-19 14:37:16 +00:00
|
|
|
class="button">+
|
2024-02-22 12:29:28 +00:00
|
|
|
Add</button>
|
|
|
|
</x-slide-over>
|
|
|
|
</div>
|
2024-03-11 16:31:28 +00:00
|
|
|
<div class='pb-4'>You can add dynamic proxy configurations here.</div>
|
2024-02-22 12:29:28 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div wire:loading wire:target="loadDynamicConfigurations">
|
|
|
|
<x-loading text="Loading dynamic configurations..." />
|
|
|
|
</div>
|
|
|
|
<div x-init="$wire.loadDynamicConfigurations" class="flex flex-col gap-4">
|
|
|
|
@if ($contents?->isNotEmpty())
|
|
|
|
@foreach ($contents as $fileName => $value)
|
|
|
|
<div class="flex flex-col gap-2 py-2">
|
2024-03-13 08:32:42 +00:00
|
|
|
@if (str_replace('|', '.', $fileName) === 'coolify.yaml' || str_replace('|', '.', $fileName) === 'Caddyfile' || str_replace('|', '.', $fileName) === 'coolify.caddy' || str_replace('|', '.', $fileName) === 'default_redirect_404.caddy')
|
2024-02-22 12:29:28 +00:00
|
|
|
<div>
|
2024-03-24 15:00:25 +00:00
|
|
|
<h3 class="dark:text-white">File: {{ str_replace('|', '.', $fileName) }}</h3>
|
2024-02-22 12:29:28 +00:00
|
|
|
</div>
|
|
|
|
<x-forms.textarea disabled name="proxy_settings"
|
2024-03-13 08:32:42 +00:00
|
|
|
wire:model="contents.{{ $fileName }}" rows="5" />
|
2024-02-22 12:29:28 +00:00
|
|
|
@else
|
|
|
|
<livewire:server.proxy.dynamic-configuration-navbar :server_id="$server->id"
|
|
|
|
:fileName="$fileName" :value="$value" :newFile="false"
|
|
|
|
wire:key="{{ $fileName }}-{{ $loop->index }}" />
|
|
|
|
<x-forms.textarea disabled wire:model="contents.{{ $fileName }}"
|
|
|
|
rows="10" />
|
|
|
|
@endif
|
|
|
|
</div>
|
|
|
|
@endforeach
|
2024-02-22 13:45:56 +00:00
|
|
|
@else
|
|
|
|
<div wire:loading.remove> No dynamic configurations found.</div>
|
2024-02-22 12:29:28 +00:00
|
|
|
@endif
|
|
|
|
</div>
|
|
|
|
@endif
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|