From 2262b99fb49d3814c8f96bd09d20ff4ffba22056 Mon Sep 17 00:00:00 2001 From: Spencer Flagg Date: Fri, 23 Jun 2023 13:24:06 +0200 Subject: [PATCH 1/3] Fixed typos in install.sh comment --- scripts/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/install.sh b/scripts/install.sh index 629a89cfa..5b92f586e 100644 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -1,5 +1,5 @@ #!/bin/bash -## Do not modify this file. You will lost the ability to installation and autoupdate! +## Do not modify this file. You will lose the ability to install and auto-update! ########### ## Always run "php artisan app:sync-to-bunny-cdn --env=secrets" or "scripts/run sync-bunny" if you update this file. From 0bade9add30e40cffea715d5f219029f2a37eab0 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Fri, 23 Jun 2023 14:20:47 +0200 Subject: [PATCH 2/3] Remove instance 404 redirect --- app/Http/Livewire/Server/Form.php | 2 +- app/Http/Livewire/Settings/Configuration.php | 5 +--- .../DeployedWithErrorNotification.php | 2 +- config/version.php | 2 +- ...efault_redirect_from_instance_settings.php | 28 +++++++++++++++++++ .../views/livewire/server/form.blade.php | 3 +- .../views/livewire/server/proxy.blade.php | 7 ++--- .../livewire/settings/configuration.blade.php | 2 -- versions.json | 2 +- 9 files changed, 37 insertions(+), 16 deletions(-) create mode 100644 database/migrations/2023_06_23_114132_remove_default_redirect_from_instance_settings.php diff --git a/app/Http/Livewire/Server/Form.php b/app/Http/Livewire/Server/Form.php index 44a94e31e..72d32243f 100644 --- a/app/Http/Livewire/Server/Form.php +++ b/app/Http/Livewire/Server/Form.php @@ -21,7 +21,7 @@ class Form extends Component 'server.port' => 'required', 'server.settings.is_reachable' => 'required', 'server.settings.is_part_of_swarm' => 'required', - 'wildcard_domain' => 'nullable|string' + 'wildcard_domain' => 'nullable|url', ]; protected $validationAttributes = [ 'server.name' => 'name', diff --git a/app/Http/Livewire/Settings/Configuration.php b/app/Http/Livewire/Settings/Configuration.php index 4746cf299..d0ce9435e 100644 --- a/app/Http/Livewire/Settings/Configuration.php +++ b/app/Http/Livewire/Settings/Configuration.php @@ -23,13 +23,11 @@ class Configuration extends Component 'settings.fqdn' => 'nullable', 'settings.public_port_min' => 'required', 'settings.public_port_max' => 'required', - 'settings.default_redirect_404' => 'nullable', ]; protected $validationAttributes = [ 'settings.fqdn' => 'FQDN', 'settings.public_port_min' => 'Public port min', 'settings.public_port_max' => 'Public port max', - 'settings.default_redirect_404' => 'Default redirect 404', ]; public function mount() { @@ -139,8 +137,7 @@ public function submit() $this->server = Server::findOrFail(0); $this->setup_instance_fqdn(); - setup_default_redirect_404(redirect_url: $this->settings->default_redirect_404, server: $this->server); - if ($this->settings->fqdn || $this->settings->default_redirect_404) { + if ($this->settings->fqdn) { dispatch(new InstanceProxyCheckJob()); } $this->emit('success', 'Instance settings updated successfully!'); diff --git a/app/Notifications/Notifications/Application/DeployedWithErrorNotification.php b/app/Notifications/Notifications/Application/DeployedWithErrorNotification.php index ef4c81770..1418b7e8e 100644 --- a/app/Notifications/Notifications/Application/DeployedWithErrorNotification.php +++ b/app/Notifications/Notifications/Application/DeployedWithErrorNotification.php @@ -24,7 +24,7 @@ class DeployedWithErrorNotification extends Notification implements ShouldQueue public string|null $deployment_url = null; public string $project_uuid; public string $environment_name; - public string $fqdn; + public string|null $fqdn; public function __construct(Application $application, string $deployment_uuid, ApplicationPreview|null $preview) { diff --git a/config/version.php b/config/version.php index 300506ef5..b343fad81 100644 --- a/config/version.php +++ b/config/version.php @@ -1,3 +1,3 @@ dropColumn('default_redirect_404'); + }); + } + + /** + * Reverse the migrations. + */ + public function down(): void + { + Schema::table('instance_settings', function (Blueprint $table) { + $table->string('default_redirect_404')->nullable(); + }); + } +}; diff --git a/resources/views/livewire/server/form.blade.php b/resources/views/livewire/server/form.blade.php index d6d02489f..4a88910ac 100644 --- a/resources/views/livewire/server/form.blade.php +++ b/resources/views/livewire/server/form.blade.php @@ -16,9 +16,8 @@
- - {{-- --}}
diff --git a/resources/views/livewire/server/proxy.blade.php b/resources/views/livewire/server/proxy.blade.php index c009183c4..42b62c6ff 100644 --- a/resources/views/livewire/server/proxy.blade.php +++ b/resources/views/livewire/server/proxy.blade.php @@ -27,10 +27,9 @@ configs. @endif - @if ($server->id !== 0) - - @endif +
diff --git a/resources/views/livewire/settings/configuration.blade.php b/resources/views/livewire/settings/configuration.blade.php index fa2736e1e..2a52c1116 100644 --- a/resources/views/livewire/settings/configuration.blade.php +++ b/resources/views/livewire/settings/configuration.blade.php @@ -9,8 +9,6 @@
-
{{--
diff --git a/versions.json b/versions.json index 1b4ae8856..8baf727d0 100644 --- a/versions.json +++ b/versions.json @@ -4,7 +4,7 @@ "version": "3.12.32" }, "v4": { - "version": "4.0.0-beta.13" + "version": "4.0.0-beta.14" } } } \ No newline at end of file From 019a1fd44834b353387135451383ca1b55a5f680 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Fri, 23 Jun 2023 14:35:13 +0200 Subject: [PATCH 3/3] Better proxy loading ui --- resources/views/components/loading.blade.php | 7 +- .../views/livewire/server/proxy.blade.php | 104 +++++++++--------- 2 files changed, 57 insertions(+), 54 deletions(-) diff --git a/resources/views/components/loading.blade.php b/resources/views/components/loading.blade.php index 966921963..2cb8b894c 100644 --- a/resources/views/components/loading.blade.php +++ b/resources/views/components/loading.blade.php @@ -1 +1,6 @@ -class(['bg-warning loading', 'loading-spinner' => !$attributes->has('class')]) }}> +@props(['text' => null]) + + {{ $text }}class(['bg-warning loading', 'loading-spinner' => !$attributes->has('class')]) }}> + + diff --git a/resources/views/livewire/server/proxy.blade.php b/resources/views/livewire/server/proxy.blade.php index 42b62c6ff..4ba4444e1 100644 --- a/resources/views/livewire/server/proxy.blade.php +++ b/resources/views/livewire/server/proxy.blade.php @@ -4,66 +4,64 @@ @if ($server->settings->is_reachable) @if ($server->proxy->type)
-
- -
-
- @if ($proxy_settings) - @if ($selectedProxy->value === 'TRAEFIK_V2') -
-
-

