Merge branch 'next' into allow-at-sign-in-git-urls
This commit is contained in:
commit
ebfc87753e
11 changed files with 62 additions and 8 deletions
|
|
@ -85,6 +85,7 @@ class BackupEdit extends Component
|
||||||
public function mount()
|
public function mount()
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
|
$this->authorize('view', $this->backup->database);
|
||||||
$this->parameters = get_route_parameters();
|
$this->parameters = get_route_parameters();
|
||||||
$this->syncData();
|
$this->syncData();
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ class General extends Component
|
||||||
{
|
{
|
||||||
use AuthorizesRequests;
|
use AuthorizesRequests;
|
||||||
|
|
||||||
public Server $server;
|
public ?Server $server = null;
|
||||||
|
|
||||||
public StandaloneClickhouse $database;
|
public StandaloneClickhouse $database;
|
||||||
|
|
||||||
|
|
@ -56,8 +56,14 @@ public function getListeners()
|
||||||
public function mount()
|
public function mount()
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
|
$this->authorize('view', $this->database);
|
||||||
$this->syncData();
|
$this->syncData();
|
||||||
$this->server = data_get($this->database, 'destination.server');
|
$this->server = data_get($this->database, 'destination.server');
|
||||||
|
if (! $this->server) {
|
||||||
|
$this->dispatch('error', 'Database destination server is not configured.');
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
return handleError($e, $this);
|
return handleError($e, $this);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,10 +3,12 @@
|
||||||
namespace App\Livewire\Project\Database;
|
namespace App\Livewire\Project\Database;
|
||||||
|
|
||||||
use Auth;
|
use Auth;
|
||||||
|
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
|
||||||
use Livewire\Component;
|
use Livewire\Component;
|
||||||
|
|
||||||
class Configuration extends Component
|
class Configuration extends Component
|
||||||
{
|
{
|
||||||
|
use AuthorizesRequests;
|
||||||
public $currentRoute;
|
public $currentRoute;
|
||||||
|
|
||||||
public $database;
|
public $database;
|
||||||
|
|
@ -42,6 +44,8 @@ public function mount()
|
||||||
->where('uuid', request()->route('database_uuid'))
|
->where('uuid', request()->route('database_uuid'))
|
||||||
->firstOrFail();
|
->firstOrFail();
|
||||||
|
|
||||||
|
$this->authorize('view', $database);
|
||||||
|
|
||||||
$this->database = $database;
|
$this->database = $database;
|
||||||
$this->project = $project;
|
$this->project = $project;
|
||||||
$this->environment = $environment;
|
$this->environment = $environment;
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ class General extends Component
|
||||||
{
|
{
|
||||||
use AuthorizesRequests;
|
use AuthorizesRequests;
|
||||||
|
|
||||||
public Server $server;
|
public ?Server $server = null;
|
||||||
|
|
||||||
public StandaloneDragonfly $database;
|
public StandaloneDragonfly $database;
|
||||||
|
|
||||||
|
|
@ -62,8 +62,14 @@ public function getListeners()
|
||||||
public function mount()
|
public function mount()
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
|
$this->authorize('view', $this->database);
|
||||||
$this->syncData();
|
$this->syncData();
|
||||||
$this->server = data_get($this->database, 'destination.server');
|
$this->server = data_get($this->database, 'destination.server');
|
||||||
|
if (! $this->server) {
|
||||||
|
$this->dispatch('error', 'Database destination server is not configured.');
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$existingCert = $this->database->sslCertificates()->first();
|
$existingCert = $this->database->sslCertificates()->first();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -131,6 +131,7 @@ public function getContainers()
|
||||||
if (is_null($resource)) {
|
if (is_null($resource)) {
|
||||||
abort(404);
|
abort(404);
|
||||||
}
|
}
|
||||||
|
$this->authorize('view', $resource);
|
||||||
$this->resource = $resource;
|
$this->resource = $resource;
|
||||||
$this->server = $this->resource->destination->server;
|
$this->server = $this->resource->destination->server;
|
||||||
$this->container = $this->resource->uuid;
|
$this->container = $this->resource->uuid;
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ class General extends Component
|
||||||
{
|
{
|
||||||
use AuthorizesRequests;
|
use AuthorizesRequests;
|
||||||
|
|
||||||
public Server $server;
|
public ?Server $server = null;
|
||||||
|
|
||||||
public StandaloneKeydb $database;
|
public StandaloneKeydb $database;
|
||||||
|
|
||||||
|
|
@ -64,8 +64,14 @@ public function getListeners()
|
||||||
public function mount()
|
public function mount()
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
|
$this->authorize('view', $this->database);
|
||||||
$this->syncData();
|
$this->syncData();
|
||||||
$this->server = data_get($this->database, 'destination.server');
|
$this->server = data_get($this->database, 'destination.server');
|
||||||
|
if (! $this->server) {
|
||||||
|
$this->dispatch('error', 'Database destination server is not configured.');
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$existingCert = $this->database->sslCertificates()->first();
|
$existingCert = $this->database->sslCertificates()->first();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ class General extends Component
|
||||||
{
|
{
|
||||||
use AuthorizesRequests;
|
use AuthorizesRequests;
|
||||||
|
|
||||||
public Server $server;
|
public ?Server $server = null;
|
||||||
|
|
||||||
public StandaloneMariadb $database;
|
public StandaloneMariadb $database;
|
||||||
|
|
||||||
|
|
@ -122,8 +122,14 @@ protected function messages(): array
|
||||||
public function mount()
|
public function mount()
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
|
$this->authorize('view', $this->database);
|
||||||
$this->syncData();
|
$this->syncData();
|
||||||
$this->server = data_get($this->database, 'destination.server');
|
$this->server = data_get($this->database, 'destination.server');
|
||||||
|
if (! $this->server) {
|
||||||
|
$this->dispatch('error', 'Database destination server is not configured.');
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$existingCert = $this->database->sslCertificates()->first();
|
$existingCert = $this->database->sslCertificates()->first();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ class General extends Component
|
||||||
{
|
{
|
||||||
use AuthorizesRequests;
|
use AuthorizesRequests;
|
||||||
|
|
||||||
public Server $server;
|
public ?Server $server = null;
|
||||||
|
|
||||||
public StandaloneMongodb $database;
|
public StandaloneMongodb $database;
|
||||||
|
|
||||||
|
|
@ -122,8 +122,14 @@ protected function messages(): array
|
||||||
public function mount()
|
public function mount()
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
|
$this->authorize('view', $this->database);
|
||||||
$this->syncData();
|
$this->syncData();
|
||||||
$this->server = data_get($this->database, 'destination.server');
|
$this->server = data_get($this->database, 'destination.server');
|
||||||
|
if (! $this->server) {
|
||||||
|
$this->dispatch('error', 'Database destination server is not configured.');
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$existingCert = $this->database->sslCertificates()->first();
|
$existingCert = $this->database->sslCertificates()->first();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ class General extends Component
|
||||||
|
|
||||||
public StandaloneMysql $database;
|
public StandaloneMysql $database;
|
||||||
|
|
||||||
public Server $server;
|
public ?Server $server = null;
|
||||||
|
|
||||||
public string $name;
|
public string $name;
|
||||||
|
|
||||||
|
|
@ -127,8 +127,14 @@ protected function messages(): array
|
||||||
public function mount()
|
public function mount()
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
|
$this->authorize('view', $this->database);
|
||||||
$this->syncData();
|
$this->syncData();
|
||||||
$this->server = data_get($this->database, 'destination.server');
|
$this->server = data_get($this->database, 'destination.server');
|
||||||
|
if (! $this->server) {
|
||||||
|
$this->dispatch('error', 'Database destination server is not configured.');
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$existingCert = $this->database->sslCertificates()->first();
|
$existingCert = $this->database->sslCertificates()->first();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ class General extends Component
|
||||||
|
|
||||||
public StandalonePostgresql $database;
|
public StandalonePostgresql $database;
|
||||||
|
|
||||||
public Server $server;
|
public ?Server $server = null;
|
||||||
|
|
||||||
public string $name;
|
public string $name;
|
||||||
|
|
||||||
|
|
@ -140,8 +140,14 @@ protected function messages(): array
|
||||||
public function mount()
|
public function mount()
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
|
$this->authorize('view', $this->database);
|
||||||
$this->syncData();
|
$this->syncData();
|
||||||
$this->server = data_get($this->database, 'destination.server');
|
$this->server = data_get($this->database, 'destination.server');
|
||||||
|
if (! $this->server) {
|
||||||
|
$this->dispatch('error', 'Database destination server is not configured.');
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$existingCert = $this->database->sslCertificates()->first();
|
$existingCert = $this->database->sslCertificates()->first();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ class General extends Component
|
||||||
{
|
{
|
||||||
use AuthorizesRequests;
|
use AuthorizesRequests;
|
||||||
|
|
||||||
public Server $server;
|
public ?Server $server = null;
|
||||||
|
|
||||||
public StandaloneRedis $database;
|
public StandaloneRedis $database;
|
||||||
|
|
||||||
|
|
@ -115,8 +115,14 @@ protected function messages(): array
|
||||||
public function mount()
|
public function mount()
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
|
$this->authorize('view', $this->database);
|
||||||
$this->syncData();
|
$this->syncData();
|
||||||
$this->server = data_get($this->database, 'destination.server');
|
$this->server = data_get($this->database, 'destination.server');
|
||||||
|
if (! $this->server) {
|
||||||
|
$this->dispatch('error', 'Database destination server is not configured.');
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$existingCert = $this->database->sslCertificates()->first();
|
$existingCert = $this->database->sslCertificates()->first();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue