updates
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
<div>
|
||||
<x-forms.button wire:click="cancel" isHighlighted>Cancel</x-forms.button>
|
||||
</div>
|
||||
@@ -6,17 +6,30 @@
|
||||
<a @class([
|
||||
'bg-coolgray-200 p-2 border-l border-dashed transition-colors hover:no-underline',
|
||||
'cursor-not-allowed hover:bg-coolgray-200' =>
|
||||
$deployment->status === 'queued' ||
|
||||
$deployment->status === 'cancelled by system',
|
||||
data_get($deployment, 'status') === 'queued' ||
|
||||
data_get($deployment, 'status') === 'cancelled by system',
|
||||
'border-warning hover:bg-warning hover:text-black' =>
|
||||
$deployment->status === 'in_progress',
|
||||
'border-error hover:bg-error' => $deployment->status === 'error',
|
||||
'border-success hover:bg-success' => $deployment->status === 'finished',
|
||||
]) @if ($deployment->status !== 'cancelled by system' && $deployment->status !== 'queued')
|
||||
href="{{ $current_url . '/' . $deployment->extra_attributes['deployment_uuid'] }}"
|
||||
data_get($deployment, 'status') === 'in_progress',
|
||||
'border-error hover:bg-error' =>
|
||||
data_get($deployment, 'status') === 'error',
|
||||
'border-success hover:bg-success' =>
|
||||
data_get($deployment, 'status') === 'finished',
|
||||
]) @if (data_get($deployment, 'status') !== 'cancelled by system' && data_get($deployment, 'status') !== 'queued')
|
||||
href="{{ $current_url . '/' . data_get($deployment, 'deployment_uuid') }}"
|
||||
@endif
|
||||
class="hover:no-underline">
|
||||
<div class="flex flex-col justify-start">
|
||||
@if (data_get($deployment, 'pull_request_id'))
|
||||
<div>Pull Request #{{ data_get($deployment, 'pull_request_id') }}</div>
|
||||
@else
|
||||
<div>Commit:
|
||||
@if (data_get($deployment, 'commit'))
|
||||
{{ data_get($deployment, 'commit') }}
|
||||
@else
|
||||
HEAD
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
<div>
|
||||
{{ $deployment->status }}
|
||||
</div>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<div class="flex flex-col items-end gap-2 xl:flex-row">
|
||||
<x-forms.input class="w-full" id="application.name" label="Name" required />
|
||||
<x-forms.input placeholder="https://coolify.io" class="w-full" id="application.fqdn" label="Domains"
|
||||
helper="You can specify one domain with path or more with comma.<br><span class='inline-block font-bold text-warning'>Example</span>- http://app.coolify.io, https://cloud.coolify.io/dashboard<br>- http://app.coolify.io/api/v3" />
|
||||
helper="You can specify one domain with path or more with comma.<br><span class='bold-helper'>Example</span>- http://app.coolify.io, https://cloud.coolify.io/dashboard<br>- http://app.coolify.io/api/v3" />
|
||||
|
||||
</div>
|
||||
@if ($wildcard_domain)
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
<form wire:submit.prevent='submit'>
|
||||
<div class="flex gap-2">
|
||||
<h3 class="pt-0">Settings</h3>
|
||||
<x-forms.button type="submit">Save</x-forms.button>
|
||||
<x-forms.button wire:click="resetToDefault">Reset to default</x-forms.button>
|
||||
</div>
|
||||
<div class="flex flex-col gap-2 pb-4">
|
||||
<x-forms.input id="application.preview_url_template" label="Preview URL Template"
|
||||
helper="Templates:<span class='bold-helper'>@@{{ random }}</span> to generate random sub-domain each time a PR is deployed, <span class='bold-helper'>@@{{ pr_id }}</span> to use pull request ID as sub-domain or <span class='bold-helper'>@@{{ domain }}</span> to replace the domain name with the application's domain name." />
|
||||
<div class="text-sm">Domain Preview: {{ $preview_url_template }}</div>
|
||||
</div>
|
||||
</form>
|
||||
@@ -1,8 +1,55 @@
|
||||
<div>
|
||||
<h2>Previews</h2>
|
||||
<div class="flex gap-2">
|
||||
@foreach ($application->previews as $preview)
|
||||
<div class="box">{{ $preview['pullRequestId'] }} | {{ $preview['branch'] }}</div>
|
||||
@endforeach
|
||||
<livewire:project.application.preview.form :application="$application" />
|
||||
<h3>Pull Requests on Git</h3>
|
||||
<div>
|
||||
<x-forms.button wire:loading.remove wire:target='load_prs' wire:click="load_prs">Load Pull Requests
|
||||
</x-forms.button>
|
||||
@isset($rate_limit_remaining)
|
||||
<div class="text-sm">Requests remaning till rate limited: {{ $rate_limit_remaining }}</div>
|
||||
@endisset
|
||||
<div wire:loading.remove wire:target='load_prs' class="pt-4">
|
||||
@if (count($pull_requests) > 0)
|
||||
@foreach ($pull_requests as $pull_request)
|
||||
<div>
|
||||
<div>PR #{{ data_get($pull_request, 'number') }} | {{ data_get($pull_request, 'title') }}</div>
|
||||
<x-forms.button wire:click="deploy({{ data_get($pull_request, 'number') }})">Deploy
|
||||
</x-forms.button>
|
||||
</div>
|
||||
@endforeach
|
||||
@endif
|
||||
</div>
|
||||
<div wire:loading wire:target='load_prs'>
|
||||
<x-loading />
|
||||
</div>
|
||||
</div>
|
||||
@if ($application->previews->count() > 0)
|
||||
<h3>Preview Deployments</h3>
|
||||
<div class="flex gap-6 text-sm">
|
||||
@foreach ($application->previews as $preview)
|
||||
<div class="flex flex-col" x-init="$wire.loadStatus({{ data_get($preview, 'pull_request_id') }})">
|
||||
<div>PR #{{ data_get($preview, 'pull_request_id') }} | {{ data_get($preview, 'status') }}
|
||||
@if (data_get($preview, 'status') !== 'exited')
|
||||
| <a target="_blank" href="{{ data_get($preview, 'fqdn') }}">Open Preview
|
||||
<x-external-link />
|
||||
</a>
|
||||
@endif
|
||||
</div>
|
||||
<div class="flex gap-2 pt-2">
|
||||
<x-forms.button isHighlighted wire:click="deploy({{ data_get($preview, 'pull_request_id') }})">
|
||||
@if (data_get($preview, 'status') === 'exited')
|
||||
Deploy
|
||||
@else
|
||||
Redeploy
|
||||
@endif
|
||||
</x-forms.button>
|
||||
@if (data_get($preview, 'status') !== 'exited')
|
||||
<x-forms.button wire:click="stop({{ data_get($preview, 'pull_request_id') }})">Stop
|
||||
</x-forms.button>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user