diff --git a/app/Livewire/Project/Database/Clickhouse/General.php b/app/Livewire/Project/Database/Clickhouse/General.php index 7fe9c1ce0..33a339e84 100644 --- a/app/Livewire/Project/Database/Clickhouse/General.php +++ b/app/Livewire/Project/Database/Clickhouse/General.php @@ -4,12 +4,14 @@ namespace App\Livewire\Project\Database\Clickhouse; use App\Actions\Database\StartDatabaseProxy; use App\Actions\Database\StopDatabaseProxy; +use App\Models\Server; use App\Models\StandaloneClickhouse; use Exception; use Livewire\Component; class General extends Component { + public Server $server; public StandaloneClickhouse $database; public ?string $db_url = null; public ?string $db_url_public = null; @@ -43,10 +45,11 @@ class General extends Component if ($this->database->is_public) { $this->db_url_public = $this->database->get_db_url(); } + $this->server = data_get($this->database,'destination.server'); } public function instantSaveAdvanced() { try { - if (!$this->database->destination->server->isLogDrainEnabled()) { + if (!$this->server->isLogDrainEnabled()) { $this->database->is_log_drain_enabled = false; $this->dispatch('error', 'Log drain is not enabled on the server. Please enable it first.'); return; diff --git a/app/Livewire/Project/Database/Dragonfly/General.php b/app/Livewire/Project/Database/Dragonfly/General.php index 0a4adf269..d9f1290bc 100644 --- a/app/Livewire/Project/Database/Dragonfly/General.php +++ b/app/Livewire/Project/Database/Dragonfly/General.php @@ -4,6 +4,7 @@ namespace App\Livewire\Project\Database\Dragonfly; use App\Actions\Database\StartDatabaseProxy; use App\Actions\Database\StopDatabaseProxy; +use App\Models\Server; use App\Models\StandaloneDragonfly; use Exception; use Livewire\Component; @@ -12,6 +13,7 @@ class General extends Component { protected $listeners = ['refresh']; + public Server $server; public StandaloneDragonfly $database; public ?string $db_url = null; public ?string $db_url_public = null; @@ -41,10 +43,11 @@ class General extends Component if ($this->database->is_public) { $this->db_url_public = $this->database->get_db_url(); } + $this->server = data_get($this->database,'destination.server'); } public function instantSaveAdvanced() { try { - if (!$this->database->destination->server->isLogDrainEnabled()) { + if (!$this->server->isLogDrainEnabled()) { $this->database->is_log_drain_enabled = false; $this->dispatch('error', 'Log drain is not enabled on the server. Please enable it first.'); return; diff --git a/app/Livewire/Project/Database/Keydb/General.php b/app/Livewire/Project/Database/Keydb/General.php index 536f743f2..222b8a2fc 100644 --- a/app/Livewire/Project/Database/Keydb/General.php +++ b/app/Livewire/Project/Database/Keydb/General.php @@ -4,6 +4,7 @@ namespace App\Livewire\Project\Database\Keydb; use App\Actions\Database\StartDatabaseProxy; use App\Actions\Database\StopDatabaseProxy; +use App\Models\Server; use App\Models\StandaloneKeydb; use Exception; use Livewire\Component; @@ -12,6 +13,7 @@ class General extends Component { protected $listeners = ['refresh']; + public Server $server; public StandaloneKeydb $database; public ?string $db_url = null; public ?string $db_url_public = null; @@ -43,10 +45,12 @@ class General extends Component if ($this->database->is_public) { $this->db_url_public = $this->database->get_db_url(); } + $this->server = data_get($this->database,'destination.server'); + } public function instantSaveAdvanced() { try { - if (!$this->database->destination->server->isLogDrainEnabled()) { + if (!$this->server->isLogDrainEnabled()) { $this->database->is_log_drain_enabled = false; $this->dispatch('error', 'Log drain is not enabled on the server. Please enable it first.'); return; diff --git a/app/Livewire/Project/Database/Mariadb/General.php b/app/Livewire/Project/Database/Mariadb/General.php index c0c67898f..f0a7deb82 100644 --- a/app/Livewire/Project/Database/Mariadb/General.php +++ b/app/Livewire/Project/Database/Mariadb/General.php @@ -4,6 +4,7 @@ namespace App\Livewire\Project\Database\Mariadb; use App\Actions\Database\StartDatabaseProxy; use App\Actions\Database\StopDatabaseProxy; +use App\Models\Server; use App\Models\StandaloneMariadb; use Exception; use Livewire\Component; @@ -12,6 +13,7 @@ class General extends Component { protected $listeners = ['refresh']; + public Server $server; public StandaloneMariadb $database; public ?string $db_url = null; public ?string $db_url_public = null; @@ -50,10 +52,12 @@ class General extends Component if ($this->database->is_public) { $this->db_url_public = $this->database->get_db_url(); } + $this->server = data_get($this->database,'destination.server'); + } public function instantSaveAdvanced() { try { - if (!$this->database->destination->server->isLogDrainEnabled()) { + if (!$this->server->isLogDrainEnabled()) { $this->database->is_log_drain_enabled = false; $this->dispatch('error', 'Log drain is not enabled on the server. Please enable it first.'); return; diff --git a/app/Livewire/Project/Database/Mongodb/General.php b/app/Livewire/Project/Database/Mongodb/General.php index 3c1271065..3cce20baf 100644 --- a/app/Livewire/Project/Database/Mongodb/General.php +++ b/app/Livewire/Project/Database/Mongodb/General.php @@ -4,6 +4,7 @@ namespace App\Livewire\Project\Database\Mongodb; use App\Actions\Database\StartDatabaseProxy; use App\Actions\Database\StopDatabaseProxy; +use App\Models\Server; use App\Models\StandaloneMongodb; use Exception; use Livewire\Component; @@ -12,6 +13,7 @@ class General extends Component { protected $listeners = ['refresh']; + public Server $server; public StandaloneMongodb $database; public ?string $db_url = null; public ?string $db_url_public = null; @@ -48,11 +50,13 @@ class General extends Component if ($this->database->is_public) { $this->db_url_public = $this->database->get_db_url(); } + $this->server = data_get($this->database,'destination.server'); + } public function instantSaveAdvanced() { try { - if (!$this->database->destination->server->isLogDrainEnabled()) { + if (!$this->server->isLogDrainEnabled()) { $this->database->is_log_drain_enabled = false; $this->dispatch('error', 'Log drain is not enabled on the server. Please enable it first.'); return; diff --git a/app/Livewire/Project/Database/Mysql/General.php b/app/Livewire/Project/Database/Mysql/General.php index a1fb9201a..d7d5ae89f 100644 --- a/app/Livewire/Project/Database/Mysql/General.php +++ b/app/Livewire/Project/Database/Mysql/General.php @@ -4,6 +4,7 @@ namespace App\Livewire\Project\Database\Mysql; use App\Actions\Database\StartDatabaseProxy; use App\Actions\Database\StopDatabaseProxy; +use App\Models\Server; use App\Models\StandaloneMysql; use Exception; use Livewire\Component; @@ -13,6 +14,7 @@ class General extends Component protected $listeners = ['refresh']; public StandaloneMysql $database; + public Server $server; public ?string $db_url = null; public ?string $db_url_public = null; @@ -50,11 +52,12 @@ class General extends Component if ($this->database->is_public) { $this->db_url_public = $this->database->get_db_url(); } + $this->server = data_get($this->database,'destination.server'); } public function instantSaveAdvanced() { try { - if (!$this->database->destination->server->isLogDrainEnabled()) { + if (!$this->server->isLogDrainEnabled()) { $this->database->is_log_drain_enabled = false; $this->dispatch('error', 'Log drain is not enabled on the server. Please enable it first.'); return; diff --git a/app/Livewire/Project/Database/Postgresql/General.php b/app/Livewire/Project/Database/Postgresql/General.php index 79d91e7aa..4d5d918de 100644 --- a/app/Livewire/Project/Database/Postgresql/General.php +++ b/app/Livewire/Project/Database/Postgresql/General.php @@ -4,6 +4,7 @@ namespace App\Livewire\Project\Database\Postgresql; use App\Actions\Database\StartDatabaseProxy; use App\Actions\Database\StopDatabaseProxy; +use App\Models\Server; use App\Models\StandalonePostgresql; use Exception; use Livewire\Component; @@ -13,6 +14,7 @@ use function Aws\filter; class General extends Component { public StandalonePostgresql $database; + public Server $server; public string $new_filename; public string $new_content; public ?string $db_url = null; @@ -57,11 +59,12 @@ class General extends Component if ($this->database->is_public) { $this->db_url_public = $this->database->get_db_url(); } + $this->server = data_get($this->database,'destination.server'); } public function instantSaveAdvanced() { try { - if (!$this->database->destination->server->isLogDrainEnabled()) { + if (!$this->server->isLogDrainEnabled()) { $this->database->is_log_drain_enabled = false; $this->dispatch('error', 'Log drain is not enabled on the server. Please enable it first.'); return; diff --git a/app/Livewire/Project/Database/Redis/General.php b/app/Livewire/Project/Database/Redis/General.php index a894626b0..aafd8495c 100644 --- a/app/Livewire/Project/Database/Redis/General.php +++ b/app/Livewire/Project/Database/Redis/General.php @@ -4,6 +4,7 @@ namespace App\Livewire\Project\Database\Redis; use App\Actions\Database\StartDatabaseProxy; use App\Actions\Database\StopDatabaseProxy; +use App\Models\Server; use App\Models\StandaloneRedis; use Exception; use Livewire\Component; @@ -12,6 +13,7 @@ class General extends Component { protected $listeners = ['refresh']; + public Server $server; public StandaloneRedis $database; public ?string $db_url = null; public ?string $db_url_public = null; @@ -43,10 +45,12 @@ class General extends Component if ($this->database->is_public) { $this->db_url_public = $this->database->get_db_url(); } + $this->server = data_get($this->database,'destination.server'); + } public function instantSaveAdvanced() { try { - if (!$this->database->destination->server->isLogDrainEnabled()) { + if (!$this->server->isLogDrainEnabled()) { $this->database->is_log_drain_enabled = false; $this->dispatch('error', 'Log drain is not enabled on the server. Please enable it first.'); return; diff --git a/database/migrations/new_services.php b/database/seeders/new_services.php similarity index 100% rename from database/migrations/new_services.php rename to database/seeders/new_services.php diff --git a/resources/views/livewire/project/database/clickhouse/general.blade.php b/resources/views/livewire/project/database/clickhouse/general.blade.php index 91f12a94b..78a2c4952 100644 --- a/resources/views/livewire/project/database/clickhouse/general.blade.php +++ b/resources/views/livewire/project/database/clickhouse/general.blade.php @@ -15,8 +15,8 @@ @if ($database->started_at)