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 @@ class Configuration extends Component $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/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/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 @@