Feat: service confirmation
This commit is contained in:
parent
d5b7e9ed83
commit
d94e39ccc7
3 changed files with 21 additions and 13 deletions
|
|
@ -51,7 +51,7 @@ public function restartApplication($id)
|
|||
$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 @@ public function restartDatabase($id)
|
|||
$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);
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -111,11 +111,15 @@ class="w-4 h-4 dark:text-warning text-coollabs"
|
|||
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 @@ class="w-4 h-4 dark:text-warning text-coollabs"
|
|||
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>
|
||||
|
|
|
|||
Loading…
Reference in a new issue