rollback job

This commit is contained in:
Andras Bacsai
2023-05-22 10:34:00 +02:00
parent 828ecc6803
commit ecf0b30513
8 changed files with 443 additions and 36 deletions

View File

@@ -1,8 +1,7 @@
<div>
<h2>Destination</h2>
<p>Server Name: {{ data_get($destination, 'server.name') }}</p>
@if (data_get($destination, 'server.description'))
<p>Description: {{ data_get($destination, 'server.description') }}</p>
@endif
<p>Docker Network: {{ $destination->network }}</p>
<div>
<p>Server: {{ data_get($destination, 'server.name') }}</p>
<p>Destination: {{ $destination->network }}</p>
</div>
</div>

View File

@@ -6,6 +6,7 @@
Save
</x-inputs.button>
</div>
<x-inputs.checkbox instantSave id="is_static" label="Static website?" />
<div class="flex flex-col gap-2 pb-4">
<div class="flex flex-col gap-2 xl:flex-row">
<x-inputs.input class="w-full" id="application.name" label="Name" required />
@@ -49,11 +50,12 @@
helper="A comma separated list of ports you would like to map to the host system. Useful when you do not want to use domains.<br><span class='inline-block font-bold text-warning'>Example</span>3000:3000,3002:3002" />
</div>
</div>
<h3>Advanced</h3>
<div class="flex flex-col">
<x-inputs.checkbox helper="More logs will be visible during a deployment." instantSave id="is_debug"
label="Debug" />
<x-inputs.checkbox instantSave id="is_static" label="Static website?" />
<x-inputs.checkbox helper="Git Webhooks won't deploy your application is you turn it off." instantSave
<x-inputs.checkbox helper="Automatically deploy new commits based on Git webhooks." instantSave
id="is_auto_deploy" label="Auto Deploy?" />
{{-- <x-inputs.checkbox helper="Preview deployments" instantSave id="is_previews" label="Previews?" /> --}}
<x-inputs.checkbox instantSave id="is_git_submodules_allowed" label="Git Submodules Allowed?" />

View File

@@ -9,23 +9,28 @@
<div wire:loading.remove wire:target='loadImages'>
<div class="flex flex-wrap">
@forelse ($images as $image)
<div class="w-1/2 p-2">
<div class="w-2/4 p-2">
<div class="rounded-lg shadow-lg bg-coolgray-200">
<div class="p-2">
<div class="text-sm">
@if (data_get($image, 'is_current'))
<span class="font-bold text-coollabs">LIVE</span>
<span class="font-bold text-warning">LIVE</span>
|
@endif
{{ data_get($image, 'tag') }}
SHA: {{ data_get($image, 'tag') }}
</div>
<div class="text-xs">{{ data_get($image, 'created_at') }}</div>
</div>
<div class="flex justify-end p-2">
<x-inputs.button wire:click="revertImage('{{ data_get($image, 'tag') }}')">
Revert
</x-inputs.button>
@if (data_get($image, 'is_current'))
<x-inputs.button disabled tooltip="This image is currently running.">
Rollback
</x-inputs.button>
@else
<x-inputs.button wire:click="rollbackImage('{{ data_get($image, 'tag') }}')">
Rollback
</x-inputs.button>
@endif
</div>
</div>
</div>