diff --git a/app/Http/Livewire/Project/Database/Mariadb/General.php b/app/Http/Livewire/Project/Database/Mariadb/General.php index 11b5fc42b..173e9290f 100644 --- a/app/Http/Livewire/Project/Database/Mariadb/General.php +++ b/app/Http/Livewire/Project/Database/Mariadb/General.php @@ -13,7 +13,8 @@ class General extends Component protected $listeners = ['refresh']; public StandaloneMariadb $database; - public string $db_url; + public ?string $db_url = null; + public ?string $db_url_public = null; protected $rules = [ 'database.name' => 'required', @@ -41,6 +42,14 @@ class General extends Component 'database.is_public' => 'Is Public', 'database.public_port' => 'Public Port', ]; + + public function mount() + { + $this->db_url = $this->database->getDbUrl(true); + if ($this->database->is_public) { + $this->db_url_public = $this->database->getDbUrl(); + } + } public function submit() { try { @@ -69,12 +78,13 @@ class General extends Component return; } StartDatabaseProxy::run($this->database); + $this->db_url_public = $this->database->getDbUrl(); $this->emit('success', 'Database is now publicly accessible.'); } else { StopDatabaseProxy::run($this->database); + $this->db_url_public = null; $this->emit('success', 'Database is no longer publicly accessible.'); } - $this->db_url = $this->database->getDbUrl(); $this->database->save(); } catch (\Throwable $e) { $this->database->is_public = !$this->database->is_public; @@ -86,11 +96,6 @@ class General extends Component $this->database->refresh(); } - public function mount() - { - $this->db_url = $this->database->getDbUrl(); - } - public function render() { return view('livewire.project.database.mariadb.general'); diff --git a/app/Http/Livewire/Project/Database/Mongodb/General.php b/app/Http/Livewire/Project/Database/Mongodb/General.php index ce0ff14ea..189f2632e 100644 --- a/app/Http/Livewire/Project/Database/Mongodb/General.php +++ b/app/Http/Livewire/Project/Database/Mongodb/General.php @@ -13,7 +13,8 @@ class General extends Component protected $listeners = ['refresh']; public StandaloneMongodb $database; - public string $db_url; + public ?string $db_url = null; + public ?string $db_url_public = null; protected $rules = [ 'database.name' => 'required', @@ -39,6 +40,15 @@ class General extends Component 'database.is_public' => 'Is Public', 'database.public_port' => 'Public Port', ]; + + public function mount() + { + $this->db_url = $this->database->getDbUrl(true); + if ($this->database->is_public) { + $this->db_url_public = $this->database->getDbUrl(); + } + } + public function submit() { try { @@ -70,12 +80,13 @@ class General extends Component return; } StartDatabaseProxy::run($this->database); + $this->db_url_public = $this->database->getDbUrl(); $this->emit('success', 'Database is now publicly accessible.'); } else { StopDatabaseProxy::run($this->database); + $this->db_url_public = null; $this->emit('success', 'Database is no longer publicly accessible.'); } - $this->db_url = $this->database->getDbUrl(); $this->database->save(); } catch (\Throwable $e) { $this->database->is_public = !$this->database->is_public; @@ -87,11 +98,6 @@ class General extends Component $this->database->refresh(); } - public function mount() - { - $this->db_url = $this->database->getDbUrl(); - } - public function render() { return view('livewire.project.database.mongodb.general'); diff --git a/app/Http/Livewire/Project/Database/Mysql/General.php b/app/Http/Livewire/Project/Database/Mysql/General.php index 416970ea9..cb1a063db 100644 --- a/app/Http/Livewire/Project/Database/Mysql/General.php +++ b/app/Http/Livewire/Project/Database/Mysql/General.php @@ -13,7 +13,8 @@ class General extends Component protected $listeners = ['refresh']; public StandaloneMysql $database; - public string $db_url; + public ?string $db_url = null; + public ?string $db_url_public = null; protected $rules = [ 'database.name' => 'required', @@ -41,6 +42,14 @@ class General extends Component 'database.is_public' => 'Is Public', 'database.public_port' => 'Public Port', ]; + + public function mount() + { + $this->db_url = $this->database->getDbUrl(true); + if ($this->database->is_public) { + $this->db_url_public = $this->database->getDbUrl(); + } + } public function submit() { try { @@ -69,12 +78,13 @@ class General extends Component return; } StartDatabaseProxy::run($this->database); + $this->db_url_public = $this->database->getDbUrl(); $this->emit('success', 'Database is now publicly accessible.'); } else { StopDatabaseProxy::run($this->database); + $this->db_url_public = null; $this->emit('success', 'Database is no longer publicly accessible.'); } - $this->db_url = $this->database->getDbUrl(); $this->database->save(); } catch (\Throwable $e) { $this->database->is_public = !$this->database->is_public; @@ -86,11 +96,6 @@ class General extends Component $this->database->refresh(); } - public function mount() - { - $this->db_url = $this->database->getDbUrl(); - } - public function render() { return view('livewire.project.database.mysql.general'); diff --git a/app/Http/Livewire/Project/Database/Postgresql/General.php b/app/Http/Livewire/Project/Database/Postgresql/General.php index 7872764e3..7292ec2b2 100644 --- a/app/Http/Livewire/Project/Database/Postgresql/General.php +++ b/app/Http/Livewire/Project/Database/Postgresql/General.php @@ -15,7 +15,8 @@ class General extends Component public StandalonePostgresql $database; public string $new_filename; public string $new_content; - public string $db_url; + public ?string $db_url = null; + public ?string $db_url_public = null; protected $listeners = ['refresh', 'save_init_script', 'delete_init_script']; @@ -49,7 +50,10 @@ class General extends Component ]; public function mount() { - $this->db_url = $this->database->getDbUrl(); + $this->db_url = $this->database->getDbUrl(true); + if ($this->database->is_public) { + $this->db_url_public = $this->database->getDbUrl(); + } } public function instantSave() { @@ -66,12 +70,13 @@ class General extends Component return; } StartDatabaseProxy::run($this->database); + $this->db_url_public = $this->database->getDbUrl(); $this->emit('success', 'Database is now publicly accessible.'); } else { StopDatabaseProxy::run($this->database); + $this->db_url_public = null; $this->emit('success', 'Database is no longer publicly accessible.'); } - $this->db_url = $this->database->getDbUrl(); $this->database->save(); } catch (\Throwable $e) { $this->database->is_public = !$this->database->is_public; diff --git a/app/Http/Livewire/Project/Database/Redis/General.php b/app/Http/Livewire/Project/Database/Redis/General.php index dd2e8151d..834a9f381 100644 --- a/app/Http/Livewire/Project/Database/Redis/General.php +++ b/app/Http/Livewire/Project/Database/Redis/General.php @@ -13,7 +13,8 @@ class General extends Component protected $listeners = ['refresh']; public StandaloneRedis $database; - public string $db_url; + public ?string $db_url = null; + public ?string $db_url_public = null; protected $rules = [ 'database.name' => 'required', @@ -35,6 +36,13 @@ class General extends Component 'database.is_public' => 'Is Public', 'database.public_port' => 'Public Port', ]; + public function mount() + { + $this->db_url = $this->database->getDbUrl(true); + if ($this->database->is_public) { + $this->db_url_public = $this->database->getDbUrl(); + } + } public function submit() { try { @@ -63,12 +71,13 @@ class General extends Component return; } StartDatabaseProxy::run($this->database); + $this->db_url_public = $this->database->getDbUrl(); $this->emit('success', 'Database is now publicly accessible.'); } else { StopDatabaseProxy::run($this->database); + $this->db_url_public = null; $this->emit('success', 'Database is no longer publicly accessible.'); } - $this->db_url = $this->database->getDbUrl(); $this->database->save(); } catch (\Throwable $e) { $this->database->is_public = !$this->database->is_public; @@ -80,10 +89,6 @@ class General extends Component $this->database->refresh(); } - public function mount() - { - $this->db_url = $this->database->getDbUrl(); - } public function render() { return view('livewire.project.database.redis.general'); diff --git a/config/sentry.php b/config/sentry.php index 180d98f99..b499fe319 100644 --- a/config/sentry.php +++ b/config/sentry.php @@ -7,7 +7,7 @@ return [ // The release version of your application // Example with dynamic git hash: trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD')) - 'release' => '4.0.0-beta.114', + 'release' => '4.0.0-beta.115', // When left empty or `null` the Laravel environment will be used 'environment' => config('app.env'), diff --git a/config/version.php b/config/version.php index aee7423ea..4c86b6ee4 100644 --- a/config/version.php +++ b/config/version.php @@ -1,3 +1,3 @@ - + @if ($db_url_public) + + @endif diff --git a/resources/views/livewire/project/database/mongodb/general.blade.php b/resources/views/livewire/project/database/mongodb/general.blade.php index 51cb31d23..8aab8dd42 100644 --- a/resources/views/livewire/project/database/mongodb/general.blade.php +++ b/resources/views/livewire/project/database/mongodb/general.blade.php @@ -43,9 +43,14 @@ label="Public Port" /> - + @if ($db_url_public) + + @endif diff --git a/resources/views/livewire/project/database/mysql/general.blade.php b/resources/views/livewire/project/database/mysql/general.blade.php index 09a23a694..6db2fd8eb 100644 --- a/resources/views/livewire/project/database/mysql/general.blade.php +++ b/resources/views/livewire/project/database/mysql/general.blade.php @@ -49,9 +49,14 @@ label="Public Port" /> - + @if ($db_url_public) + + @endif diff --git a/resources/views/livewire/project/database/postgresql/general.blade.php b/resources/views/livewire/project/database/postgresql/general.blade.php index dfe64b993..368e55906 100644 --- a/resources/views/livewire/project/database/postgresql/general.blade.php +++ b/resources/views/livewire/project/database/postgresql/general.blade.php @@ -31,14 +31,15 @@
- +
@else -
Please verify these values. You can only modify them before the initial start. After that, you need to modify it in the database. +
Please verify these values. You can only modify them before the initial + start. After that, you need to modify it in the database.
@@ -62,7 +63,14 @@ label="Public Port" />
- + + @if ($db_url_public) + + @endif
diff --git a/resources/views/livewire/project/database/redis/general.blade.php b/resources/views/livewire/project/database/redis/general.blade.php index 1789d0c15..9f709b656 100644 --- a/resources/views/livewire/project/database/redis/general.blade.php +++ b/resources/views/livewire/project/database/redis/general.blade.php @@ -21,8 +21,17 @@ label="Public Port" />
- + + @if ($db_url_public) + + @endif - + diff --git a/versions.json b/versions.json index 7dcd59a4f..aeca3f8a1 100644 --- a/versions.json +++ b/versions.json @@ -4,7 +4,7 @@ "version": "3.12.36" }, "v4": { - "version": "4.0.0-beta.114" + "version": "4.0.0-beta.115" } } }