fix: proxy stop/start ui

This commit is contained in:
Andras Bacsai 2023-07-28 13:40:47 +02:00
parent 0d56d3a555
commit 6aa6f4c8a2
2 changed files with 38 additions and 19 deletions

View File

@ -93,6 +93,9 @@ function set_transanctional_email_settings()
}
function base_ip()
{
if (isDev()) {
return "http://localhost";
}
$settings = InstanceSettings::get();
return "http://{$settings->public_ipv4}";
}

View File

@ -10,7 +10,13 @@
</x-slot:modalBody>
</x-modal>
<div class="flex gap-4">
<div class="group">
<button>
<a target="_blank" href="{{ base_ip() }}:8080">
Traefik Dashboard
<x-external-link />
</a>
</button>
{{-- <div class="group">
<label tabindex="0" class="flex items-center gap-2 cursor-pointer hover:text-white"> Links
<x-chevron-down />
</label>
@ -18,26 +24,36 @@
<ul tabindex="0"
class="relative text-xs text-white normal-case rounded -ml-28 min-w-max menu bg-coolgray-200">
<li>
@if ($server->name === 'localhost')
<a target="_blank"
class="text-xs text-white rounded-none hover:no-underline hover:bg-coollabs hover:text-white"
href="{{ base_ip() }}:8080">
Traefik Dashboard
<x-external-link />
</a>
@else
<a target="_blank"
class="text-xs text-white rounded-none hover:no-underline hover:bg-coollabs hover:text-white"
href="http://{{ $server->ip }}:8080">
Traefik Dashboard
<x-external-link />
</a>
@endif
</li>
</ul>
</div>
</div>
<div class="group">
</div> --}}
<button wire:click='deploy'
class="flex items-center gap-2 cursor-pointer hover:text-white text-neutral-400">
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 text-warning" viewBox="0 0 24 24"
stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round"
stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<path
d="M10.09 4.01l.496 -.495a2 2 0 0 1 2.828 0l7.071 7.07a2 2 0 0 1 0 2.83l-7.07 7.07a2 2 0 0 1 -2.83 0l-7.07 -7.07a2 2 0 0 1 0 -2.83l3.535 -3.535h-3.988">
</path>
<path d="M7.05 11.038v-3.988"></path>
</svg>
Restart
</button>
<x-forms.button isModal noStyle modalId="stopProxy"
class="flex items-center gap-2 cursor-pointer hover:text-white text-neutral-400">
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 text-error" viewBox="0 0 24 24"
stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round"
stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<path d="M6 5m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v12a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z"></path>
<path d="M14 5m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v12a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z"></path>
</svg>
Stop
</x-forms.button>
{{-- <div class="group">
<label tabindex="0" class="flex items-center gap-2 cursor-pointer hover:text-white"> Actions
<x-chevron-down />
</label>
@ -74,7 +90,7 @@ class="rounded-none hover:bg-red-500 hover:text-white">
</li>
</ul>
</div>
</div>
</div> --}}
</div>
@else
<button wire:click='deploy' class="flex items-center gap-2 cursor-pointer hover:text-white">