feat: new server checking job

feat: show if the server  has problems on ui
This commit is contained in:
Andras Bacsai
2024-08-05 15:48:15 +02:00
parent bc48b42ff1
commit e4b92bb660
19 changed files with 539 additions and 383 deletions

View File

@@ -14,7 +14,7 @@ class StandalonePostgresql extends BaseModel
protected $guarded = [];
protected $appends = ['internal_db_url', 'external_db_url', 'database_type'];
protected $appends = ['internal_db_url', 'external_db_url', 'database_type', 'server_status'];
protected $casts = [
'init_scripts' => 'array',
@@ -46,6 +46,15 @@ class StandalonePostgresql extends BaseModel
return database_configuration_dir()."/{$this->uuid}";
}
protected function serverStatus(): Attribute
{
return Attribute::make(
get: function () {
return $this->destination->server->isFunctional();
}
);
}
public function delete_configurations()
{
$server = data_get($this, 'destination.server');