coolify/resources/views/livewire/project/new/public-git-repository.blade.php

73 lines
3.1 KiB
PHP
Raw Normal View History

2023-04-25 14:43:35 +02:00
<div>
2023-05-03 10:41:25 +02:00
@if ($servers->count() > 0)
<h1>Choose a server</h1>
@endif
2023-04-25 14:43:35 +02:00
@forelse ($servers as $server)
2023-05-03 14:09:10 +02:00
@if ($chosenServer && $chosenServer['id'] === $server->id)
<x-inputs.button class="bg-blue-500" wire:click="chooseServer({{ $server }})">{{ $server->name }}
</x-inputs.button>
@else
<x-inputs.button wire:click="chooseServer({{ $server }})">{{ $server->name }}</x-inputs.button>
@endif
2023-04-25 14:43:35 +02:00
@empty
2023-05-03 10:41:25 +02:00
No servers found.
<p>Did you forget to add a destination on the server?</p>
2023-04-25 14:43:35 +02:00
@endforelse
2023-05-03 10:41:25 +02:00
2023-04-25 14:43:35 +02:00
@isset($chosenServer)
2023-05-03 11:16:08 +02:00
@if ($standalone_docker->count() > 0 || $swarm_docker->count() > 0)
<h1>Choose a destination</h1>
<div>
@foreach ($standalone_docker as $standalone)
2023-05-03 14:09:10 +02:00
@if ($chosenDestination?->uuid == $standalone->uuid)
<x-inputs.button class="bg-blue-500"
wire:click="setDestination('{{ $standalone->uuid }}','StandaloneDocker')">
{{ $standalone->network }}</x-inputs.button>
@else
<x-inputs.button wire:click="setDestination('{{ $standalone->uuid }}','StandaloneDocker')">
{{ $standalone->network }}</x-inputs.button>
@endif
2023-05-03 11:16:08 +02:00
@endforeach
@foreach ($swarm_docker as $standalone)
2023-05-03 14:09:10 +02:00
@if ($chosenDestination?->uuid == $standalone->uuid)
<x-inputs.button class="bg-blue-500"
wire:click="setDestination('{{ $standalone->uuid }}','SwarmDocker')">
{{ $standalone->network }}</x-inputs.button>
@else
<x-inputs.button wire:click="setDestination('{{ $standalone->uuid }}','SwarmDocker')">
{{ $standalone->uuid }}</x-inputs.button>
@endif
2023-05-03 11:16:08 +02:00
@endforeach
</div>
<div>
<a href="{{ route('destination.new', ['server_id' => $chosenServer['id']]) }}">Add
a new
destination</a>
</div>
@else
<h1>No destinations found on this server.</h1>
<a href="{{ route('destination.new', ['server_id' => $chosenServer['id']]) }}">Add
a
destination</a>
@endif
2023-04-25 14:43:35 +02:00
@endisset
@isset($chosenDestination)
2023-05-03 10:41:25 +02:00
<h1>Choose a repository</h1>
<form class="flex flex-col gap-2 w-96" wire:submit.prevent='submit'>
2023-05-03 14:09:10 +02:00
<x-inputs.input class="w-96" id="public_repository_url" label="Repository URL" />
<x-inputs.input instantSave type="checkbox" id="is_static" label="Static Site?" />
2023-04-26 13:01:09 +02:00
@if ($is_static)
2023-05-03 14:09:10 +02:00
<x-inputs.input id="publish_directory" label="Publish Directory" />
2023-04-26 13:01:09 +02:00
@else
2023-05-03 14:09:10 +02:00
<x-inputs.input type="number" id="port" label="Port" :disabled="$is_static" />
2023-04-26 13:01:09 +02:00
@endif
2023-05-03 14:09:10 +02:00
<x-inputs.button type="submit">
2023-04-25 14:43:35 +02:00
Submit
2023-05-03 14:09:10 +02:00
</x-inputs.button>
2023-04-25 14:43:35 +02:00
</form>
@endisset
</div>