From 2639bf92add8b8780d7d272a2693397282645c1f Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Fri, 13 Oct 2023 14:35:02 +0200 Subject: [PATCH] fix: traefik dashboard ip --- app/Http/Livewire/Server/Proxy/Deploy.php | 13 ++++++++++++- .../views/livewire/server/proxy/deploy.blade.php | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/app/Http/Livewire/Server/Proxy/Deploy.php b/app/Http/Livewire/Server/Proxy/Deploy.php index 44ff4b917..39995e077 100644 --- a/app/Http/Livewire/Server/Proxy/Deploy.php +++ b/app/Http/Livewire/Server/Proxy/Deploy.php @@ -12,10 +12,17 @@ class Deploy extends Component public Server $server; public bool $traefikDashboardAvailable = false; public ?string $currentRoute = null; + public ?string $serverIp = null; + protected $listeners = ['proxyStatusUpdated', 'traefikDashboardAvailable', 'serverRefresh' => 'proxyStatusUpdated', "checkProxy", "startProxy"]; public function mount() { + if ($this->server->id === 0) { + $this->serverIp = base_ip(); + } else { + $this->serverIp = $this->server->ip; + } $this->currentRoute = request()->route()->getName(); } public function traefikDashboardAvailable(bool $data) @@ -26,7 +33,11 @@ class Deploy extends Component { $this->server->refresh(); } - public function checkProxy() { + public function ip() + { + } + public function checkProxy() + { try { CheckProxy::run($this->server); $this->emit('startProxyPolling'); diff --git a/resources/views/livewire/server/proxy/deploy.blade.php b/resources/views/livewire/server/proxy/deploy.blade.php index 933133408..afb1e25e5 100644 --- a/resources/views/livewire/server/proxy/deploy.blade.php +++ b/resources/views/livewire/server/proxy/deploy.blade.php @@ -12,7 +12,7 @@
@if ($currentRoute === 'server.proxy' && $traefikDashboardAvailable)