mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-15 00:17:16 +00:00
feat: require health check command for 'cmd' type with backend validation and frontend update
This commit is contained in:
1 parent
342e8e765d
commit
1ef6351701
2 files changed
+3
-2
No files matched your search
@@ -19,7 +19,7 @@ class HealthChecks extends Component
|
||||
#[Validate(['string', 'in:http,cmd'])]
|
||||
public string $healthCheckType = 'http';
|
||||
|
||||
#[Validate(['nullable', 'string'])]
|
||||
#[Validate(['nullable', 'required_if:healthCheckType,cmd', 'string'])]
|
||||
public ?string $healthCheckCommand = null;
|
||||
|
||||
#[Validate(['string'])]
|
||||
@@ -128,6 +128,7 @@ class HealthChecks extends Component
|
||||
public function instantSave()
|
||||
{
|
||||
$this->authorize('update', $this->resource);
|
||||
$this->validate();
|
||||
|
||||
// Sync component properties to model
|
||||
$this->resource->health_check_enabled = $this->healthCheckEnabled;
|
||||
|
||||
Reference in new issue
Block a user