feat(SourceManagement): add functionality to change Git source and display current source in the application settings
This commit is contained in:
@@ -26,6 +26,9 @@
|
||||
<div class="pb-4">Code source of your application.</div>
|
||||
|
||||
<div class="flex flex-col gap-2">
|
||||
<div>Currently connected source: <span
|
||||
class="font-bold text-warning">{{ $application->source->name }}</span>
|
||||
</div>
|
||||
<div class="flex gap-2">
|
||||
<x-forms.input placeholder="coollabsio/coolify-example" id="gitRepository" label="Repository" />
|
||||
<x-forms.input placeholder="main" id="gitBranch" label="Branch" />
|
||||
@@ -34,6 +37,35 @@
|
||||
<x-forms.input placeholder="HEAD" id="gitCommitSha" placeholder="HEAD" label="Commit SHA" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (filled($sources) && $sources->count() > 0)
|
||||
<div class="pt-4">
|
||||
<h3 class="pb-2">Change Git Source</h3>
|
||||
<div class="grid grid-cols-1 gap-2">
|
||||
@foreach ($sources as $source)
|
||||
<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="box-title">
|
||||
{{ $source->name }}
|
||||
@if ($application->source_id === $source->id)
|
||||
<span class="text-xs">(current)</span>
|
||||
@endif
|
||||
</div>
|
||||
<div class="box-description">
|
||||
{{ $source->organization_name ?? 'Personal Account' }}
|
||||
</div>
|
||||
</x-slot:customButton>
|
||||
</x-modal-confirmation>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($privateKeyId)
|
||||
<h3 class="pt-4">Deploy Key</h3>
|
||||
<div class="py-2 pt-4">Currently attached Private Key: <span
|
||||
|
||||
Reference in New Issue
Block a user