fix deployment status
This commit is contained in:
parent
b2c3c9069f
commit
d01486ce42
@ -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,
|
||||
|
@ -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>.
|
||||
|
@ -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
|
||||
|
@ -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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user