diff --git a/app/Actions/Proxy/CheckConfigurationSync.php b/app/Actions/Proxy/CheckConfigurationSync.php index 4db45367a..c1a261796 100644 --- a/app/Actions/Proxy/CheckConfigurationSync.php +++ b/app/Actions/Proxy/CheckConfigurationSync.php @@ -16,10 +16,7 @@ class CheckConfigurationSync if ($reset || is_null($proxy_configuration)) { $proxy_configuration = Str::of(generate_default_proxy_configuration($server))->trim()->value; - resolve(SaveConfigurationSync::class)($server, $proxy_configuration); - return $proxy_configuration; } - return $proxy_configuration; } } diff --git a/app/Actions/Proxy/SaveConfigurationSync.php b/app/Actions/Proxy/SaveConfigurationSync.php index 8be3ca9db..d58dad0c7 100644 --- a/app/Actions/Proxy/SaveConfigurationSync.php +++ b/app/Actions/Proxy/SaveConfigurationSync.php @@ -7,11 +7,12 @@ use Illuminate\Support\Str; class SaveConfigurationSync { - public function __invoke(Server $server, string $configuration) + public function __invoke(Server $server) { try { + $proxy_settings = resolve(CheckConfigurationSync::class)($server, true); $proxy_path = get_proxy_path(); - $docker_compose_yml_base64 = base64_encode($configuration); + $docker_compose_yml_base64 = base64_encode($proxy_settings); $server->proxy->last_saved_settings = Str::of($docker_compose_yml_base64)->pipe('md5')->value; $server->save(); diff --git a/app/Http/Livewire/Server/Proxy.php b/app/Http/Livewire/Server/Proxy.php index 7f0a11f98..174d426b5 100644 --- a/app/Http/Livewire/Server/Proxy.php +++ b/app/Http/Livewire/Server/Proxy.php @@ -48,7 +48,7 @@ class Proxy extends Component public function submit() { try { - resolve(SaveConfigurationSync::class)($this->server, $this->proxy_settings); + resolve(SaveConfigurationSync::class)($this->server); $this->server->proxy->redirect_url = $this->redirect_url; $this->server->save(); diff --git a/app/Http/Livewire/Server/Proxy/Deploy.php b/app/Http/Livewire/Server/Proxy/Deploy.php index c6d804a15..df369c49a 100644 --- a/app/Http/Livewire/Server/Proxy/Deploy.php +++ b/app/Http/Livewire/Server/Proxy/Deploy.php @@ -22,7 +22,7 @@ class Deploy extends Component $this->server->proxy->last_applied_settings && $this->server->proxy->last_saved_settings !== $this->server->proxy->last_applied_settings ) { - resolve(SaveConfigurationSync::class)($this->server, $this->proxy_settings); + resolve(SaveConfigurationSync::class)($this->server); } $activity = resolve(StartProxy::class)($this->server); diff --git a/app/Http/Livewire/Server/Proxy/Modal.php b/app/Http/Livewire/Server/Proxy/Modal.php new file mode 100644 index 000000000..2674abe3d --- /dev/null +++ b/app/Http/Livewire/Server/Proxy/Modal.php @@ -0,0 +1,16 @@ +emit('proxyStatusUpdated'); + } +} diff --git a/resources/views/components/server/navbar.blade.php b/resources/views/components/server/navbar.blade.php index 382e968c3..5aaafead1 100644 --- a/resources/views/components/server/navbar.blade.php +++ b/resources/views/components/server/navbar.blade.php @@ -1,4 +1,5 @@
+

Server

@if ($server->settings->is_reachable) diff --git a/resources/views/livewire/server/proxy.blade.php b/resources/views/livewire/server/proxy.blade.php index 0b38ad940..59ce5bf4c 100644 --- a/resources/views/livewire/server/proxy.blade.php +++ b/resources/views/livewire/server/proxy.blade.php @@ -1,16 +1,6 @@
@if ($server->isFunctional()) @if (data_get($server,'proxy.type')) - - - - - - - Close - - -
@if ($selectedProxy === 'TRAEFIK_V2')
diff --git a/resources/views/livewire/server/proxy/modal.blade.php b/resources/views/livewire/server/proxy/modal.blade.php new file mode 100644 index 000000000..3dfb2d31c --- /dev/null +++ b/resources/views/livewire/server/proxy/modal.blade.php @@ -0,0 +1,12 @@ +
+ + + + + + + Close + + + +
diff --git a/resources/views/livewire/server/proxy/status.blade.php b/resources/views/livewire/server/proxy/status.blade.php index 3aec00746..db496f561 100644 --- a/resources/views/livewire/server/proxy/status.blade.php +++ b/resources/views/livewire/server/proxy/status.blade.php @@ -1,3 +1,4 @@ +
@if ($server->proxy->status === 'running')