fix: stopping a resource is now job based

ui: show status on project
This commit is contained in:
Andras Bacsai
2023-10-14 14:22:07 +02:00
parent 5fb5ed75c4
commit 0ef386b4a8
22 changed files with 300 additions and 195 deletions

View File

@@ -2,6 +2,8 @@
namespace App\Http\Livewire\Project\Database\Postgresql;
use App\Actions\Database\StartDatabaseProxy;
use App\Actions\Database\StopDatabaseProxy;
use App\Models\StandalonePostgresql;
use Exception;
use Livewire\Component;
@@ -67,10 +69,10 @@ class General extends Component
}
if ($this->database->is_public) {
$this->emit('success', 'Starting TCP proxy...');
startDatabaseProxy($this->database);
StartDatabaseProxy::run($this->database);
$this->emit('success', 'Database is now publicly accessible.');
} else {
stopDatabaseProxy($this->database);
StopDatabaseProxy::run($this->database);
$this->emit('success', 'Database is no longer publicly accessible.');
}
$this->getDbUrl();