fix: use Auth(), add new db proxy stop event refactor clickhouse view

This commit is contained in:
Andras Bacsai
2024-11-04 14:18:16 +01:00
parent 1ab459a09b
commit 7fb1a1fc75
22 changed files with 236 additions and 123 deletions

View File

@@ -2,7 +2,7 @@
namespace App\Actions\Database;
use App\Events\DatabaseStatusChanged;
use App\Events\DatabaseProxyStopped;
use App\Models\ServiceDatabase;
use App\Models\StandaloneClickhouse;
use App\Models\StandaloneDragonfly;
@@ -27,7 +27,11 @@ class StopDatabaseProxy
$server = data_get($database, 'service.server');
}
instant_remote_process(["docker rm -f {$uuid}-proxy"], $server);
$database->is_public = false;
$database->save();
DatabaseStatusChanged::dispatch();
DatabaseProxyStopped::dispatch();
}
}