wip: broadcast
This commit is contained in:
@@ -26,7 +26,7 @@ class Configuration extends Component
|
||||
return redirect()->route('dashboard');
|
||||
}
|
||||
$this->application = $application;
|
||||
$mainServer = $application->destination->server;
|
||||
$mainServer = $this->application->destination->server;
|
||||
$servers = Server::ownedByCurrentTeam()->get();
|
||||
$this->servers = $servers->filter(function ($server) use ($mainServer) {
|
||||
return $server->id != $mainServer->id;
|
||||
|
||||
@@ -17,11 +17,7 @@ class DeploymentNavbar extends Component
|
||||
public Application $application;
|
||||
public Server $server;
|
||||
public bool $is_debug_enabled = false;
|
||||
protected $listeners = ['deploymentFinished','echo:custom-channel,ApplicationDeploymentFinished' => 'notifyNewOrder'];
|
||||
|
||||
public function notifyNewOrder() {
|
||||
ray('New order received');
|
||||
}
|
||||
protected $listeners = ['deploymentFinished'];
|
||||
public function mount()
|
||||
{
|
||||
$this->application = Application::find($this->application_deployment_queue->application_id);
|
||||
|
||||
@@ -11,11 +11,24 @@ use Visus\Cuid2\Cuid2;
|
||||
|
||||
class Heading extends Component
|
||||
{
|
||||
protected string $deploymentUuid;
|
||||
public Application $application;
|
||||
public array $parameters;
|
||||
public function getListeners()
|
||||
{
|
||||
$teamId = auth()->user()->currentTeam()->id;
|
||||
return [
|
||||
"echo-private:custom.{$teamId},ApplicationDeploymentFinished" => 'updateStatus',
|
||||
];
|
||||
}
|
||||
|
||||
protected string $deploymentUuid;
|
||||
|
||||
public function updateStatus($message)
|
||||
{
|
||||
$applicationUuid = data_get($message, 'applicationUuid');
|
||||
if ($this->application->uuid === $applicationUuid) {
|
||||
$this->application->status = data_get($message, 'status');
|
||||
}
|
||||
}
|
||||
public function mount()
|
||||
{
|
||||
$this->parameters = get_route_parameters();
|
||||
|
||||
Reference in New Issue
Block a user