feat: pull latest images for services

This commit is contained in:
Andras Bacsai
2023-12-14 14:50:38 +01:00
parent a0abde8652
commit 75d1ec4f42
5 changed files with 61 additions and 1 deletions

View File

@@ -1,4 +1,4 @@
<div class="navbar-main">
<div class="navbar-main" x-data>
<a wire:navigate class="{{ request()->routeIs('project.service.configuration') ? 'text-white' : '' }}"
href="{{ route('project.service.configuration', $parameters) }}">
<button>Configuration</button>
@@ -27,6 +27,16 @@
</button>
@endif
@if (serviceStatus($service) === 'running')
<button wire:click='restart' class="flex items-center gap-2 cursor-pointer hover:text-white text-neutral-400">
<svg class="w-5 h-5 text-warning" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"
stroke-width="2">
<path d="M19.933 13.041a8 8 0 1 1-9.925-8.788c3.899-1 7.935 1.007 9.425 4.747" />
<path d="M20 4v5h-5" />
</g>
</svg>
Pull Latest Images & Restart
</button>
<button wire:click='stop' class="flex items-center gap-2 cursor-pointer hover:text-white text-neutral-400">
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 text-error" viewBox="0 0 24 24" stroke-width="2"
stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round">
@@ -58,3 +68,11 @@
</button>
@endif
</div>
@script
<script>
$wire.on('image-pulled', () => {
startService.showModal();
});
</script>
@endscript