mirror of
https://github.com/ershisan99/coolify.git
synced 2026-01-25 05:02:09 +00:00
testing php storm code cleanup and styling
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<dialog id="newEmptyProject" class="modal">
|
||||
<form method="dialog" class="flex flex-col gap-2 rounded modal-box" wire:submit.prevent='submit'>
|
||||
<x-forms.input placeholder="Your Cool Project" id="name" label="Name" required />
|
||||
<x-forms.input placeholder="This is my cool project everyone knows about" id="description" label="Description" />
|
||||
<x-forms.input placeholder="Your Cool Project" id="name" label="Name" required/>
|
||||
<x-forms.input placeholder="This is my cool project everyone knows about" id="description" label="Description"/>
|
||||
<x-forms.button onclick="newEmptyProject.close()" type="submit">
|
||||
Save
|
||||
</x-forms.button>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<dialog id="newEnvironment" class="modal">
|
||||
<form method="dialog" class="flex flex-col gap-2 rounded modal-box" wire:submit.prevent='submit'>
|
||||
<x-forms.input placeholder="production" id="name" label="Name" required />
|
||||
<x-forms.input placeholder="production" id="name" label="Name" required/>
|
||||
<x-forms.button onclick="newEnvironment.close()" type="submit">
|
||||
Save
|
||||
</x-forms.button>
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<div class="pt-4">
|
||||
<livewire:project.application.deployment-navbar :application_deployment_queue="$application_deployment_queue" />
|
||||
<livewire:project.application.deployment-navbar :application_deployment_queue="$application_deployment_queue"/>
|
||||
@if (data_get($application_deployment_queue, 'status') === 'in_progress')
|
||||
<div class="flex items-center gap-1 pt-2 ">Deployment is
|
||||
<div class="text-warning"> {{ Str::headline(data_get($this->application_deployment_queue, 'status')) }}.
|
||||
</div>
|
||||
<x-loading class="loading-ring" />
|
||||
<x-loading class="loading-ring"/>
|
||||
</div>
|
||||
<div class="">Logs will be updated automatically.</div>
|
||||
@else
|
||||
@@ -13,7 +13,7 @@
|
||||
</div>
|
||||
@endif
|
||||
<div @if ($isKeepAliveOn) wire:poll.2000ms="polling" @endif
|
||||
class="scrollbar flex flex-col-reverse w-full overflow-y-auto border border-dotted rounded border-coolgray-400 max-h-[32rem] p-2 px-4 mt-4 text-xs">
|
||||
class="scrollbar flex flex-col-reverse w-full overflow-y-auto border border-dotted rounded border-coolgray-400 max-h-[32rem] p-2 px-4 mt-4 text-xs">
|
||||
<span class="flex flex-col">
|
||||
@if (decode_remote_command_output($application_deployment_queue)->count() > 0)
|
||||
@foreach (decode_remote_command_output($application_deployment_queue) as $line)
|
||||
@@ -22,7 +22,9 @@
|
||||
'text-neutral-400' => $line['type'] == 'stdout',
|
||||
'text-error' => $line['type'] == 'stderr',
|
||||
'text-warning' => $line['hidden'],
|
||||
])>[{{ $line['timestamp'] }}] @if ($line['hidden'])<br>Command: {{ $line['command'] }} <br>Output: @endif{{ $line['output'] }}@if ($line['hidden']) @endif</div>
|
||||
])>[{{ $line['timestamp'] }}] @if ($line['hidden'])
|
||||
<br>Command: {{ $line['command'] }} <br>Output:
|
||||
@endif{{ $line['output'] }}@if ($line['hidden']) @endif</div>
|
||||
@endforeach
|
||||
@else
|
||||
<span class="font-mono text-neutral-400">No logs yet.</span>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<div class="flex flex-col gap-2" @if ($skip == 0) wire:poll.5000ms='reload_deployments' @endif>
|
||||
<h2 class="pt-4">Deployments <span class="text-xs">({{ $deployments_count }})</span></h2>
|
||||
@if ($show_next)
|
||||
<x-forms.button wire:click="load_deployments({{ $default_take }})">Show More
|
||||
</x-forms.button>
|
||||
@endif
|
||||
@foreach ($deployments as $deployment)
|
||||
<a @class([
|
||||
<div class="flex flex-col gap-2" @if ($skip == 0) wire:poll.5000ms='reload_deployments' @endif>
|
||||
<h2 class="pt-4">Deployments <span class="text-xs">({{ $deployments_count }})</span></h2>
|
||||
@if ($show_next)
|
||||
<x-forms.button wire:click="load_deployments({{ $default_take }})">Show More
|
||||
</x-forms.button>
|
||||
@endif
|
||||
@foreach ($deployments as $deployment)
|
||||
<a @class([
|
||||
'bg-coolgray-200 p-2 border-l border-dashed transition-colors hover:no-underline',
|
||||
'cursor-not-allowed hover:bg-coolgray-200' =>
|
||||
data_get($deployment, 'status') === 'queued' ||
|
||||
@@ -17,78 +17,79 @@
|
||||
'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">
|
||||
<div>
|
||||
{{ $deployment->id }} <span class=" text-warning">></span> {{ $deployment->deployment_uuid }}
|
||||
<span class=" text-warning">></span>
|
||||
{{ $deployment->status }}
|
||||
</div>
|
||||
@if (data_get($deployment, 'pull_request_id'))
|
||||
<div>
|
||||
Pull Request #{{ data_get($deployment, 'pull_request_id') }}
|
||||
@if (data_get($deployment, 'is_webhook'))
|
||||
(Webhook)
|
||||
@endif
|
||||
</div>
|
||||
@elseif (data_get($deployment, 'is_webhook'))
|
||||
<div>Webhook (sha
|
||||
@if (data_get($deployment, 'commit'))
|
||||
{{ data_get($deployment, 'commit') }})
|
||||
@else
|
||||
HEAD)
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
<div class="flex flex-col" x-data="elapsedTime('{{ $deployment->deployment_uuid }}', '{{ $deployment->status }}', '{{ $deployment->created_at }}', '{{ $deployment->updated_at }}')">
|
||||
<div>
|
||||
@if ($deployment->status !== 'in_progress')
|
||||
Finished <span x-text="measure_since_started()">0s</span> in
|
||||
@else
|
||||
Running for
|
||||
@endif
|
||||
<span class="font-bold" x-text="measure_finished_time()">0s</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
@endforeach
|
||||
<script src="https://cdn.jsdelivr.net/npm/dayjs@1/dayjs.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/dayjs@1/plugin/utc.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/dayjs@1/plugin/relativeTime.js"></script>
|
||||
<script>
|
||||
document.addEventListener('alpine:init', () => {
|
||||
let timers = {};
|
||||
href="{{ $current_url . '/' . data_get($deployment, 'deployment_uuid') }}"
|
||||
@endif
|
||||
class="hover:no-underline">
|
||||
<div class="flex flex-col justify-start">
|
||||
<div>
|
||||
{{ $deployment->id }} <span class=" text-warning">></span> {{ $deployment->deployment_uuid }}
|
||||
<span class=" text-warning">></span>
|
||||
{{ $deployment->status }}
|
||||
</div>
|
||||
@if (data_get($deployment, 'pull_request_id'))
|
||||
<div>
|
||||
Pull Request #{{ data_get($deployment, 'pull_request_id') }}
|
||||
@if (data_get($deployment, 'is_webhook'))
|
||||
(Webhook)
|
||||
@endif
|
||||
</div>
|
||||
@elseif (data_get($deployment, 'is_webhook'))
|
||||
<div>Webhook (sha
|
||||
@if (data_get($deployment, 'commit'))
|
||||
{{ data_get($deployment, 'commit') }})
|
||||
@else
|
||||
HEAD)
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
<div class="flex flex-col"
|
||||
x-data="elapsedTime('{{ $deployment->deployment_uuid }}', '{{ $deployment->status }}', '{{ $deployment->created_at }}', '{{ $deployment->updated_at }}')">
|
||||
<div>
|
||||
@if ($deployment->status !== 'in_progress')
|
||||
Finished <span x-text="measure_since_started()">0s</span> in
|
||||
@else
|
||||
Running for
|
||||
@endif
|
||||
<span class="font-bold" x-text="measure_finished_time()">0s</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
@endforeach
|
||||
<script src="https://cdn.jsdelivr.net/npm/dayjs@1/dayjs.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/dayjs@1/plugin/utc.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/dayjs@1/plugin/relativeTime.js"></script>
|
||||
<script>
|
||||
document.addEventListener('alpine:init', () => {
|
||||
let timers = {};
|
||||
|
||||
dayjs.extend(window.dayjs_plugin_utc);
|
||||
dayjs.extend(window.dayjs_plugin_relativeTime);
|
||||
dayjs.extend(window.dayjs_plugin_utc);
|
||||
dayjs.extend(window.dayjs_plugin_relativeTime);
|
||||
|
||||
Alpine.data('elapsedTime', (uuid, status, created_at, updated_at) => ({
|
||||
finished_time: 'calculating...',
|
||||
started_time: 'calculating...',
|
||||
init() {
|
||||
if (timers[uuid]) {
|
||||
clearInterval(timers[uuid]);
|
||||
}
|
||||
if (status === 'in_progress') {
|
||||
timers[uuid] = setInterval(() => {
|
||||
this.finished_time = dayjs().diff(dayjs.utc(created_at),
|
||||
'second') + 's'
|
||||
}, 1000);
|
||||
} else {
|
||||
let seconds = dayjs.utc(updated_at).diff(dayjs.utc(created_at), 'second')
|
||||
this.finished_time = seconds + 's';
|
||||
}
|
||||
},
|
||||
measure_finished_time() {
|
||||
return this.finished_time;
|
||||
},
|
||||
measure_since_started() {
|
||||
return dayjs.utc(created_at).fromNow();
|
||||
}
|
||||
}))
|
||||
})
|
||||
</script>
|
||||
</div>
|
||||
Alpine.data('elapsedTime', (uuid, status, created_at, updated_at) => ({
|
||||
finished_time: 'calculating...',
|
||||
started_time: 'calculating...',
|
||||
init() {
|
||||
if (timers[uuid]) {
|
||||
clearInterval(timers[uuid]);
|
||||
}
|
||||
if (status === 'in_progress') {
|
||||
timers[uuid] = setInterval(() => {
|
||||
this.finished_time = dayjs().diff(dayjs.utc(created_at),
|
||||
'second') + 's'
|
||||
}, 1000);
|
||||
} else {
|
||||
let seconds = dayjs.utc(updated_at).diff(dayjs.utc(created_at), 'second')
|
||||
this.finished_time = seconds + 's';
|
||||
}
|
||||
},
|
||||
measure_finished_time() {
|
||||
return this.finished_time;
|
||||
},
|
||||
measure_since_started() {
|
||||
return dayjs.utc(created_at).fromNow();
|
||||
}
|
||||
}))
|
||||
})
|
||||
</script>
|
||||
</div>
|
||||
|
||||
@@ -9,11 +9,11 @@
|
||||
<div class="">General configuration for your application.</div>
|
||||
<div class="flex flex-col gap-2 py-4">
|
||||
<div class="flex flex-col items-end gap-2 xl:flex-row">
|
||||
<x-forms.input id="application.name" label="Name" required />
|
||||
<x-forms.input id="application.description" label="Description" />
|
||||
<x-forms.input id="application.name" label="Name" required/>
|
||||
<x-forms.input id="application.description" label="Description"/>
|
||||
</div>
|
||||
<x-forms.input placeholder="https://coolify.io" id="application.fqdn" label="Domains"
|
||||
helper="You can specify one domain with path or more with comma.<br><span class='text-helper'>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='text-helper'>Example</span>- http://app.coolify.io, https://cloud.coolify.io/dashboard<br>- http://app.coolify.io/api/v3"/>
|
||||
@if ($wildcard_domain)
|
||||
<div class="flex flex-row gap-2">
|
||||
@if ($global_wildcard_domain)
|
||||
@@ -39,48 +39,48 @@
|
||||
@endif
|
||||
<h3>Build</h3>
|
||||
<div class="flex flex-col gap-2 xl:flex-row">
|
||||
<x-forms.input placeholder="pnpm install" id="application.install_command" label="Install Command" />
|
||||
<x-forms.input placeholder="pnpm build" id="application.build_command" label="Build Command" />
|
||||
<x-forms.input placeholder="pnpm start" id="application.start_command" label="Start Command" />
|
||||
<x-forms.input placeholder="pnpm install" id="application.install_command" label="Install Command"/>
|
||||
<x-forms.input placeholder="pnpm build" id="application.build_command" label="Build Command"/>
|
||||
<x-forms.input placeholder="pnpm start" id="application.start_command" label="Start Command"/>
|
||||
</div>
|
||||
<div class="flex flex-col gap-2 xl:flex-row">
|
||||
<x-forms.input placeholder="/" id="application.base_directory" label="Base Directory"
|
||||
helper="Directory to use as root. Useful for monorepos. WIP" disabled />
|
||||
helper="Directory to use as root. Useful for monorepos. WIP" disabled/>
|
||||
@if ($application->settings->is_static)
|
||||
<x-forms.input placeholder="/dist" id="application.publish_directory" label="Publish Directory"
|
||||
required />
|
||||
required/>
|
||||
@else
|
||||
<x-forms.input placeholder="/" id="application.publish_directory" label="Publish Directory" />
|
||||
<x-forms.input placeholder="/" id="application.publish_directory" label="Publish Directory"/>
|
||||
@endif
|
||||
</div>
|
||||
<h3>Network</h3>
|
||||
<div class="flex flex-col gap-2 xl:flex-row">
|
||||
@if ($application->settings->is_static)
|
||||
<x-forms.input id="application.ports_exposes" label="Ports Exposes" readonly />
|
||||
<x-forms.input id="application.ports_exposes" label="Ports Exposes" readonly/>
|
||||
@else
|
||||
<x-forms.input placeholder="3000,3001" id="application.ports_exposes" label="Ports Exposes" required
|
||||
helper="A comma separated list of ports you would like to expose for the proxy." />
|
||||
helper="A comma separated list of ports you would like to expose for the proxy."/>
|
||||
@endif
|
||||
<x-forms.input placeholder="3000:3000" id="application.ports_mappings" label="Ports Mappings"
|
||||
helper="A comma separated list of ports you would like to map to the host system. Useful when you do not want to use domains.<br><span class='inline-block font-bold text-warning'>Example</span>3000:3000,3002:3002" />
|
||||
helper="A comma separated list of ports you would like to map to the host system. Useful when you do not want to use domains.<br><span class='inline-block font-bold text-warning'>Example</span>3000:3000,3002:3002"/>
|
||||
</div>
|
||||
</div>
|
||||
<h3>Advanced</h3>
|
||||
<div class="flex flex-col">
|
||||
<x-forms.checkbox instantSave id="is_static" label="Is it a static site?"
|
||||
helper="If your application is a static site or the final build assets should be served as a static site, enable this." />
|
||||
helper="If your application is a static site or the final build assets should be served as a static site, enable this."/>
|
||||
<x-forms.checkbox
|
||||
helper="Your application will be available only on https if your domain starts with https://..."
|
||||
instantSave id="is_force_https_enabled" label="Force Https" />
|
||||
instantSave id="is_force_https_enabled" label="Force Https"/>
|
||||
<x-forms.checkbox helper="Automatically deploy new commits based on Git webhooks." instantSave
|
||||
id="is_auto_deploy_enabled" label="Auto Deploy" />
|
||||
id="is_auto_deploy_enabled" label="Auto Deploy"/>
|
||||
<x-forms.checkbox
|
||||
helper="Allow to automatically deploy Preview Deployments for all opened PR's.<br><br>Closing a PR will delete Preview Deployments."
|
||||
instantSave id="is_preview_deployments_enabled" label="Previews Deployments" />
|
||||
instantSave id="is_preview_deployments_enabled" label="Previews Deployments"/>
|
||||
<x-forms.checkbox instantSave id="is_git_submodules_enabled" label="Git Submodules"
|
||||
helper="Allow Git Submodules during build process." />
|
||||
helper="Allow Git Submodules during build process."/>
|
||||
<x-forms.checkbox instantSave id="is_git_lfs_enabled" label="Git LFS"
|
||||
helper="Allow Git LFS during build process." />
|
||||
helper="Allow Git LFS during build process."/>
|
||||
{{-- <x-forms.checkbox disabled instantSave id="is_dual_cert" label="Dual Certs?" />
|
||||
<x-forms.checkbox disabled instantSave id="is_custom_ssl" label="Is Custom SSL?" />
|
||||
<x-forms.checkbox disabled instantSave id="is_http2" label="Is Http2?" /> --}}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<nav x-init="$wire.check_status" wire:poll.10000ms="check_status">
|
||||
<x-resources.breadcrumbs :resource="$application" :parameters="$parameters" />
|
||||
<x-applications.navbar :application="$application" :parameters="$parameters" />
|
||||
<x-resources.breadcrumbs :resource="$application" :parameters="$parameters"/>
|
||||
<x-applications.navbar :application="$application" :parameters="$parameters"/>
|
||||
</nav>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<div class="pb-4 ">Preview Deployments based on pull requests are here.</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='text-helper'>@@{{ random }}</span> to generate random sub-domain each time a PR is deployed, <span class='text-helper'>@@{{ pr_id }}</span> to use pull request ID as sub-domain or <span class='text-helper'>@@{{ domain }}</span> to replace the domain name with the application's domain name." />
|
||||
helper="Templates:<span class='text-helper'>@@{{ random }}</span> to generate random sub-domain each time a PR is deployed, <span class='text-helper'>@@{{ pr_id }}</span> to use pull request ID as sub-domain or <span class='text-helper'>@@{{ domain }}</span> to replace the domain name with the application's domain name."/>
|
||||
<div class="">Domain Preview: {{ $preview_url_template }}</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<div>
|
||||
<livewire:project.application.preview.form :application="$application" />
|
||||
<livewire:project.application.preview.form :application="$application"/>
|
||||
<div>
|
||||
<div class="flex items-center gap-2">
|
||||
<h3>Pull Requests on Git</h3>
|
||||
@@ -14,33 +14,33 @@
|
||||
<div class="overflow-x-auto table-md">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>PR Number</th>
|
||||
<th>PR Title</th>
|
||||
<th>Git</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>PR Number</th>
|
||||
<th>PR Title</th>
|
||||
<th>Git</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($pull_requests as $pull_request)
|
||||
<tr>
|
||||
<th>{{ data_get($pull_request, 'number') }}</th>
|
||||
<td>{{ data_get($pull_request, 'title') }}</td>
|
||||
<td>
|
||||
<a target="_blank" class="text-xs"
|
||||
href="{{ data_get($pull_request, 'html_url') }}">Open PR on
|
||||
Git
|
||||
<x-external-link />
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<x-forms.button
|
||||
wire:click="deploy('{{ data_get($pull_request, 'number') }}', '{{ data_get($pull_request, 'html_url') }}')">
|
||||
Deploy
|
||||
</x-forms.button>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@foreach ($pull_requests as $pull_request)
|
||||
<tr>
|
||||
<th>{{ data_get($pull_request, 'number') }}</th>
|
||||
<td>{{ data_get($pull_request, 'title') }}</td>
|
||||
<td>
|
||||
<a target="_blank" class="text-xs"
|
||||
href="{{ data_get($pull_request, 'html_url') }}">Open PR on
|
||||
Git
|
||||
<x-external-link/>
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<x-forms.button
|
||||
wire:click="deploy('{{ data_get($pull_request, 'number') }}', '{{ data_get($pull_request, 'html_url') }}')">
|
||||
Deploy
|
||||
</x-forms.button>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@@ -51,23 +51,24 @@
|
||||
<h4 class="py-4" wire:poll.10000ms='previewRefresh'>Deployed Previews</h4>
|
||||
<div class="flex gap-6 ">
|
||||
@foreach ($application->previews as $preview)
|
||||
<div class="flex flex-col p-4 bg-coolgray-200 " x-init="$wire.loadStatus('{{ data_get($preview, 'pull_request_id') }}')">
|
||||
<div class="flex flex-col p-4 bg-coolgray-200 "
|
||||
x-init="$wire.loadStatus('{{ data_get($preview, 'pull_request_id') }}')">
|
||||
<div class="flex gap-2">PR #{{ data_get($preview, 'pull_request_id') }} |
|
||||
@if (data_get($preview, 'status') === 'running')
|
||||
<x-status.running />
|
||||
<x-status.running/>
|
||||
@elseif (data_get($preview, 'status') === 'restarting')
|
||||
<x-status.restarting />
|
||||
<x-status.restarting/>
|
||||
@else
|
||||
<x-status.stopped />
|
||||
<x-status.stopped/>
|
||||
@endif
|
||||
@if (data_get($preview, 'status') !== 'exited')
|
||||
| <a target="_blank" href="{{ data_get($preview, 'fqdn') }}">Open Preview
|
||||
<x-external-link />
|
||||
<x-external-link/>
|
||||
</a>
|
||||
@endif
|
||||
|
|
||||
<a target="_blank" href="{{ data_get($preview, 'pull_request_html_url') }}">Open PR on Git
|
||||
<x-external-link />
|
||||
<x-external-link/>
|
||||
</a>
|
||||
</div>
|
||||
<div class="flex items-center gap-2 pt-6">
|
||||
|
||||
@@ -6,20 +6,20 @@
|
||||
<a target="_blank" class="hover:no-underline" href="{{ $application?->gitBranchLocation }}">
|
||||
<x-forms.button>
|
||||
Open Repository
|
||||
<x-external-link />
|
||||
<x-external-link/>
|
||||
</x-forms.button>
|
||||
</a>
|
||||
@if (!$application->source->is_public)
|
||||
<a target="_blank" class="hover:no-underline" href="{{ get_installation_path($application->source) }}">
|
||||
<x-forms.button>
|
||||
Open Git App
|
||||
<x-external-link />
|
||||
<x-external-link/>
|
||||
</x-forms.button>
|
||||
</a>
|
||||
@endif
|
||||
<a target="_blank" class="flex hover:no-underline" href="{{ $application?->gitCommits }}">
|
||||
<x-forms.button>Open Commits on Git
|
||||
<x-external-link />
|
||||
<x-external-link/>
|
||||
</x-forms.button>
|
||||
</a>
|
||||
</div>
|
||||
@@ -27,11 +27,11 @@
|
||||
|
||||
<div class="flex gap-2">
|
||||
<x-forms.input placeholder="coollabsio/coolify-example" id="application.git_repository"
|
||||
label="Repository" />
|
||||
<x-forms.input placeholder="main" id="application.git_branch" label="Branch" />
|
||||
label="Repository"/>
|
||||
<x-forms.input placeholder="main" id="application.git_branch" label="Branch"/>
|
||||
</div>
|
||||
<div class="flex items-end gap-2">
|
||||
<x-forms.input placeholder="HEAD" id="application.git_commit_sha" placeholder="HEAD" label="Commit SHA" />
|
||||
<x-forms.input placeholder="HEAD" id="application.git_commit_sha" placeholder="HEAD" label="Commit SHA"/>
|
||||
|
||||
</div>
|
||||
@isset($application->private_key_id)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<nav x-init="$wire.check_status" wire:poll.10000ms="check_status">
|
||||
<x-resources.breadcrumbs :resource="$database" :parameters="$parameters" />
|
||||
<x-databases.navbar :database="$database" :parameters="$parameters" />
|
||||
<x-resources.breadcrumbs :resource="$database" :parameters="$parameters"/>
|
||||
<x-databases.navbar :database="$database" :parameters="$parameters"/>
|
||||
</nav>
|
||||
|
||||
@@ -7,28 +7,32 @@
|
||||
</x-forms.button>
|
||||
</div>
|
||||
<div class="flex gap-2">
|
||||
<x-forms.input label="Name" id="database.name" />
|
||||
<x-forms.input label="Description" id="database.description" />
|
||||
<x-forms.input label="Name" id="database.name"/>
|
||||
<x-forms.input label="Description" id="database.description"/>
|
||||
<x-forms.input label="Image" id="database.image" required
|
||||
helper="For all available images, check here:<br><br><a target='_blank' href='https://hub.docker.com/_/postgres'>https://hub.docker.com/_/postgres</a>" />
|
||||
helper="For all available images, check here:<br><br><a target='_blank' href='https://hub.docker.com/_/postgres'>https://hub.docker.com/_/postgres</a>"/>
|
||||
<x-forms.input placeholder="3000:3000" id="database.ports_mappings" label="Ports Mappings"
|
||||
helper="A comma separated list of ports you would like to map to the host system. Useful when you do not want to use domains.<br><span class='inline-block font-bold text-warning'>Example</span>3000:3000,3002:3002"/>
|
||||
</div>
|
||||
<div class="flex gap-2">
|
||||
@if ($database->started_at)
|
||||
<x-forms.input label="Username" id="database.postgres_username" placeholder="If empty, use postgres."
|
||||
readonly />
|
||||
<x-forms.input label="Password" id="database.postgres_password" type="password" required readonly />
|
||||
<x-forms.input label="Database" id="database.postgres_db" placeholder="If empty, use $USERNAME."
|
||||
readonly />
|
||||
<x-forms.input label="Username" id="database.postgres_username" placeholder="If empty: postgres"
|
||||
readonly/>
|
||||
<x-forms.input label="Password" id="database.postgres_password" type="password" required readonly/>
|
||||
<x-forms.input label="Database" id="database.postgres_db"
|
||||
placeholder="If empty, it will be the same as Username."
|
||||
readonly/>
|
||||
@else
|
||||
<x-forms.input label="Username" id="database.postgres_username" placeholder="If empty, use postgres." />
|
||||
<x-forms.input label="Password" id="database.postgres_password" type="password" required />
|
||||
<x-forms.input label="Database" id="database.postgres_db" placeholder="If empty, use $USERNAME." />
|
||||
<x-forms.input label="Username" id="database.postgres_username" placeholder="If empty: postgres"/>
|
||||
<x-forms.input label="Password" id="database.postgres_password" type="password" required/>
|
||||
<x-forms.input label="Database" id="database.postgres_db"
|
||||
placeholder="If empty, it will be the same as Username."/>
|
||||
@endif
|
||||
|
||||
</div>
|
||||
<x-forms.input label="Initial Arguments" id="database.postgres_initdb_args"
|
||||
placeholder="If empty, use default." />
|
||||
placeholder="If empty, use default. See in docker docs."/>
|
||||
<x-forms.input label="Host Auth Method" id="database.postgres_host_auth_method"
|
||||
placeholder="If empty, use default." />
|
||||
placeholder="If empty, use default. See in docker docs."/>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -4,5 +4,5 @@
|
||||
<p>This environment will be deleted. It is not reversible. <br>Please think again.</p>
|
||||
</x-slot:modalBody>
|
||||
</x-modal>
|
||||
<x-forms.button isError isModal modalId="deleteEnvironment"> Delete Environment </x-forms.button>
|
||||
<x-forms.button isError isModal modalId="deleteEnvironment"> Delete Environment</x-forms.button>
|
||||
</div>
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
<h1>Project: {{ data_get($project, 'name') }}</h1>
|
||||
<x-forms.button type="submit">Save</x-forms.button>
|
||||
@if ($project->applications->count() === 0)
|
||||
<livewire:project.delete-project :project_id="$project->id" />
|
||||
<livewire:project.delete-project :project_id="$project->id"/>
|
||||
@endif
|
||||
</div>
|
||||
<div class="pb-10">Edit project details here.</div>
|
||||
<div class="flex gap-2">
|
||||
<x-forms.input label="Name" id="project.name" />
|
||||
<x-forms.input label="Description" id="project.description" />
|
||||
<x-forms.input label="Name" id="project.name"/>
|
||||
<x-forms.input label="Description" id="project.description"/>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -11,24 +11,24 @@
|
||||
@foreach ($private_keys as $key)
|
||||
@if ($private_key_id == $key->id)
|
||||
<div class="gap-2 py-4 cursor-pointer group hover:bg-coollabs bg-coolgray-200"
|
||||
wire:click.defer="setPrivateKey('{{ $key->id }}')" wire:key="{{ $key->id }}">
|
||||
wire:click.defer="setPrivateKey('{{ $key->id }}')" wire:key="{{ $key->id }}">
|
||||
<div class="flex gap-4 mx-6">
|
||||
<div class="group-hover:text-white">
|
||||
{{ $key->name }}
|
||||
</div>
|
||||
<span wire:target="loadRepositories" wire:loading.delay
|
||||
class="loading loading-xs text-warning loading-spinner"></span>
|
||||
class="loading loading-xs text-warning loading-spinner"></span>
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
<div class="gap-2 py-4 cursor-pointer group hover:bg-coollabs bg-coolgray-200"
|
||||
wire:click.defer="setPrivateKey('{{ $key->id }}')" wire:key="{{ $key->id }}">
|
||||
wire:click.defer="setPrivateKey('{{ $key->id }}')" wire:key="{{ $key->id }}">
|
||||
<div class="flex gap-4 mx-6">
|
||||
<div class="group-hover:text-white">
|
||||
{{ $key->name }}
|
||||
</div>
|
||||
<span wire:target="loadRepositories" wire:loading.delay
|
||||
class="loading loading-xs text-warning loading-spinner"></span>
|
||||
class="loading loading-xs text-warning loading-spinner"></span>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@@ -43,17 +43,17 @@
|
||||
<form class="flex flex-col gap-2 pb-6" wire:submit.prevent='submit'>
|
||||
<div class="flex gap-2">
|
||||
<x-forms.input id="repository_url" required label="Repository URL"
|
||||
helper="{!! __('repository.url') !!}" />
|
||||
<x-forms.input id="branch" required label="Branch" />
|
||||
helper="{!! __('repository.url') !!}"/>
|
||||
<x-forms.input id="branch" required label="Branch"/>
|
||||
@if ($is_static)
|
||||
<x-forms.input id="publish_directory" required label="Publish Directory" />
|
||||
<x-forms.input id="publish_directory" required label="Publish Directory"/>
|
||||
@else
|
||||
<x-forms.input type="number" required id="port" label="Port" :readonly="$is_static" />
|
||||
<x-forms.input type="number" required id="port" label="Port" :readonly="$is_static"/>
|
||||
@endif
|
||||
</div>
|
||||
<div class="w-52">
|
||||
<x-forms.checkbox instantSave id="is_static" label="Is it a static site?"
|
||||
helper="If your application is a static site or the final build assets should be served as a static site, enable this." />
|
||||
helper="If your application is a static site or the final build assets should be served as a static site, enable this."/>
|
||||
</div>
|
||||
<x-forms.button type="submit">
|
||||
Save New Application
|
||||
|
||||
@@ -12,25 +12,25 @@
|
||||
@foreach ($github_apps as $ghapp)
|
||||
@if ($selected_github_app_id == $ghapp->id)
|
||||
<div class="gap-2 py-4 cursor-pointer group hover:bg-coollabs bg-coolgray-200"
|
||||
wire:click.prevent="loadRepositories({{ $ghapp->id }})" wire:key="{{ $ghapp->id }}">
|
||||
wire:click.prevent="loadRepositories({{ $ghapp->id }})" wire:key="{{ $ghapp->id }}">
|
||||
<div class="flex gap-4 mx-6">
|
||||
<div class="group-hover:text-white">
|
||||
{{ $ghapp->name }}
|
||||
</div>
|
||||
<span wire:target="loadRepositories" wire:loading.delay
|
||||
class="loading loading-xs text-warning loading-spinner"></span>
|
||||
class="loading loading-xs text-warning loading-spinner"></span>
|
||||
</div>
|
||||
</div>
|
||||
@else
|
||||
<div class="gap-2 py-4 cursor-pointer group hover:bg-coollabs bg-coolgray-200"
|
||||
wire:click.prevent="loadRepositories({{ $ghapp->id }})"
|
||||
wire:key="{{ $ghapp->id }}">
|
||||
wire:click.prevent="loadRepositories({{ $ghapp->id }})"
|
||||
wire:key="{{ $ghapp->id }}">
|
||||
<div class="flex gap-4 mx-6">
|
||||
<div class="group-hover:text-white">
|
||||
{{ $ghapp->name }}
|
||||
</div>
|
||||
<span wire:target="loadRepositories" wire:loading.delay
|
||||
class="loading loading-xs text-warning loading-spinner"></span>
|
||||
class="loading loading-xs text-warning loading-spinner"></span>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@@ -45,7 +45,7 @@
|
||||
@if ($repositories->count() > 0)
|
||||
<div class="flex items-end gap-2">
|
||||
<x-forms.select class="w-full" label="Repository URL" helper="{!! __('repository.url') !!}"
|
||||
wire:model.defer="selected_repository_id">
|
||||
wire:model.defer="selected_repository_id">
|
||||
@foreach ($repositories as $repo)
|
||||
@if ($loop->first)
|
||||
<option selected value="{{ data_get($repo, 'id') }}">
|
||||
@@ -58,7 +58,8 @@
|
||||
@endforeach
|
||||
</x-forms.select>
|
||||
<x-forms.button wire:click.prevent="loadBranches"> Check
|
||||
repository</x-forms.button>
|
||||
repository
|
||||
</x-forms.button>
|
||||
</div>
|
||||
@else
|
||||
<div>No repositories found. Check your GitHub App configuration.</div>
|
||||
@@ -85,29 +86,29 @@
|
||||
</x-forms.select>
|
||||
@if ($is_static)
|
||||
<x-forms.input id="publish_directory" label="Publish Directory"
|
||||
helper="If there is a build process involved (like Svelte, React, Next, etc..), please specify the output directory for the build assets." />
|
||||
helper="If there is a build process involved (like Svelte, React, Next, etc..), please specify the output directory for the build assets."/>
|
||||
@else
|
||||
<x-forms.input type="number" id="port" label="Port" :readonly="$is_static"
|
||||
helper="The port your application listens on." />
|
||||
helper="The port your application listens on."/>
|
||||
@endif
|
||||
</div>
|
||||
<div class="w-52">
|
||||
<x-forms.checkbox instantSave id="is_static" label="Is it a static site?"
|
||||
helper="If your application is a static site or the final build assets should be served as a static site, enable this." />
|
||||
helper="If your application is a static site or the final build assets should be served as a static site, enable this."/>
|
||||
</div>
|
||||
</div>
|
||||
<x-forms.button type="submit">
|
||||
Save New Application
|
||||
</x-forms.button>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
@else
|
||||
<div>
|
||||
<div>No Git App found.</div>
|
||||
<a href="/source/new">
|
||||
<x-forms.button>Add</x-forms.button>
|
||||
</a>
|
||||
</div>
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
@else
|
||||
<div>
|
||||
<div>No Git App found.</div>
|
||||
<a href="/source/new">
|
||||
<x-forms.button>Add</x-forms.button>
|
||||
</a>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<div class="flex flex-col">
|
||||
<div class="flex items-end gap-2">
|
||||
<x-forms.input wire:keydown.enter='load_branch' id="repository_url" label="Repository URL"
|
||||
helper="{!! __('repository.url') !!}" />
|
||||
helper="{!! __('repository.url') !!}"/>
|
||||
<x-forms.button wire:click.prevent="load_branch">
|
||||
Check repository
|
||||
</x-forms.button>
|
||||
@@ -16,25 +16,25 @@
|
||||
<div class="flex gap-2 py-2">
|
||||
<div>Rate Limit</div>
|
||||
<x-helper
|
||||
helper="Rate limit remaining: {{ $rate_limit_remaining }}<br>Rate limit reset at: {{ $rate_limit_reset }}" />
|
||||
helper="Rate limit remaining: {{ $rate_limit_remaining }}<br>Rate limit reset at: {{ $rate_limit_reset }}"/>
|
||||
</div>
|
||||
@endif
|
||||
<h3 class="pt-8 pb-2">Details</h3>
|
||||
<div class="flex flex-col gap-2 pb-6">
|
||||
<div class="flex gap-2">
|
||||
<x-forms.input disabled id="git_branch" label="Selected branch"
|
||||
helper="You can select other branches after configuration is done." />
|
||||
helper="You can select other branches after configuration is done."/>
|
||||
@if ($is_static)
|
||||
<x-forms.input id="publish_directory" label="Publish Directory"
|
||||
helper="If there is a build process involved (like Svelte, React, Next, etc..), please specify the output directory for the build assets." />
|
||||
helper="If there is a build process involved (like Svelte, React, Next, etc..), please specify the output directory for the build assets."/>
|
||||
@else
|
||||
<x-forms.input type="number" id="port" label="Port" :readonly="$is_static"
|
||||
helper="The port your application listens on." />
|
||||
helper="The port your application listens on."/>
|
||||
@endif
|
||||
</div>
|
||||
<div class="w-52">
|
||||
<x-forms.checkbox instantSave id="is_static" label="Is it a static site?"
|
||||
helper="If your application is a static site or the final build assets should be served as a static site, enable this." />
|
||||
helper="If your application is a static site or the final build assets should be served as a static site, enable this."/>
|
||||
</div>
|
||||
</div>
|
||||
<x-forms.button wire:click.prevent='submit'>
|
||||
|
||||
@@ -11,46 +11,50 @@
|
||||
<h3 class="pb-4">Applications</h3>
|
||||
<div class="flex flex-col justify-center gap-2 text-left xl:flex-row">
|
||||
<div class="gap-2 py-4 cursor-pointer group hover:bg-coollabs bg-coolgray-200"
|
||||
wire:click="set_type('public')">
|
||||
wire:click="set_type('public')">
|
||||
<div class="flex flex-col mx-6">
|
||||
<div class="group-hover:text-white">
|
||||
Public Repository
|
||||
</div>
|
||||
<div class="text-xs group-hover:text-white">
|
||||
You can deploy any kind of public repositories from the supported git servers.</div>
|
||||
You can deploy any kind of public repositories from the supported git servers.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="gap-2 py-4 cursor-pointer group hover:bg-coollabs bg-coolgray-200"
|
||||
wire:click="set_type('private-gh-app')">
|
||||
wire:click="set_type('private-gh-app')">
|
||||
<div class="flex flex-col mx-6">
|
||||
<div class="group-hover:text-white">
|
||||
Private Repository
|
||||
</div>
|
||||
<div class="text-xs group-hover:text-white">
|
||||
You can deploy public & private repositories through your GitHub Apps.</div>
|
||||
You can deploy public & private repositories through your GitHub Apps.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="gap-2 py-4 cursor-pointer group hover:bg-coollabs bg-coolgray-200"
|
||||
wire:click="set_type('private-deploy-key')">
|
||||
wire:click="set_type('private-deploy-key')">
|
||||
<div class="flex flex-col mx-6">
|
||||
<div class="group-hover:text-white">
|
||||
Private Repository (with deploy key)
|
||||
</div>
|
||||
<div class="text-xs group-hover:text-white">
|
||||
You can deploy public & private repositories with a simple deploy key.</div>
|
||||
You can deploy public & private repositories with a simple deploy key.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<h3 class="py-4">Databases</h3>
|
||||
<div class="flex flex-col justify-center gap-2 text-left xl:flex-row">
|
||||
<div class="gap-2 py-4 cursor-pointer group hover:bg-coollabs bg-coolgray-200"
|
||||
wire:click="set_type('postgresql')">
|
||||
wire:click="set_type('postgresql')">
|
||||
<div class="flex flex-col mx-6">
|
||||
<div class="group-hover:text-white">
|
||||
PostgreSQL
|
||||
</div>
|
||||
<div class="text-xs group-hover:text-white">
|
||||
The most loved relational database in the world.</div>
|
||||
The most loved relational database in the world.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -65,7 +69,7 @@
|
||||
<div class="flex flex-col justify-center gap-2 text-left xl:flex-row">
|
||||
@foreach ($servers as $server)
|
||||
<div class="gap-2 py-4 cursor-pointer group hover:bg-coollabs bg-coolgray-200"
|
||||
wire:click="set_server({{ $server }})">
|
||||
wire:click="set_server({{ $server }})">
|
||||
<div class="flex flex-col mx-6">
|
||||
<div class="group-hover:text-white">
|
||||
{{ $server->name }}
|
||||
@@ -86,7 +90,7 @@
|
||||
<div class="flex flex-col justify-center gap-2 text-left xl:flex-row">
|
||||
@foreach ($destinations as $destination)
|
||||
<div class="gap-2 py-4 cursor-pointer group hover:bg-coollabs bg-coolgray-200"
|
||||
wire:click="set_destination('{{ $destination->uuid }}')">
|
||||
wire:click="set_destination('{{ $destination->uuid }}')">
|
||||
<div class="flex flex-col mx-6">
|
||||
<div class="group-hover:text-white">
|
||||
{{ $destination->name }}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<dialog id="newVariable" class="modal">
|
||||
<form method="dialog" class="flex flex-col gap-2 rounded modal-box" wire:submit.prevent='submit'>
|
||||
<h3 class="text-lg font-bold">Add Environment Variable</h3>
|
||||
<x-forms.input placeholder="NODE_ENV" id="key" label="Name" required />
|
||||
<x-forms.input placeholder="production" id="value" label="Value" required />
|
||||
<x-forms.input placeholder="NODE_ENV" id="key" label="Name" required/>
|
||||
<x-forms.input placeholder="production" id="value" label="Value" required/>
|
||||
@if (data_get($parameters, 'application_uuid'))
|
||||
<x-forms.checkbox id="is_build_time" label="Build Variable?" />
|
||||
<x-forms.checkbox id="is_build_time" label="Build Variable?"/>
|
||||
@endif
|
||||
<x-forms.button onclick="newVariable.close()" type="submit">
|
||||
Save
|
||||
|
||||
@@ -3,13 +3,13 @@
|
||||
<div class="flex items-center gap-2">
|
||||
<h2>Environment Variables</h2>
|
||||
<x-forms.button class="btn" onclick="newVariable.showModal()">+ Add</x-forms.button>
|
||||
<livewire:project.shared.environment-variable.add />
|
||||
<livewire:project.shared.environment-variable.add/>
|
||||
</div>
|
||||
<div>Environment (secrets) variables for this resource.</div>
|
||||
</div>
|
||||
@forelse ($resource->environment_variables as $env)
|
||||
<livewire:project.shared.environment-variable.show wire:key="environment-{{ $env->id }}"
|
||||
:env="$env" />
|
||||
:env="$env"/>
|
||||
@empty
|
||||
<div class="text-neutral-500">No environment variables found.</div>
|
||||
@endforelse
|
||||
@@ -20,7 +20,7 @@
|
||||
</div>
|
||||
@foreach ($resource->environment_variables_preview as $env)
|
||||
<livewire:project.shared.environment-variable.show wire:key="environment-{{ $env->id }}"
|
||||
:env="$env" />
|
||||
:env="$env"/>
|
||||
@endforeach
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
</x-slot:modalBody>
|
||||
</x-modal>
|
||||
<form wire:submit.prevent='submit' class="flex flex-col items-center gap-2 xl:flex-row">
|
||||
<x-forms.input id="env.key" />
|
||||
<x-forms.input type="password" id="env.value" />
|
||||
<x-forms.input id="env.key"/>
|
||||
<x-forms.input type="password" id="env.value"/>
|
||||
@if (data_get($parameters, 'application_uuid'))
|
||||
<x-forms.checkbox disabled id="env.is_build_time" label="Build Variable?" />
|
||||
<x-forms.checkbox disabled id="env.is_build_time" label="Build Variable?"/>
|
||||
@endif
|
||||
<div class="flex gap-2">
|
||||
<x-forms.button type="submit">
|
||||
|
||||
@@ -7,20 +7,20 @@
|
||||
<div class="">Limit your container resources by CPU & memory.</div>
|
||||
<h3 class="pt-4">Limit CPUs</h3>
|
||||
<div class="flex gap-2">
|
||||
<x-forms.input placeholder="1.5" label="Number of CPUs" id="resource.limits_cpus" />
|
||||
<x-forms.input placeholder="0-2" label="CPU sets to use" id="resource.limits_cpuset" />
|
||||
<x-forms.input placeholder="1024" label="CPU Weight" id="resource.limits_cpu_shares" />
|
||||
<x-forms.input placeholder="1.5" label="Number of CPUs" id="resource.limits_cpus"/>
|
||||
<x-forms.input placeholder="0-2" label="CPU sets to use" id="resource.limits_cpuset"/>
|
||||
<x-forms.input placeholder="1024" label="CPU Weight" id="resource.limits_cpu_shares"/>
|
||||
</div>
|
||||
<h3 class="pt-4">Limit Memory</h3>
|
||||
<div class="flex gap-2">
|
||||
<x-forms.input placeholder="69b or 420k or 1337m or 1g" label="Soft Memory Limit"
|
||||
id="resource.limits_memory_reservation" />
|
||||
id="resource.limits_memory_reservation"/>
|
||||
<x-forms.input placeholder="69b or 420k or 1337m or 1g" label="Maximum Memory Limit"
|
||||
id="resource.limits_memory" />
|
||||
id="resource.limits_memory"/>
|
||||
<x-forms.input placeholder="69b or 420k or 1337m or 1g" label="Maximum Swap Limit"
|
||||
id="resource.limits_memory_swap" />
|
||||
id="resource.limits_memory_swap"/>
|
||||
<x-forms.input placeholder="0-100" type="number" min="0" max="100" label="Swappiness"
|
||||
id="resource.limits_memory_swappiness" />
|
||||
id="resource.limits_memory_swappiness"/>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
<dialog id="newStorage" class="modal">
|
||||
<form method="dialog" class="flex flex-col gap-2 rounded modal-box" wire:submit.prevent='submit'>
|
||||
<h3 class="text-lg font-bold">Add Storage Volume</h3>
|
||||
<x-forms.input placeholder="pv-name" id="name" label="Name" required />
|
||||
<x-forms.input placeholder="/root" id="host_path" label="Source Path" />
|
||||
<x-forms.input placeholder="/tmp/root" id="mount_path" label="Destination Path" required />
|
||||
<x-forms.input placeholder="pv-name" id="name" label="Name" required/>
|
||||
<x-forms.input placeholder="/root" id="host_path" label="Source Path"/>
|
||||
<x-forms.input placeholder="/tmp/root" id="mount_path" label="Destination Path" required/>
|
||||
<x-forms.button onclick="newStorage.close()" type="submit">
|
||||
Save
|
||||
</x-forms.button>
|
||||
|
||||
@@ -5,15 +5,15 @@
|
||||
<x-helper
|
||||
helper="For Preview Deployments, storage has a <span class='text-helper'>-pr-#PRNumber</span> in their
|
||||
volume
|
||||
name, example: <span class='text-helper'>-pr-1</span>" />
|
||||
name, example: <span class='text-helper'>-pr-1</span>"/>
|
||||
<x-forms.button class="btn" onclick="newStorage.showModal()">+ Add</x-forms.button>
|
||||
<livewire:project.shared.storages.add />
|
||||
<livewire:project.shared.storages.add/>
|
||||
</div>
|
||||
<div class="">Persistent storage to preserve data between deployments.</div>
|
||||
</div>
|
||||
<div class="flex flex-col gap-2 py-4">
|
||||
@forelse ($resource->persistentStorages as $storage)
|
||||
<livewire:project.shared.storages.show wire:key="storage-{{ $storage->id }}" :storage="$storage" />
|
||||
<livewire:project.shared.storages.show wire:key="storage-{{ $storage->id }}" :storage="$storage"/>
|
||||
@empty
|
||||
<div class="text-neutral-500">No storages found.</div>
|
||||
@endforelse
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
<div>
|
||||
<x-modal yesOrNo modalId="{{ $modalId }}" modalTitle="Delete Storage">
|
||||
<x-slot:modalBody>
|
||||
<p>This storage will be deleted <span class="font-bold text-warning">({{ $storage->name }})</span>. It is not
|
||||
<p>This storage will be deleted <span class="font-bold text-warning">({{ $storage->name }})</span>. It is
|
||||
not
|
||||
reversible. <br>Please think again.</p>
|
||||
</x-slot:modalBody>
|
||||
</x-modal>
|
||||
<form wire:submit.prevent='submit' class="flex flex-col gap-2 xl:items-end xl:flex-row">
|
||||
@if ($storage->is_readonly)
|
||||
<x-forms.input id="storage.name" label="Name" required readonly />
|
||||
<x-forms.input id="storage.host_path" label="Source Path" readonly />
|
||||
<x-forms.input id="storage.mount_path" label="Destination Path" required readonly />
|
||||
<x-forms.input id="storage.name" label="Name" required readonly/>
|
||||
<x-forms.input id="storage.host_path" label="Source Path" readonly/>
|
||||
<x-forms.input id="storage.mount_path" label="Destination Path" required readonly/>
|
||||
<div class="flex gap-2">
|
||||
<x-forms.button type="submit" disabled>
|
||||
Update
|
||||
@@ -19,9 +20,9 @@
|
||||
</x-forms.button>
|
||||
</div>
|
||||
@else
|
||||
<x-forms.input id="storage.name" label="Name" required />
|
||||
<x-forms.input id="storage.host_path" label="Source Path" />
|
||||
<x-forms.input id="storage.mount_path" label="Destination Path" required />
|
||||
<x-forms.input id="storage.name" label="Name" required/>
|
||||
<x-forms.input id="storage.host_path" label="Source Path"/>
|
||||
<x-forms.input id="storage.mount_path" label="Destination Path" required/>
|
||||
<div class="flex gap-2">
|
||||
<x-forms.button type="submit">
|
||||
Update
|
||||
|
||||
Reference in New Issue
Block a user