49f5240ff8
fix: add destination to queue deployment feat: force start deployment
36 lines
917 B
PHP
36 lines
917 B
PHP
<?php
|
|
|
|
namespace App\Livewire\Server;
|
|
|
|
use App\Models\Server;
|
|
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
|
|
use Livewire\Component;
|
|
|
|
class Show extends Component
|
|
{
|
|
use AuthorizesRequests;
|
|
public ?Server $server = null;
|
|
public $parameters = [];
|
|
protected $listeners = ['serverInstalled' => '$refresh'];
|
|
public function mount()
|
|
{
|
|
$this->parameters = get_route_parameters();
|
|
try {
|
|
$this->server = Server::ownedByCurrentTeam()->whereUuid(request()->server_uuid)->first();
|
|
if (is_null($this->server)) {
|
|
return redirect()->route('server.index');
|
|
}
|
|
} catch (\Throwable $e) {
|
|
return handleError($e, $this);
|
|
}
|
|
}
|
|
public function submit()
|
|
{
|
|
$this->dispatch('serverRefresh', false);
|
|
}
|
|
public function render()
|
|
{
|
|
return view('livewire.server.show');
|
|
}
|
|
}
|