mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-17 08:14:25 +00:00
feat(ui): polish DB public access, backups, and nav
Gate public TCP proxy until a port is set, show loading while saving access, and open proxy logs in process-dialog. Compact backup execution actions, add Postgres general section anchors, and tint resource Actions icons with warning color.
This commit is contained in:
1 parent
7d5c9fdbe1
commit
9c0908f0fc
35 files changed
+413
-143
No files matched your search
@@ -31,8 +31,8 @@
|
||||
|| $backup->database_type === 'App\Models\StandaloneMariadb')
|
||||
<div class="grid w-full gap-4">
|
||||
<x-forms.listbox id="dumpAll" label="Database selection" onChange="instantSave" :options="[
|
||||
['value' => true, 'label' => 'Back up all databases'],
|
||||
['value' => false, 'label' => 'Choose databases'],
|
||||
['value' => true, 'label' => 'All databases'],
|
||||
['value' => false, 'label' => 'Specific databases'],
|
||||
]" />
|
||||
@if (! $backup->dump_all)
|
||||
<div class="w-full" x-data="{
|
||||
|
||||
@@ -25,8 +25,9 @@
|
||||
|
||||
<div @if (! $skip) wire:poll.5000ms="refreshBackupExecutions" @endif
|
||||
class="application-settings-section-body p-0!">
|
||||
<div class="data-table">
|
||||
<div class="data-table-header backup-executions-table-grid">
|
||||
<div class="data-table deployment-table-scroll">
|
||||
<div
|
||||
class="data-table-header backup-executions-table-grid h-auto rounded-none px-4 py-2.5 text-[11px]">
|
||||
<span>Status</span>
|
||||
<span>Database</span>
|
||||
<span>Finished</span>
|
||||
@@ -67,7 +68,7 @@
|
||||
@endphp
|
||||
<div wire:key="{{ data_get($execution, 'id') }}"
|
||||
class="border-b border-neutral-200 last:border-b-0 dark:border-white/[0.06]">
|
||||
<div class="data-table-row backup-executions-table-grid">
|
||||
<div class="data-table-row backup-executions-table-grid min-h-14 px-4 py-2.5">
|
||||
<div class="flex items-center gap-2">
|
||||
<x-status-badge :status="$executionStatusLabel"
|
||||
:type="$executionStatusType" />
|
||||
@@ -110,19 +111,24 @@
|
||||
</div>
|
||||
<div class="flex items-center justify-end gap-1">
|
||||
@if ($executionStatus === 'success')
|
||||
<button type="button" class="button"
|
||||
x-on:click="download_file('{{ data_get($execution, 'id') }}')">
|
||||
Download
|
||||
<button type="button" class="icon-button shrink-0"
|
||||
x-on:click="download_file('{{ data_get($execution, 'id') }}')"
|
||||
title="Download backup" aria-label="Download backup">
|
||||
<x-reicon name="upload" class="size-3.5 rotate-180" />
|
||||
</button>
|
||||
@endif
|
||||
<x-modal-confirmation title="Confirm Backup Deletion?" isErrorButton
|
||||
submitAction="deleteBackup({{ data_get($execution, 'id') }})"
|
||||
:checkboxes="$executionCheckboxes" :actions="$deleteActions"
|
||||
confirmationText="{{ data_get($execution, 'filename') }}"
|
||||
confirmationLabel="Enter the backup filename to confirm."
|
||||
shortConfirmationLabel="Backup Filename">
|
||||
confirmationLabel="Enter the backup filename to confirm."
|
||||
shortConfirmationLabel="Backup Filename">
|
||||
<x-slot:trigger>
|
||||
<x-forms.button isError>Delete</x-forms.button>
|
||||
<button type="button"
|
||||
class="icon-button shrink-0 text-red-500 hover:text-red-600 dark:text-red-400 dark:hover:text-red-300"
|
||||
title="Delete backup" aria-label="Delete backup">
|
||||
<x-reicon name="trash" class="size-3.5" />
|
||||
</button>
|
||||
</x-slot:trigger>
|
||||
</x-modal-confirmation>
|
||||
</div>
|
||||
@@ -135,18 +141,22 @@
|
||||
@endif
|
||||
</div>
|
||||
@empty
|
||||
<x-empty size="sm" title="No backup executions"
|
||||
description="Execution history appears here after the schedule runs."
|
||||
icon-name="browser-terminal" />
|
||||
<div class="p-4">
|
||||
<x-empty size="sm" title="No backup executions"
|
||||
description="Execution history appears here after the schedule runs."
|
||||
icon-name="browser-terminal" />
|
||||
</div>
|
||||
@endforelse
|
||||
</div>
|
||||
|
||||
@if ($executions_count > 0)
|
||||
<div
|
||||
class="flex items-center justify-between border-t border-neutral-200 px-4 py-3 text-sm text-neutral-500 dark:border-white/[0.06] dark:text-fg-dim">
|
||||
<span>{{ $executions_count }} execution{{ $executions_count === 1 ? '' : 's' }}</span>
|
||||
<div class="flex items-center gap-2">
|
||||
<span>Page {{ $currentPage }} of {{ ceil($executions_count / $defaultTake) }}</span>
|
||||
class="flex min-h-11 items-center justify-between border-t border-neutral-200 px-4 text-[11px] text-neutral-500 dark:border-white/[0.08] dark:text-fg-faint">
|
||||
<span>
|
||||
{{ $skip + 1 }}-{{ min($skip + $defaultTake, $executions_count) }} of
|
||||
{{ $executions_count }}
|
||||
</span>
|
||||
<div class="flex items-center gap-1">
|
||||
<button type="button" class="icon-button" @disabled(! $showPrev)
|
||||
wire:click="previousPage('{{ $defaultTake }}')" aria-label="Previous page">
|
||||
<x-reicon name="arrow-right" class="size-3.5 rotate-180" />
|
||||
|
||||
@@ -61,26 +61,29 @@
|
||||
</div>
|
||||
</x-application.settings-section>
|
||||
|
||||
<x-application.settings-section title="Public access"
|
||||
<x-application.settings-section title="Public access" class="relative"
|
||||
description="Expose this database through the managed TCP proxy.">
|
||||
<x-slot:actions>
|
||||
@if ($isPublic)
|
||||
<x-slide-over fullScreen>
|
||||
<x-process-dialog closeWithX size="xl">
|
||||
<x-slot:title>Proxy logs</x-slot:title>
|
||||
<x-slot:content>
|
||||
<livewire:project.shared.get-logs :server="$server" :resource="$database"
|
||||
container="{{ data_get($database, 'uuid') }}-proxy" :collapsible="false" lazy />
|
||||
</x-slot:content>
|
||||
<x-forms.button @click="slideOverOpen=true">View logs</x-forms.button>
|
||||
</x-slide-over>
|
||||
<x-forms.button @click="processDialogOpen = true">View logs</x-forms.button>
|
||||
</x-process-dialog>
|
||||
@endif
|
||||
</x-slot:actions>
|
||||
<x-table.loading target="instantSave" text="Updating public access..." />
|
||||
<div class="grid gap-4 lg:grid-cols-2">
|
||||
<x-forms.listbox id="isPublic" label="Access" live onChange="instantSave"
|
||||
:disabled="! auth()->user()->can('update', $database)" :options="[
|
||||
['value' => false, 'label' => 'Private'],
|
||||
['value' => true, 'label' => 'Public through TCP proxy'],
|
||||
]" />
|
||||
<div wire:key="public-access-{{ $publicPort ?: 'unset' }}">
|
||||
<x-forms.listbox id="isPublic" label="Access" live onChange="instantSave"
|
||||
:disabled="! auth()->user()->can('update', $database)" :options="[
|
||||
['value' => false, 'label' => 'Private'],
|
||||
['value' => true, 'label' => blank($publicPort) ? 'Public through TCP proxy (set public port first)' : 'Public through TCP proxy', 'disabled' => blank($publicPort)],
|
||||
]" />
|
||||
</div>
|
||||
<x-forms.input type="number" placeholder="8123" disabled="{{ $isPublic }}" id="publicPort"
|
||||
label="Public port" canGate="update" :canResource="$database" />
|
||||
<x-forms.input type="number" placeholder="3600" disabled="{{ $isPublic }}" id="publicPortTimeout"
|
||||
|
||||
@@ -62,26 +62,29 @@
|
||||
</div>
|
||||
</x-application.settings-section>
|
||||
|
||||
<x-application.settings-section title="Public access"
|
||||
<x-application.settings-section title="Public access" class="relative"
|
||||
description="Expose this database through the managed TCP proxy.">
|
||||
<x-slot:actions>
|
||||
@if ($isPublic)
|
||||
<x-slide-over fullScreen>
|
||||
<x-process-dialog closeWithX size="xl">
|
||||
<x-slot:title>Proxy logs</x-slot:title>
|
||||
<x-slot:content>
|
||||
<livewire:project.shared.get-logs :server="$server" :resource="$database"
|
||||
container="{{ data_get($database, 'uuid') }}-proxy" :collapsible="false" lazy />
|
||||
</x-slot:content>
|
||||
<x-forms.button @click="slideOverOpen=true">View logs</x-forms.button>
|
||||
</x-slide-over>
|
||||
<x-forms.button @click="processDialogOpen = true">View logs</x-forms.button>
|
||||
</x-process-dialog>
|
||||
@endif
|
||||
</x-slot:actions>
|
||||
<x-table.loading target="instantSave" text="Updating public access..." />
|
||||
<div class="grid gap-4 lg:grid-cols-2">
|
||||
<x-forms.listbox id="isPublic" label="Access" live onChange="instantSave"
|
||||
:disabled="! auth()->user()->can('update', $database)" :options="[
|
||||
['value' => false, 'label' => 'Private'],
|
||||
['value' => true, 'label' => 'Public through TCP proxy'],
|
||||
]" />
|
||||
<div wire:key="public-access-{{ $publicPort ?: 'unset' }}">
|
||||
<x-forms.listbox id="isPublic" label="Access" live onChange="instantSave"
|
||||
:disabled="! auth()->user()->can('update', $database)" :options="[
|
||||
['value' => false, 'label' => 'Private'],
|
||||
['value' => true, 'label' => blank($publicPort) ? 'Public through TCP proxy (set public port first)' : 'Public through TCP proxy', 'disabled' => blank($publicPort)],
|
||||
]" />
|
||||
</div>
|
||||
<x-forms.input type="number" placeholder="6379" disabled="{{ $isPublic }}" id="publicPort"
|
||||
label="Public port" canGate="update" :canResource="$database" />
|
||||
<x-forms.input type="number" placeholder="3600" disabled="{{ $isPublic }}" id="publicPortTimeout"
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
<button type="button" class="button w-full justify-between" @click="open = !open"
|
||||
:aria-expanded="open" aria-haspopup="menu">
|
||||
<span class="inline-flex items-center gap-2">
|
||||
<x-reicon name="play-circle" class="size-3.5 opacity-70" />
|
||||
<x-reicon name="play-circle" class="size-3.5 text-warning" />
|
||||
Actions
|
||||
</span>
|
||||
<span class="inline-flex transition-transform" :class="open && 'rotate-180'">
|
||||
@@ -142,7 +142,7 @@
|
||||
<div id="database-desktop-actions" class="relative" x-data="{ open: false }"
|
||||
@click.outside="open = false" @keydown.escape.window="open = false">
|
||||
<button type="button" class="button" @click="open = !open" :aria-expanded="open">
|
||||
<x-reicon name="play-circle" class="size-3.5 opacity-70" />
|
||||
<x-reicon name="play-circle" class="size-3.5 text-warning" />
|
||||
Actions
|
||||
<x-reicon name="chevron-down" class="size-3 opacity-55" />
|
||||
</button>
|
||||
|
||||
@@ -252,13 +252,12 @@
|
||||
</x-application.settings-section>
|
||||
</div>
|
||||
|
||||
{{-- Slide-over for activity monitor (all restore operations) --}}
|
||||
<x-slide-over @databaserestore.window="slideOverOpen = true" closeWithX fullScreen>
|
||||
<x-process-dialog @databaserestore.window="processDialogOpen = true" closeWithX size="xl">
|
||||
<x-slot:title>Database Restore Output</x-slot:title>
|
||||
<x-slot:content>
|
||||
<div wire:ignore>
|
||||
<div class="flex h-full min-h-0 flex-col" wire:ignore>
|
||||
<livewire:activity-monitor wire:key="database-restore-{{ $resourceUuid }}" header="Logs" fullHeight />
|
||||
</div>
|
||||
</x-slot:content>
|
||||
</x-slide-over>
|
||||
</x-process-dialog>
|
||||
</div>
|
||||
@@ -63,26 +63,29 @@
|
||||
</div>
|
||||
</x-application.settings-section>
|
||||
|
||||
<x-application.settings-section title="Public access"
|
||||
<x-application.settings-section title="Public access" class="relative"
|
||||
description="Expose this database through the managed TCP proxy.">
|
||||
<x-slot:actions>
|
||||
@if ($isPublic)
|
||||
<x-slide-over fullScreen>
|
||||
<x-process-dialog closeWithX size="xl">
|
||||
<x-slot:title>Proxy logs</x-slot:title>
|
||||
<x-slot:content>
|
||||
<livewire:project.shared.get-logs :server="$server" :resource="$database"
|
||||
container="{{ data_get($database, 'uuid') }}-proxy" :collapsible="false" lazy />
|
||||
</x-slot:content>
|
||||
<x-forms.button @click="slideOverOpen=true">View logs</x-forms.button>
|
||||
</x-slide-over>
|
||||
<x-forms.button @click="processDialogOpen = true">View logs</x-forms.button>
|
||||
</x-process-dialog>
|
||||
@endif
|
||||
</x-slot:actions>
|
||||
<x-table.loading target="instantSave" text="Updating public access..." />
|
||||
<div class="grid gap-4 lg:grid-cols-2">
|
||||
<x-forms.listbox id="isPublic" label="Access" live onChange="instantSave"
|
||||
:disabled="! auth()->user()->can('update', $database)" :options="[
|
||||
['value' => false, 'label' => 'Private'],
|
||||
['value' => true, 'label' => 'Public through TCP proxy'],
|
||||
]" />
|
||||
<div wire:key="public-access-{{ $publicPort ?: 'unset' }}">
|
||||
<x-forms.listbox id="isPublic" label="Access" live onChange="instantSave"
|
||||
:disabled="! auth()->user()->can('update', $database)" :options="[
|
||||
['value' => false, 'label' => 'Private'],
|
||||
['value' => true, 'label' => blank($publicPort) ? 'Public through TCP proxy (set public port first)' : 'Public through TCP proxy', 'disabled' => blank($publicPort)],
|
||||
]" />
|
||||
</div>
|
||||
<x-forms.input type="number" placeholder="6379" disabled="{{ $isPublic }}" id="publicPort"
|
||||
label="Public port" canGate="update" :canResource="$database" />
|
||||
<x-forms.input type="number" placeholder="3600" disabled="{{ $isPublic }}" id="publicPortTimeout"
|
||||
|
||||
@@ -68,26 +68,29 @@
|
||||
</div>
|
||||
</x-application.settings-section>
|
||||
|
||||
<x-application.settings-section title="Public access"
|
||||
<x-application.settings-section title="Public access" class="relative"
|
||||
description="Expose this database through the managed TCP proxy.">
|
||||
<x-slot:actions>
|
||||
@if ($isPublic)
|
||||
<x-slide-over fullScreen>
|
||||
<x-process-dialog closeWithX size="xl">
|
||||
<x-slot:title>Proxy logs</x-slot:title>
|
||||
<x-slot:content>
|
||||
<livewire:project.shared.get-logs :server="$server" :resource="$database"
|
||||
container="{{ data_get($database, 'uuid') }}-proxy" :collapsible="false" lazy />
|
||||
</x-slot:content>
|
||||
<x-forms.button @click="slideOverOpen=true">View logs</x-forms.button>
|
||||
</x-slide-over>
|
||||
<x-forms.button @click="processDialogOpen = true">View logs</x-forms.button>
|
||||
</x-process-dialog>
|
||||
@endif
|
||||
</x-slot:actions>
|
||||
<x-table.loading target="instantSave" text="Updating public access..." />
|
||||
<div class="grid gap-4 lg:grid-cols-2">
|
||||
<x-forms.listbox id="isPublic" label="Access" live onChange="instantSave"
|
||||
:disabled="! auth()->user()->can('update', $database)" :options="[
|
||||
['value' => false, 'label' => 'Private'],
|
||||
['value' => true, 'label' => 'Public through TCP proxy'],
|
||||
]" />
|
||||
<div wire:key="public-access-{{ $publicPort ?: 'unset' }}">
|
||||
<x-forms.listbox id="isPublic" label="Access" live onChange="instantSave"
|
||||
:disabled="! auth()->user()->can('update', $database)" :options="[
|
||||
['value' => false, 'label' => 'Private'],
|
||||
['value' => true, 'label' => blank($publicPort) ? 'Public through TCP proxy (set public port first)' : 'Public through TCP proxy', 'disabled' => blank($publicPort)],
|
||||
]" />
|
||||
</div>
|
||||
<x-forms.input type="number" placeholder="3306" disabled="{{ $isPublic }}" id="publicPort"
|
||||
label="Public port" canGate="update" :canResource="$database" />
|
||||
<x-forms.input type="number" placeholder="3600" disabled="{{ $isPublic }}" id="publicPortTimeout"
|
||||
|
||||
@@ -65,26 +65,29 @@
|
||||
</div>
|
||||
</x-application.settings-section>
|
||||
|
||||
<x-application.settings-section title="Public access"
|
||||
<x-application.settings-section title="Public access" class="relative"
|
||||
description="Expose this database through the managed TCP proxy.">
|
||||
<x-slot:actions>
|
||||
@if ($isPublic)
|
||||
<x-slide-over fullScreen>
|
||||
<x-process-dialog closeWithX size="xl">
|
||||
<x-slot:title>Proxy logs</x-slot:title>
|
||||
<x-slot:content>
|
||||
<livewire:project.shared.get-logs :server="$server" :resource="$database"
|
||||
container="{{ data_get($database, 'uuid') }}-proxy" :collapsible="false" lazy />
|
||||
</x-slot:content>
|
||||
<x-forms.button @click="slideOverOpen=true">View logs</x-forms.button>
|
||||
</x-slide-over>
|
||||
<x-forms.button @click="processDialogOpen = true">View logs</x-forms.button>
|
||||
</x-process-dialog>
|
||||
@endif
|
||||
</x-slot:actions>
|
||||
<x-table.loading target="instantSave" text="Updating public access..." />
|
||||
<div class="grid gap-4 lg:grid-cols-2">
|
||||
<x-forms.listbox id="isPublic" label="Access" live onChange="instantSave"
|
||||
:disabled="! auth()->user()->can('update', $database)" :options="[
|
||||
['value' => false, 'label' => 'Private'],
|
||||
['value' => true, 'label' => 'Public through TCP proxy'],
|
||||
]" />
|
||||
<div wire:key="public-access-{{ $publicPort ?: 'unset' }}">
|
||||
<x-forms.listbox id="isPublic" label="Access" live onChange="instantSave"
|
||||
:disabled="! auth()->user()->can('update', $database)" :options="[
|
||||
['value' => false, 'label' => 'Private'],
|
||||
['value' => true, 'label' => blank($publicPort) ? 'Public through TCP proxy (set public port first)' : 'Public through TCP proxy', 'disabled' => blank($publicPort)],
|
||||
]" />
|
||||
</div>
|
||||
<x-forms.input type="number" placeholder="27017" disabled="{{ $isPublic }}" id="publicPort"
|
||||
label="Public port" canGate="update" :canResource="$database" />
|
||||
<x-forms.input type="number" placeholder="3600" disabled="{{ $isPublic }}" id="publicPortTimeout"
|
||||
|
||||
@@ -68,26 +68,29 @@
|
||||
</div>
|
||||
</x-application.settings-section>
|
||||
|
||||
<x-application.settings-section title="Public access"
|
||||
<x-application.settings-section title="Public access" class="relative"
|
||||
description="Expose this database through the managed TCP proxy.">
|
||||
<x-slot:actions>
|
||||
@if ($isPublic)
|
||||
<x-slide-over fullScreen>
|
||||
<x-process-dialog closeWithX size="xl">
|
||||
<x-slot:title>Proxy logs</x-slot:title>
|
||||
<x-slot:content>
|
||||
<livewire:project.shared.get-logs :server="$server" :resource="$database"
|
||||
container="{{ data_get($database, 'uuid') }}-proxy" :collapsible="false" lazy />
|
||||
</x-slot:content>
|
||||
<x-forms.button @click="slideOverOpen=true">View logs</x-forms.button>
|
||||
</x-slide-over>
|
||||
<x-forms.button @click="processDialogOpen = true">View logs</x-forms.button>
|
||||
</x-process-dialog>
|
||||
@endif
|
||||
</x-slot:actions>
|
||||
<x-table.loading target="instantSave" text="Updating public access..." />
|
||||
<div class="grid gap-4 lg:grid-cols-2">
|
||||
<x-forms.listbox id="isPublic" label="Access" live onChange="instantSave"
|
||||
:disabled="! auth()->user()->can('update', $database)" :options="[
|
||||
['value' => false, 'label' => 'Private'],
|
||||
['value' => true, 'label' => 'Public through TCP proxy'],
|
||||
]" />
|
||||
<div wire:key="public-access-{{ $publicPort ?: 'unset' }}">
|
||||
<x-forms.listbox id="isPublic" label="Access" live onChange="instantSave"
|
||||
:disabled="! auth()->user()->can('update', $database)" :options="[
|
||||
['value' => false, 'label' => 'Private'],
|
||||
['value' => true, 'label' => blank($publicPort) ? 'Public through TCP proxy (set public port first)' : 'Public through TCP proxy', 'disabled' => blank($publicPort)],
|
||||
]" />
|
||||
</div>
|
||||
<x-forms.input type="number" placeholder="3306" disabled="{{ $isPublic }}" id="publicPort"
|
||||
label="Public port" canGate="update" :canResource="$database" />
|
||||
<x-forms.input type="number" placeholder="3600" disabled="{{ $isPublic }}" id="publicPortTimeout"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<form wire:submit="submit" class="flex flex-col gap-6">
|
||||
<x-unsaved-bar action="submit" />
|
||||
|
||||
<x-application.settings-section title="Database details"
|
||||
<x-application.settings-section id="database-details-section" title="Database details"
|
||||
description="Manage the identity and container image for this PostgreSQL database.">
|
||||
<x-slot:actions>
|
||||
<x-modal-input title="Resource details" buttonTitle="Details">
|
||||
@@ -19,7 +19,7 @@
|
||||
</div>
|
||||
</x-application.settings-section>
|
||||
|
||||
<x-application.settings-section title="Credentials"
|
||||
<x-application.settings-section id="credentials-section" title="Credentials"
|
||||
description="Keep these values aligned with the credentials configured inside PostgreSQL.">
|
||||
@if ($database->started_at)
|
||||
<x-callout type="warning" title="Keep credentials synchronized">
|
||||
@@ -43,7 +43,7 @@
|
||||
</div>
|
||||
</x-application.settings-section>
|
||||
|
||||
<x-application.settings-section title="Initialization"
|
||||
<x-application.settings-section id="initialization-section" title="Initialization"
|
||||
description="Configure the options used when PostgreSQL creates its initial data directory.">
|
||||
<div class="grid gap-4 lg:grid-cols-2">
|
||||
<x-forms.input label="Initial database arguments" id="postgresInitdbArgs"
|
||||
@@ -53,7 +53,7 @@
|
||||
</div>
|
||||
</x-application.settings-section>
|
||||
|
||||
<x-application.settings-section title="Runtime and network"
|
||||
<x-application.settings-section id="runtime-network-section" title="Runtime and network"
|
||||
description="Configure Docker runtime options and host port mappings.">
|
||||
<div class="grid gap-4 lg:grid-cols-2">
|
||||
<div class="lg:col-span-2">
|
||||
@@ -72,26 +72,29 @@
|
||||
</div>
|
||||
</x-application.settings-section>
|
||||
|
||||
<x-application.settings-section title="Public access"
|
||||
<x-application.settings-section id="public-access-section" title="Public access" class="relative"
|
||||
description="Expose this database through the managed TCP proxy.">
|
||||
<x-slot:actions>
|
||||
@if ($isPublic)
|
||||
<x-slide-over fullScreen>
|
||||
<x-process-dialog closeWithX size="xl">
|
||||
<x-slot:title>Proxy logs</x-slot:title>
|
||||
<x-slot:content>
|
||||
<livewire:project.shared.get-logs :server="$server" :resource="$database"
|
||||
container="{{ data_get($database, 'uuid') }}-proxy" :collapsible="false" lazy />
|
||||
</x-slot:content>
|
||||
<x-forms.button @click="slideOverOpen=true">View logs</x-forms.button>
|
||||
</x-slide-over>
|
||||
<x-forms.button @click="processDialogOpen = true">View logs</x-forms.button>
|
||||
</x-process-dialog>
|
||||
@endif
|
||||
</x-slot:actions>
|
||||
<x-table.loading target="instantSave" text="Updating public access..." />
|
||||
<div class="grid gap-4 lg:grid-cols-2">
|
||||
<x-forms.listbox id="isPublic" label="Access" live onChange="instantSave"
|
||||
:disabled="! auth()->user()->can('update', $database)" :options="[
|
||||
['value' => false, 'label' => 'Private'],
|
||||
['value' => true, 'label' => 'Public through TCP proxy'],
|
||||
]" />
|
||||
<div wire:key="public-access-{{ $publicPort ?: 'unset' }}">
|
||||
<x-forms.listbox id="isPublic" label="Access" live onChange="instantSave"
|
||||
:disabled="! auth()->user()->can('update', $database)" :options="[
|
||||
['value' => false, 'label' => 'Private'],
|
||||
['value' => true, 'label' => blank($publicPort) ? 'Public through TCP proxy (set public port first)' : 'Public through TCP proxy', 'disabled' => blank($publicPort)],
|
||||
]" />
|
||||
</div>
|
||||
<x-forms.input type="number" placeholder="5432" disabled="{{ $isPublic }}" id="publicPort"
|
||||
label="Public port" canGate="update" :canResource="$database" />
|
||||
<x-forms.input type="number" placeholder="3600" disabled="{{ $isPublic }}" id="publicPortTimeout"
|
||||
@@ -100,13 +103,13 @@
|
||||
</div>
|
||||
</x-application.settings-section>
|
||||
|
||||
<x-application.settings-section title="Configuration"
|
||||
<x-application.settings-section id="configuration-section" title="Configuration"
|
||||
description="Override the PostgreSQL configuration used by this container.">
|
||||
<x-forms.textarea label="Custom PostgreSQL configuration" rows="10" id="postgresConf"
|
||||
canGate="update" :canResource="$database" />
|
||||
</x-application.settings-section>
|
||||
|
||||
<x-application.settings-section title="Log delivery"
|
||||
<x-application.settings-section id="log-delivery-section" title="Log delivery"
|
||||
description="Forward container logs to the drain configured on the server.">
|
||||
<x-forms.listbox id="isLogDrainEnabled" label="Log drain" live onChange="instantSaveAdvanced"
|
||||
:disabled="! auth()->user()->can('update', $database)" :options="[
|
||||
@@ -116,7 +119,7 @@
|
||||
</x-application.settings-section>
|
||||
</form>
|
||||
|
||||
<x-application.settings-section title="Initialization scripts"
|
||||
<x-application.settings-section id="initialization-scripts-section" title="Initialization scripts"
|
||||
description="Run SQL files in order when PostgreSQL initializes for the first time." flush>
|
||||
<x-slot:actions>
|
||||
@can('update', $database)
|
||||
|
||||
@@ -67,26 +67,29 @@
|
||||
</div>
|
||||
</x-application.settings-section>
|
||||
|
||||
<x-application.settings-section title="Public access"
|
||||
<x-application.settings-section title="Public access" class="relative"
|
||||
description="Expose this database through the managed TCP proxy.">
|
||||
<x-slot:actions>
|
||||
@if ($isPublic)
|
||||
<x-slide-over fullScreen>
|
||||
<x-process-dialog closeWithX size="xl">
|
||||
<x-slot:title>Proxy logs</x-slot:title>
|
||||
<x-slot:content>
|
||||
<livewire:project.shared.get-logs :server="$server" :resource="$database"
|
||||
container="{{ data_get($database, 'uuid') }}-proxy" :collapsible="false" lazy />
|
||||
</x-slot:content>
|
||||
<x-forms.button @click="slideOverOpen=true">View logs</x-forms.button>
|
||||
</x-slide-over>
|
||||
<x-forms.button @click="processDialogOpen = true">View logs</x-forms.button>
|
||||
</x-process-dialog>
|
||||
@endif
|
||||
</x-slot:actions>
|
||||
<x-table.loading target="instantSave" text="Updating public access..." />
|
||||
<div class="grid gap-4 lg:grid-cols-2">
|
||||
<x-forms.listbox id="isPublic" label="Access" live onChange="instantSave"
|
||||
:disabled="! auth()->user()->can('update', $database)" :options="[
|
||||
['value' => false, 'label' => 'Private'],
|
||||
['value' => true, 'label' => 'Public through TCP proxy'],
|
||||
]" />
|
||||
<div wire:key="public-access-{{ $publicPort ?: 'unset' }}">
|
||||
<x-forms.listbox id="isPublic" label="Access" live onChange="instantSave"
|
||||
:disabled="! auth()->user()->can('update', $database)" :options="[
|
||||
['value' => false, 'label' => 'Private'],
|
||||
['value' => true, 'label' => blank($publicPort) ? 'Public through TCP proxy (set public port first)' : 'Public through TCP proxy', 'disabled' => blank($publicPort)],
|
||||
]" />
|
||||
</div>
|
||||
<x-forms.input type="number" placeholder="6379" disabled="{{ $isPublic }}" id="publicPort"
|
||||
label="Public port" canGate="update" :canResource="$database" />
|
||||
<x-forms.input type="number" placeholder="3600" disabled="{{ $isPublic }}" id="publicPortTimeout"
|
||||
|
||||
@@ -76,6 +76,9 @@
|
||||
$backupRoute = $type === 'database'
|
||||
? route('project.database.backup.execution', [...$parameters, 'backup_uuid' => $backup->uuid])
|
||||
: route('project.service.database.backup.show', [...$parameters, 'backup_uuid' => $backup->uuid]);
|
||||
$backupExecutionsRoute = $type === 'database'
|
||||
? route('project.database.backup.executions', [...$parameters, 'backup_uuid' => $backup->uuid])
|
||||
: route('project.service.database.backup.executions', [...$parameters, 'backup_uuid' => $backup->uuid]);
|
||||
@endphp
|
||||
<div x-show="search === ''
|
||||
|| @js(strtolower($database->name)).includes(search.toLowerCase())
|
||||
@@ -97,10 +100,13 @@
|
||||
{{ $backup->save_s3 ? ($backup->s3?->name ?? 'Unavailable') : 'Local only' }}
|
||||
</div>
|
||||
<div class="text-[11px] text-neutral-600 dark:text-fg-dim">
|
||||
{{ $backup->executions_count ?? $backup->executions()->count() }}
|
||||
<a wire:navigate href="{{ $backupExecutionsRoute }}"
|
||||
class="font-medium hover:underline hover:text-black dark:hover:text-fg">
|
||||
{{ $backup->executions_count ?? $backup->executions()->count() }}
|
||||
</a>
|
||||
</div>
|
||||
<div class="flex justify-end">
|
||||
<a class="button" {{ wireNavigate() }} href="{{ $backupRoute }}">Manage</a>
|
||||
<a class="button" wire:navigate href="{{ $backupRoute }}">Manage</a>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
|
||||
Reference in new issue
Block a user