Add keydb, dragonfly and clickhouse

This commit is contained in:
Andras Bacsai
2024-04-10 15:00:46 +02:00
parent 605a630411
commit c6844ff47a
54 changed files with 2405 additions and 130 deletions

View File

@@ -11,6 +11,9 @@ use App\Models\Server;
use App\Models\Service;
use App\Models\ServiceApplication;
use App\Models\ServiceDatabase;
use App\Models\StandaloneClickhouse;
use App\Models\StandaloneDragonfly;
use App\Models\StandaloneKeydb;
use App\Models\StandaloneMariadb;
use App\Models\StandaloneMongodb;
use App\Models\StandaloneMysql;
@@ -463,15 +466,14 @@ function getServiceTemplates()
function getResourceByUuid(string $uuid, ?int $teamId = null)
{
$resource = queryResourcesByUuid($uuid);
if (!is_null($teamId)) {
if (!is_null($resource) && $resource->environment->project->team_id === $teamId) {
return $resource;
}
if (is_null($teamId)) {
return null;
} else {
}
$resource = queryResourcesByUuid($uuid);
if (!is_null($resource) && $resource->environment->project->team_id === $teamId) {
return $resource;
}
return null;
}
function queryResourcesByUuid(string $uuid)
{
@@ -490,6 +492,12 @@ function queryResourcesByUuid(string $uuid)
if ($mysql) return $mysql;
$mariadb = StandaloneMariadb::whereUuid($uuid)->first();
if ($mariadb) return $mariadb;
$keydb = StandaloneKeydb::whereUuid($uuid)->first();
if ($keydb) return $keydb;
$dragonfly = StandaloneDragonfly::whereUuid($uuid)->first();
if ($dragonfly) return $dragonfly;
$clickhouse = StandaloneClickhouse::whereUuid($uuid)->first();
if ($clickhouse) return $clickhouse;
return $resource;
}
function generatTagDeployWebhook($tag_name)