fix: deploy instead of restart in case swarm is used

This commit is contained in:
Andras Bacsai 2023-12-27 17:12:09 +01:00
parent f03aa57758
commit 52d05005ed

View File

@ -3,7 +3,7 @@
href="{{ route('project.application.configuration', $parameters) }}">
<button>Configuration</button>
</a>
@if(!$application->destination->server->isSwarm())
@if (!$application->destination->server->isSwarm())
<a class="{{ request()->routeIs('project.application.command') ? 'text-white' : '' }}"
href="{{ route('project.application.command', $parameters) }}">
<button>Execute Command</button>
@ -42,6 +42,19 @@ class="flex items-center gap-2 cursor-pointer hover:text-white text-neutral-400"
</button>
@endif
@if ($application->build_pack !== 'dockercompose')
@if ($application->destination->server->isSwarm())
<button title="Restart without rebuilding" wire:click='deploy'
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>
Update Service
</button>
@else
<button title="Restart without rebuilding" 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">
@ -51,12 +64,10 @@ class="flex items-center gap-2 cursor-pointer hover:text-white text-neutral-400"
<path d="M20 4v5h-5" />
</g>
</svg>
@if ($application->destination->server->isSwarm())
Update Service
@else
Restart
@endif
</button>
@endif
{{-- @if (isDev())
<button title="Restart without rebuilding" wire:click='restartNew'
class="flex items-center gap-2 cursor-pointer hover:text-white text-neutral-400">