Proxy

- Save - @if ($server->proxy->status === 'exited') - Switch Proxy - @endif - -
-
Traefik v2
- @if ( - $server->proxy->last_applied_settings && - $server->proxy->last_saved_settings !== $server->proxy->last_applied_settings) -
Configuration out of sync. Restart to get the new - configs. -
- @endif - -
- -
-
+ @if ($selectedProxy->value === 'TRAEFIK_V2') + +
+

Proxy

+ Save + @if ($server->proxy->status === 'exited') + Switch Proxy + @endif + +
+ +
Traefik v2
+ @if ( + $server->proxy->last_applied_settings && + $server->proxy->last_saved_settings !== $server->proxy->last_applied_settings) +
Configuration out of sync. Restart to get the new + configs. +
+ @endif + +
+ +
+
+ +
+
+ @if ($proxy_settings) +
Reset configuration to default
- - @endif - @else -
Server is not validated. Validate first.
- @endif + @endif +
+ + @endif + @else +
+

Proxy

+
Select a proxy you would like to use on this server.
+
+ + Traefik + v2 + + + Nginx + + + Caddy + +
-
- @else -
-

Proxy

-
Select a proxy you would like to use on this server.
-
- - Traefik - v2 - - - Nginx - - - Caddy - -
-
@endif @else
Server is not validated. Validate first.