lots of UI fixes

This commit is contained in:
Andras Bacsai
2023-07-14 13:38:24 +02:00
parent 2f613aed26
commit 8b128c1bbe
17 changed files with 188 additions and 145 deletions

View File

@@ -94,10 +94,14 @@ class Server extends BaseModel
return Server::whereTeamId(session('currentTeam')->id)->with('settings')->select($selectArray->all())->orderBy('name');
}
static public function validated()
static public function isReachable()
{
return Server::ownedByCurrentTeam()->whereRelation('settings', 'is_reachable', true);
}
static public function isUsable()
{
return Server::ownedByCurrentTeam()->whereRelation('settings', 'is_reachable', true)->whereRelation('settings', 'is_usable', true);
}
static public function destinationsByServer(string $server_id)
{
@@ -106,4 +110,4 @@ class Server extends BaseModel
$swarmDocker = collect($server->swarmDockers->all());
return $standaloneDocker->concat($swarmDocker);
}
}
}