mirror of
https://github.com/tiennm99/coolify.git
synced 2026-04-22 01:21:26 +00:00
Added confirmation modal for enabling healtcheck + replaced enable checkbox with a button
This commit is contained in:
@@ -47,6 +47,18 @@ class HealthChecks extends Component
|
||||
}
|
||||
}
|
||||
|
||||
public function toggleHealthcheck()
|
||||
{
|
||||
try {
|
||||
$this->authorize('update', $this->resource);
|
||||
$this->resource->health_check_enabled = !$this->resource->health_check_enabled;
|
||||
$this->resource->save();
|
||||
$this->dispatch('success', 'Health check ' . ($this->resource->health_check_enabled ? 'enabled' : 'disabled') . '.');
|
||||
} catch (\Throwable $e) {
|
||||
return handleError($e, $this);
|
||||
}
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.project.shared.health-checks');
|
||||
|
||||
Reference in New Issue
Block a user