fix: service status indicator + oauth saving

This commit is contained in:
Andras Bacsai
2024-12-13 12:03:05 +01:00
parent 2a77d9d8ce
commit 4901b12279
11 changed files with 47 additions and 36 deletions

View File

@@ -46,7 +46,7 @@ class Service extends BaseModel
protected $guarded = [];
protected $appends = ['server_status'];
protected $appends = ['server_status', 'status'];
protected static function booted()
{
@@ -105,12 +105,12 @@ class Service extends BaseModel
public function isRunning()
{
return (bool) str($this->status())->contains('running');
return (bool) str($this->status)->contains('running');
}
public function isExited()
{
return (bool) str($this->status())->contains('exited');
return (bool) str($this->status)->contains('exited');
}
public function type()
@@ -213,7 +213,7 @@ class Service extends BaseModel
instant_remote_process(["docker network rm {$uuid}"], $server, false);
}
public function status()
public function getStatusAttribute()
{
$applications = $this->applications;
$databases = $this->databases;