Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

fix deployment status

Andras Bacsaid01486ce42f2
diff --git a/app/Jobs/ApplicationDeploymentJob.php b/app/Jobs/ApplicationDeploymentJob.php
index 90e8b176f3..92c057a5f5 100644
--- a/app/Jobs/ApplicationDeploymentJob.php
+++ b/app/Jobs/ApplicationDeploymentJob.php
@@ -273,9 +273,14 @@ COPY --from=$this->build_image_name /app/{$this->application->publish_directory}
private function next(string $status)
{
if (!Str::of($this->application_deployment_queue->status)->startsWith('cancelled')) {
+ ray('Next Status: ' . $status);
$this->application_deployment_queue->update([
'status' => $status,
]);
+ $this->activity->properties = $this->activity->properties->merge([
+ 'status' => $status,
+ ]);
+ $this->activity->save();
}
dispatch(new ApplicationContainerStatusJob(
application: $this->application,
diff --git a/resources/views/livewire/project/application/deployment-logs.blade.php b/resources/views/livewire/project/application/deployment-logs.blade.php
index 61d4842fd2..8631760c0d 100644
--- a/resources/views/livewire/project/application/deployment-logs.blade.php
+++ b/resources/views/livewire/project/application/deployment-logs.blade.php
@@ -1,12 +1,11 @@
<div class="pt-4">
- <h2>Logs</h2>
<livewire:project.application.deployment-navbar :activity="$activity" :application="$application" :deployment_uuid="$deployment_uuid" />
@if (data_get($activity, 'properties.status') === 'in_progress')
<div class="flex items-center gap-1 pt-2 text-sm">Deployment is
<div class="text-warning"> {{ Str::headline(data_get($activity, 'properties.status')) }}.</div>
<x-loading class="loading-ring" />
</div>
- <div>Logs will be updated automatically.</div>
+ <div class="text-sm">Logs will be updated automatically.</div>
@else
<div class="pt-2 text-sm">Deployment is <span
class="text-warning">{{ Str::headline(data_get($activity, 'properties.status')) }}</span>.
diff --git a/resources/views/livewire/project/application/deployment-navbar.blade.php b/resources/views/livewire/project/application/deployment-navbar.blade.php
index 28d0597483..5d91531ce2 100644
--- a/resources/views/livewire/project/application/deployment-navbar.blade.php
+++ b/resources/views/livewire/project/application/deployment-navbar.blade.php
@@ -1,4 +1,5 @@
-<div class="py-4">
+<div class="flex items-center gap-2 pb-4">
+ <h2>Logs</h2>
@if (data_get($activity, 'properties.status') === 'in_progress')
<x-forms.button wire:click.prevent="cancel">Cancel deployment</x-forms.button>
@else
diff --git a/resources/views/livewire/project/application/deployments.blade.php b/resources/views/livewire/project/application/deployments.blade.php
index 05200acdef..67765c35e8 100644
--- a/resources/views/livewire/project/application/deployments.blade.php
+++ b/resources/views/livewire/project/application/deployments.blade.php
@@ -48,14 +48,18 @@
</div>
@endif
<div class="flex flex-col" x-data="elapsedTime('{{ $deployment->deployment_uuid }}', '{{ $deployment->status }}', '{{ $deployment->created_at }}', '{{ $deployment->updated_at }}')">
- <div>Finished <span x-text="measure_since_started()">0s</span> in <span class="font-bold"
- x-text="measure_finished_time()">0s</span></div>
+ <div>
+ @if ($deployment->status !== 'in_progress')
+ Finished <span x-text="measure_since_started()">0s</span> in
+ @else
+ Running for
+ @endif
+ <span class="font-bold" x-text="measure_finished_time()">0s</span>
+ </div>
</div>
</div>
</a>
@endforeach
-
-
<script src="https://cdn.jsdelivr.net/npm/dayjs@1/dayjs.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/dayjs@1/plugin/utc.js"></script>
<script src="https://cdn.jsdelivr.net/npm/dayjs@1/plugin/relativeTime.js"></script>