Files

85 lines
4.8 KiB
PHP

<div>
<x-slot:title>
{{ $destination->name }} | Destination | Coolify
</x-slot>
@php
$destinationSubtitle = $destination->getMorphClass() === 'App\Models\StandaloneDocker'
? 'Docker network on '.data_get($destination, 'server.name', 'server')
: 'Deprecated Docker Swarm network';
@endphp
<x-dashboard.navbar section="destination" :parameters="['destination_uuid' => $destination->uuid]"
:title="$name" :subtitle="$destinationSubtitle" :mobileTitleOnly="true" />
<section class="application-settings-workspace mt-4 w-full max-w-none lg:mt-0">
<div class="grid min-w-0 gap-8 xl:grid-cols-[210px_minmax(0,1fr)] xl:gap-8">
@include('livewire.destination.sidebar', ['destination' => $destination])
<div class="min-w-0">
@if ($destination->getMorphClass() !== 'App\Models\StandaloneDocker')
<x-callout type="warning" title="Docker Swarm support is deprecated" class="mb-6">
{{ config('deprecations.swarm') }}
</x-callout>
@endif
@if (request()->routeIs('destination.danger'))
<div class="application-settings-form">
<x-application.settings-section id="destination-danger-section" title="Danger zone"
helper="Destructive actions for this destination cannot be undone.">
<x-danger-zone title="Delete destination">
<p>
Permanently delete <strong class="font-semibold">{{ $destination->name }}</strong>
from Coolify. The Docker network is also removed from the server.
</p>
<p>Delete or move every attached resource before deleting this destination.</p>
<x-slot:action>
@if ($network !== 'coolify')
<x-modal-confirmation title="Confirm Destination Deletion?"
buttonTitle="Delete destination" isErrorButton submitAction="delete"
:actions="['This permanently deletes the destination and its Docker network.']"
confirmationText="{{ $destination->name }}"
confirmationLabel="Please confirm by entering the Destination Name below"
shortConfirmationLabel="Destination Name" :confirmWithPassword="false"
step2ButtonText="Permanently Delete" canGate="delete"
:canResource="$destination" />
@else
<x-forms.button isError disabled tooltip="The default Coolify destination cannot be deleted.">
Delete destination
</x-forms.button>
@endif
</x-slot:action>
</x-danger-zone>
</x-application.settings-section>
</div>
@else
<form wire:submit="submit" class="application-settings-form">
<x-unsaved-bar action="submit" />
<x-application.settings-section title="General"
:description="$destination->getMorphClass() === 'App\Models\StandaloneDocker'
? 'Docker network used to connect deployed resources.'
: 'Deprecated Docker Swarm network.'">
@if ($destination->getMorphClass() !== 'App\Models\StandaloneDocker')
<x-slot:actions>
<x-status-badge label="Deprecated" type="warning" />
</x-slot:actions>
@endif
<div class="grid gap-4 lg:grid-cols-2">
<x-forms.input canGate="update" :canResource="$destination" id="name" label="Name" />
<x-forms.input id="serverIp" label="Server IP" readonly />
@if ($destination->getMorphClass() === 'App\Models\StandaloneDocker')
<div class="lg:col-span-2">
<x-forms.input id="network" label="Docker network" readonly />
</div>
@endif
</div>
</x-application.settings-section>
</form>
@endif
</div>
</div>
</section>
</div>