coolify/resources/views/livewire/project/application/source.blade.php

99 lines
5.1 KiB
PHP
Raw Normal View History

2023-04-19 10:42:15 +00:00
<div>
2023-12-07 18:06:32 +00:00
<form wire:submit='submit' class="flex flex-col">
2023-05-31 08:19:29 +00:00
<div class="flex items-center gap-2">
2023-06-02 10:34:45 +00:00
<h2>Source</h2>
@can('update', $application)
<x-forms.button type="submit">Save</x-forms.button>
@endcan
<div class="flex items-center gap-4 px-2">
<a target="_blank" class="hover:no-underline flex items-center gap-1"
href="{{ $application?->gitBranchLocation }}">
2023-06-14 09:03:54 +00:00
Open Repository
2023-08-11 18:19:42 +00:00
<x-external-link />
</a>
@if (data_get($application, 'source.is_public') === false)
<a target="_blank" class="hover:no-underline flex items-center gap-1"
href="{{ getInstallationPath($application->source) }}">
2023-06-14 09:03:54 +00:00
Open Git App
2023-08-11 18:19:42 +00:00
<x-external-link />
</a>
@endif
<a target="_blank" class="flex hover:no-underline items-center gap-1"
href="{{ $application?->gitCommits }}">
Open Commits on Git
2023-08-11 18:19:42 +00:00
<x-external-link />
</a>
</div>
2023-05-17 07:26:50 +00:00
</div>
2023-07-13 11:16:24 +00:00
<div class="pb-4">Code source of your application.</div>
2024-04-08 12:06:40 +00:00
<div class="flex flex-col gap-2">
@if (blank($privateKeyId))
<div>Currently connected source: <span
class="font-bold text-warning">{{ data_get($application, 'source.name', 'No source connected') }}</span>
</div>
@endif
2024-04-08 12:06:40 +00:00
<div class="flex gap-2">
<x-forms.input placeholder="coollabsio/coolify-example" id="gitRepository" label="Repository"
canGate="update" :canResource="$application" />
<x-forms.input placeholder="main" id="gitBranch" label="Branch" canGate="update" :canResource="$application" />
2024-04-08 12:06:40 +00:00
</div>
<div class="flex items-end gap-2">
<x-forms.input placeholder="HEAD" id="gitCommitSha" placeholder="HEAD" label="Commit SHA"
canGate="update" :canResource="$application" />
2024-04-08 12:06:40 +00:00
</div>
2023-07-13 11:16:24 +00:00
</div>
@if (filled($privateKeyId))
<h3 class="pt-4">Deploy Key</h3>
2023-10-13 19:44:04 +00:00
<div class="py-2 pt-4">Currently attached Private Key: <span
2024-11-03 23:14:44 +00:00
class="dark:text-warning">{{ $privateKeyName }}</span>
</div>
2023-07-13 11:16:24 +00:00
@can('update', $application)
<h4 class="py-2 ">Select another Private Key</h4>
<div class="flex flex-wrap gap-2">
@foreach ($privateKeys as $key)
<x-forms.button wire:click="setPrivateKey('{{ $key->id }}')">{{ $key->name }}
</x-forms.button>
@endforeach
</div>
@endcan
@else
@can('update', $application)
<div class="pt-4">
<h3 class="pb-2">Change Git Source</h3>
<div class="grid grid-cols-1 gap-2">
@forelse ($sources as $source)
<div wire:key="{{ $source->name }}">
<x-modal-confirmation title="Change Git Source" :actions="['Change git source to ' . $source->name]" :buttonFullWidth="true"
:isHighlightedButton="$application->source_id === $source->id" :disabled="$application->source_id === $source->id"
submitAction="changeSource({{ $source->id }}, {{ $source->getMorphClass() }})"
:confirmWithText="true" confirmationText="Change Git Source"
confirmationLabel="Please confirm changing the git source by entering the text below"
shortConfirmationLabel="Confirmation Text" :confirmWithPassword="false">
<x-slot:customButton>
<div class="flex items-center gap-2">
<div class="box-title">
{{ $source->name }}
@if ($application->source_id === $source->id)
<span class="text-xs">(current)</span>
@endif
</div>
<div class="box-description">
{{ $source->organization ?? 'Personal Account' }}
</div>
</div>
</x-slot:customButton>
</x-modal-confirmation>
</div>
@empty
<div>No other sources found</div>
@endforelse
</div>
</div>
@endcan
2024-04-25 10:09:36 +00:00
@endif
2023-05-17 07:26:50 +00:00
</form>
2023-04-19 10:42:15 +00:00
</div>