diff --git a/app/Http/Livewire/Application/Heading.php b/app/Http/Livewire/Application/Heading.php index 619d4b8ba..99bc7d4f8 100644 --- a/app/Http/Livewire/Application/Heading.php +++ b/app/Http/Livewire/Application/Heading.php @@ -42,14 +42,6 @@ public function deploy(bool $force_rebuild = false) 'environment_name' => $this->parameters['environment_name'], ]); } - public function force_deploy_with_debug() - { - if ($this->application->settings->is_debug_enabled == false) { - $this->application->settings->is_debug_enabled = true; - $this->application->settings->save(); - } - $this->deploy(); - } public function force_deploy_without_cache() { $this->deploy(force_rebuild: true); diff --git a/app/Http/Livewire/Project/Application/Deploy.php b/app/Http/Livewire/Project/Application/Deploy.php deleted file mode 100644 index 1e18772f4..000000000 --- a/app/Http/Livewire/Project/Application/Deploy.php +++ /dev/null @@ -1,78 +0,0 @@ -parameters = getRouteParameters(); - $this->application = Application::where('id', $this->applicationId)->first(); - $this->destination = $this->application->destination->getMorphClass()::where('id', $this->application->destination->id)->first(); - } - public function applicationStatusChanged() - { - $this->application->refresh(); - } - protected function setDeploymentUuid() - { - $this->deploymentUuid = new Cuid2(7); - $this->parameters['deployment_uuid'] = $this->deploymentUuid; - } - public function deploy(bool $force = false, bool|null $debug = null) - { - if ($debug && !$this->application->settings->is_debug_enabled) { - $this->application->settings->is_debug_enabled = true; - $this->application->settings->save(); - } - $this->setDeploymentUuid(); - - queue_application_deployment( - application_id: $this->application->id, - deployment_uuid: $this->deploymentUuid, - force_rebuild: $force, - ); - return redirect()->route('project.application.deployment', [ - 'project_uuid' => $this->parameters['project_uuid'], - 'application_uuid' => $this->parameters['application_uuid'], - 'deployment_uuid' => $this->deploymentUuid, - 'environment_name' => $this->parameters['environment_name'], - ]); - } - - public function stop() - { - instant_remote_process(["docker rm -f {$this->application->uuid}"], $this->application->destination->server); - $this->application->status = 'stopped'; - $this->application->save(); - $this->emit('applicationStatusChanged'); - } - - public function pollStatus() - { - dispatch(new ApplicationContainerStatusJob( - application: $this->application, - container_name: generate_container_name($this->application->uuid), - )); - } -} diff --git a/resources/views/livewire/project/application/general.blade.php b/resources/views/livewire/project/application/general.blade.php index 9db650e24..72f64b58a 100644 --- a/resources/views/livewire/project/application/general.blade.php +++ b/resources/views/livewire/project/application/general.blade.php @@ -68,9 +68,6 @@
- -