Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

Feat: service confirmation

ayntk-aid94e39ccc773
diff --git a/app/Livewire/Project/Service/Configuration.php b/app/Livewire/Project/Service/Configuration.php
index c82012aaa0..a55af57771 100644
--- a/app/Livewire/Project/Service/Configuration.php
+++ b/app/Livewire/Project/Service/Configuration.php
@@ -51,7 +51,7 @@ class Configuration extends Component
$application = $this->service->applications->find($id);
if ($application) {
$application->restart();
- $this->dispatch('success', 'Application restarted successfully.');
+ $this->dispatch('success', 'Service application restarted successfully.');
}
} catch (\Exception $e) {
return handleError($e, $this);
@@ -64,7 +64,7 @@ class Configuration extends Component
$database = $this->service->databases->find($id);
if ($database) {
$database->restart();
- $this->dispatch('success', 'Database restarted successfully.');
+ $this->dispatch('success', 'Service database restarted successfully.');
}
} catch (\Exception $e) {
return handleError($e, $this);
diff --git a/resources/views/livewire/project/database/heading.blade.php b/resources/views/livewire/project/database/heading.blade.php
index a9e2088569..07d52034f2 100644
--- a/resources/views/livewire/project/database/heading.blade.php
+++ b/resources/views/livewire/project/database/heading.blade.php
@@ -33,7 +33,7 @@
title="Confirm Database Restart?"
buttonTitle="Restart"
submitAction="restart"
- :actions="['This database will be restarted.', 'If the database is currently in use data could be lost.']"
+ :actions="['This database will be unavailable during the restart.', 'If the database is currently in use data could be lost.']"
:confirmWithText="false"
:confirmWithPassword="false"
step2ButtonText="Restart Database"
diff --git a/resources/views/livewire/project/service/configuration.blade.php b/resources/views/livewire/project/service/configuration.blade.php
index 5c6fe87fd5..89e070d6cb 100644
--- a/resources/views/livewire/project/service/configuration.blade.php
+++ b/resources/views/livewire/project/service/configuration.blade.php
@@ -111,11 +111,15 @@
Settings
</a>
@if (str($application->status)->contains('running'))
- <x-modal-confirmation action="restartApplication({{ $application->id }})"
- isErrorButton buttonTitle="Restart">
- This application will be unavailable during the restart. <br>Please think
- again.
- </x-modal-confirmation>
+ <x-modal-confirmation
+ title="Confirm Service Application Restart?"
+ buttonTitle="Restart"
+ submitAction="restartApplication({{ $application->id }})"
+ :actions="['The selected service application will be unavailable during the restart.', 'If the service application is currently in use data could be lost.']"
+ :confirmWithText="false"
+ :confirmWithPassword="false"
+ step2ButtonText="Restart Service Container"
+ />
@endif
</div>
</div>
@@ -155,11 +159,15 @@
Settings
</a>
@if (str($database->status)->contains('running'))
- <x-modal-confirmation action="restartDatabase({{ $database->id }})"
- isErrorButton buttonTitle="Restart">
- This database will be unavailable during the restart. <br>Please think
- again.
- </x-modal-confirmation>
+ <x-modal-confirmation
+ title="Confirm Service Database Restart?"
+ buttonTitle="Restart"
+ submitAction="restartDatabase({{ $database->id }})"
+ :actions="['This service database will be unavailable during the restart.', 'If the service database is currently in use data could be lost.']"
+ :confirmWithText="false"
+ :confirmWithPassword="false"
+ step2ButtonText="Restart Database"
+ />
@endif
</div>
</div>