fix: settings view
feat: add separate views for settings
This commit is contained in:
@@ -1,30 +0,0 @@
|
||||
<div>
|
||||
<form wire:submit='submit' class="flex flex-col">
|
||||
<div class="flex flex-col">
|
||||
<div class="flex items-center gap-2">
|
||||
<h2>Authentication</h2>
|
||||
<x-forms.button type="submit">
|
||||
Save
|
||||
</x-forms.button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex flex-col gap-2 pt-4">
|
||||
@foreach ($oauth_settings_map as $oauth_setting)
|
||||
<div class="p-4 border dark:border-coolgray-300">
|
||||
<h3>{{ucfirst($oauth_setting->provider)}} Oauth</h3>
|
||||
<div class="w-32">
|
||||
<x-forms.checkbox instantSave id="oauth_settings_map.{{$oauth_setting->provider}}.enabled" label="Enabled" />
|
||||
</div>
|
||||
<div class="flex flex-col w-full gap-2 xl:flex-row">
|
||||
<x-forms.input id="oauth_settings_map.{{$oauth_setting->provider}}.client_id" label="Client ID" />
|
||||
<x-forms.input id="oauth_settings_map.{{$oauth_setting->provider}}.client_secret" type="password" label="Client Secret" />
|
||||
<x-forms.input id="oauth_settings_map.{{$oauth_setting->provider}}.redirect_uri" label="Redirect URI" />
|
||||
@if ($oauth_setting->provider == 'azure')
|
||||
<x-forms.input id="oauth_settings_map.{{$oauth_setting->provider}}.tenant" label="Tenant" />
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@@ -1,36 +0,0 @@
|
||||
<div>
|
||||
<div class="flex flex-col">
|
||||
<div class="flex items-center gap-2">
|
||||
<h2>Backup</h2>
|
||||
@if (isset($database))
|
||||
<x-forms.button type="submit" wire:click="submit">
|
||||
Save
|
||||
</x-forms.button>
|
||||
@endif
|
||||
</div>
|
||||
<div class="pb-4">Backup your Coolify instance settings</div>
|
||||
<div>
|
||||
@if (isset($database))
|
||||
<div class="flex flex-col gap-3 pb-4">
|
||||
<div class="flex gap-2">
|
||||
<x-forms.input label="UUID" readonly id="database.uuid" />
|
||||
<x-forms.input label="Name" readonly id="database.name" />
|
||||
<x-forms.input label="Description" id="database.description" />
|
||||
</div>
|
||||
<div class="flex gap-2">
|
||||
<x-forms.input label="User" readonly id="database.postgres_user" />
|
||||
<x-forms.input type="password" label="Password" readonly id="database.postgres_password" />
|
||||
</div>
|
||||
</div>
|
||||
<livewire:project.database.backup-edit :backup="$backup" :s3s="$s3s" :status="data_get($database, 'status')" />
|
||||
@else
|
||||
To configure automatic backup for your Coolify instance, you first need to add a database resource
|
||||
into Coolify.
|
||||
<x-forms.button class="mt-2" wire:click="add_coolify_database">Add Database</x-forms.button>
|
||||
@endif
|
||||
</div>
|
||||
<div class="py-4">
|
||||
<livewire:project.database.backup-executions :backup="$backup" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,55 +0,0 @@
|
||||
<div>
|
||||
<form wire:submit='submit' class="flex flex-col">
|
||||
<div class="flex items-center gap-2">
|
||||
<h2>Configuration</h2>
|
||||
<x-forms.button type="submit">
|
||||
Save
|
||||
</x-forms.button>
|
||||
</div>
|
||||
<div>General configuration for your Coolify instance.</div>
|
||||
|
||||
<div class="flex flex-col gap-2 pt-4">
|
||||
<div class="flex flex-wrap items-end gap-2">
|
||||
<h3 class="pt-6">Instance Settings</h3>
|
||||
<x-forms.input id="settings.fqdn" label="Instance's Domain" placeholder="https://coolify.io" />
|
||||
<x-forms.input id="settings.instance_name" label="Instance's Name" placeholder="Coolify" />
|
||||
<h3 class="pt-6 w-full">DNS Validation</h3>
|
||||
<div class="flex flex-wrap items-end gap-2 md:w-96">
|
||||
<x-forms.checkbox instantSave id="is_dns_validation_enabled" label="Enable DNS validation" />
|
||||
</div>
|
||||
<x-forms.input id="settings.custom_dns_servers" label="DNS Servers"
|
||||
helper="DNS servers for validation FQDNs againts. A comma separated list of DNS servers."
|
||||
placeholder="1.1.1.1,8.8.8.8" />
|
||||
</div>
|
||||
|
||||
{{-- <div class="flex gap-2 ">
|
||||
<x-forms.input type="number" id="settings.public_port_min" label="Public Port Min" />
|
||||
<x-forms.input type="number" id="settings.public_port_max" label="Public Port Max" />
|
||||
</div> --}}
|
||||
|
||||
</div>
|
||||
<h3 class="pt-6">API</h3>
|
||||
<div class="md:w-96">
|
||||
<x-forms.checkbox instantSave id="is_api_enabled" label="Enabled" />
|
||||
</div>
|
||||
<x-forms.input id="settings.allowed_ips" label="Allowed IPs"
|
||||
helper="Allowed IP lists for the API. A comma separated list of IPs. Empty means you allow from everywhere."
|
||||
placeholder="1.1.1.1,8.8.8.8" />
|
||||
</form>
|
||||
|
||||
<h2 class="pt-6">Advanced</h2>
|
||||
<div class="text-right md:w-96">
|
||||
@if (!is_null(env('AUTOUPDATE', null)))
|
||||
<x-forms.checkbox instantSave helper="AUTOUPDATE is set in .env file, you need to modify it there." disabled
|
||||
id="is_auto_update_enabled" label="Auto Update Coolify" />
|
||||
@else
|
||||
<x-forms.checkbox instantSave id="is_auto_update_enabled" label="Auto Update Coolify" />
|
||||
@if($is_auto_update_enabled)
|
||||
<x-forms.input id="auto_update_frequency" label="Auto Update Frequency" placeholder="0 0 * * *" helper="Cron expression for auto update frequency (automatically update coolify). Default is every day at 00:00" />
|
||||
@endif
|
||||
<x-forms.input id="update_check_frequency" label="Update Check Frequency" placeholder="0 */11 * * *" helper="Cron expression for update check frequency (check for new Coolify versions and pull new Service Templates from CDN). Default is every 12 hours at 11:00 and 23:00" />
|
||||
@endif
|
||||
<x-forms.checkbox instantSave id="is_registration_enabled" label="Registration Allowed" />
|
||||
<x-forms.checkbox instantSave id="do_not_track" label="Do Not Track" />
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,62 +0,0 @@
|
||||
<div>
|
||||
<div class="flex items-center gap-2">
|
||||
<h2>Transactional Email</h2>
|
||||
</div>
|
||||
<div class="pb-4 ">Email settings for password resets, invitations, etc.</div>
|
||||
<form wire:submit='submitFromFields' class="flex flex-col gap-2 pb-4">
|
||||
<x-forms.input required id="settings.smtp_from_name" helper="Name used in emails." label="From Name" />
|
||||
<x-forms.input required id="settings.smtp_from_address" helper="Email address used in emails."
|
||||
label="From Address" />
|
||||
<x-forms.button type="submit">
|
||||
Save
|
||||
</x-forms.button>
|
||||
</form>
|
||||
<div class="flex flex-col gap-4">
|
||||
<div class="p-4 border dark:border-coolgray-300">
|
||||
<form wire:submit='submit' class="flex flex-col">
|
||||
<div class="flex gap-2">
|
||||
<h3>SMTP Server</h3>
|
||||
<x-forms.button type="submit">
|
||||
Save
|
||||
</x-forms.button>
|
||||
</div>
|
||||
<div class="w-32">
|
||||
<x-forms.checkbox instantSave id="settings.smtp_enabled" label="Enabled" />
|
||||
</div>
|
||||
<div class="flex flex-col gap-4">
|
||||
<div class="flex flex-col w-full gap-2 xl:flex-row">
|
||||
<x-forms.input required id="settings.smtp_host" placeholder="smtp.mailgun.org" label="Host" />
|
||||
<x-forms.input required id="settings.smtp_port" placeholder="587" label="Port" />
|
||||
<x-forms.input id="settings.smtp_encryption" helper="If SMTP uses SSL, set it to 'tls'."
|
||||
placeholder="tls" label="Encryption" />
|
||||
</div>
|
||||
<div class="flex flex-col w-full gap-2 xl:flex-row">
|
||||
<x-forms.input id="settings.smtp_username" label="SMTP Username" />
|
||||
<x-forms.input id="settings.smtp_password" type="password" label="SMTP Password" />
|
||||
<x-forms.input id="settings.smtp_timeout" helper="Timeout value for sending emails."
|
||||
label="Timeout" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="p-4 border dark:border-coolgray-300">
|
||||
<form wire:submit='submitResend' class="flex flex-col">
|
||||
<div class="flex gap-2">
|
||||
<h3>Resend</h3>
|
||||
<x-forms.button type="submit">
|
||||
Save
|
||||
</x-forms.button>
|
||||
</div>
|
||||
<div class="w-32">
|
||||
<x-forms.checkbox instantSave='instantSaveResend' id="settings.resend_enabled" label="Enabled" />
|
||||
</div>
|
||||
<div class="flex flex-col gap-4">
|
||||
<div class="flex flex-col w-full gap-2 xl:flex-row">
|
||||
<x-forms.input type="password" id="settings.resend_api_key" placeholder="API key" required
|
||||
label="Host" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -3,32 +3,70 @@
|
||||
Settings | Coolify
|
||||
</x-slot>
|
||||
<x-settings.navbar />
|
||||
<div x-data="{ activeTab: window.location.hash ? window.location.hash.substring(1) : 'general' }" class="flex flex-col h-full gap-8 pt-1 sm:flex-row">
|
||||
<div class="flex gap-6 overflow-x-scroll sm:gap-2 sm:overflow-x-hidden scrollbar sm:flex-col whitespace-nowrap">
|
||||
<a class="menu-item" :class="activeTab === 'general' && 'menu-item-active'"
|
||||
@click.prevent="activeTab = 'general'; window.location.hash = 'general'" href="#">General</a>
|
||||
<a class="menu-item" :class="activeTab === 'backup' && 'menu-item-active'"
|
||||
@click.prevent="activeTab = 'backup'; window.location.hash = 'backup'" href="#">Instance Backup</a>
|
||||
<a class="menu-item" :class="activeTab === 'smtp' && 'menu-item-active'"
|
||||
@click.prevent="activeTab = 'smtp'; window.location.hash = 'smtp'" href="#">Transactional
|
||||
Email</a>
|
||||
<a class="menu-item" :class="activeTab === 'auth' && 'menu-item-active'"
|
||||
@click.prevent="activeTab = 'auth'; window.location.hash = 'auth'" href="#">Authentication
|
||||
(OAuth)</a>
|
||||
<form wire:submit='submit' class="flex flex-col">
|
||||
<div class="flex items-center gap-2">
|
||||
<h2>Configuration</h2>
|
||||
<x-forms.button type="submit">
|
||||
Save
|
||||
</x-forms.button>
|
||||
</div>
|
||||
<div class="w-full">
|
||||
<div x-cloak x-show="activeTab === 'general'" class="h-full">
|
||||
<livewire:settings.configuration :settings="$settings" />
|
||||
</div>
|
||||
<div x-cloak x-show="activeTab === 'backup'" class="h-full">
|
||||
<livewire:settings.backup :settings="$settings" :database="$database" :s3s="$s3s" />
|
||||
</div>
|
||||
<div x-cloak x-show="activeTab === 'smtp'" class="h-full">
|
||||
<livewire:settings.email :settings="$settings" />
|
||||
</div>
|
||||
<div x-cloak x-show="activeTab === 'auth'" class="h-full">
|
||||
<livewire:settings.auth />
|
||||
<div>General configuration for your Coolify instance.</div>
|
||||
|
||||
<div class="flex flex-col gap-2">
|
||||
<div class="flex flex-wrap items-end gap-2">
|
||||
<h4 class="pt-6">Instance Settings</h4>
|
||||
<x-forms.input id="settings.fqdn" label="Instance's Domain" placeholder="https://coolify.io" />
|
||||
<x-forms.input id="settings.instance_name" label="Instance's Name" placeholder="Coolify" />
|
||||
<h4 class="w-full pt-6">DNS Validation</h4>
|
||||
<div class="flex flex-wrap items-end gap-2 md:w-96">
|
||||
<x-forms.checkbox instantSave id="is_dns_validation_enabled" label="Enable DNS validation" />
|
||||
</div>
|
||||
<x-forms.input id="settings.custom_dns_servers" label="DNS Servers"
|
||||
helper="DNS servers for validation FQDNs againts. A comma separated list of DNS servers."
|
||||
placeholder="1.1.1.1,8.8.8.8" />
|
||||
</div>
|
||||
|
||||
{{-- <div class="flex gap-2 ">
|
||||
<x-forms.input type="number" id="settings.public_port_min" label="Public Port Min" />
|
||||
<x-forms.input type="number" id="settings.public_port_max" label="Public Port Max" />
|
||||
</div> --}}
|
||||
|
||||
</div>
|
||||
<h4 class="pt-6">API</h4>
|
||||
<div class="md:w-96">
|
||||
<x-forms.checkbox instantSave id="is_api_enabled" label="Enabled" />
|
||||
</div>
|
||||
<x-forms.input id="settings.allowed_ips" label="Allowed IPs"
|
||||
helper="Allowed IP lists for the API. A comma separated list of IPs. Empty means you allow from everywhere."
|
||||
placeholder="1.1.1.1,8.8.8.8" />
|
||||
</form>
|
||||
|
||||
<h4 class="pt-6">Advanced</h4>
|
||||
|
||||
|
||||
<h5 class="pt-4 font-bold text-white">Auto Update</h5>
|
||||
@if (!is_null(env('AUTOUPDATE', null)))
|
||||
<div class="text-right md:w-96">
|
||||
<x-forms.checkbox instantSave helper="AUTOUPDATE is set in .env file, you need to modify it there." disabled
|
||||
id="is_auto_update_enabled" label="Enabled" />
|
||||
</div>
|
||||
@else
|
||||
<div class="text-right md:w-96">
|
||||
<x-forms.checkbox instantSave id="is_auto_update_enabled" label="Enabled" />
|
||||
</div>
|
||||
<div class="flex gap-2 ">
|
||||
@if ($is_auto_update_enabled)
|
||||
<x-forms.input id="auto_update_frequency" label="Auto Update Frequency" placeholder="0 0 * * *"
|
||||
helper="Cron expression for auto update frequency (automatically update coolify). Default is every day at 00:00" />
|
||||
@endif
|
||||
<x-forms.input id="update_check_frequency" label="Update Check Frequency" placeholder="0 */11 * * *"
|
||||
helper="Cron expression for update check frequency (check for new Coolify versions and pull new Service Templates from CDN). Default is every 12 hours at 11:00 and 23:00" />
|
||||
</div>
|
||||
@endif
|
||||
<h5 class="pt-4 font-bold text-white">Others</h5>
|
||||
<div class="text-right md:w-96">
|
||||
<x-forms.checkbox instantSave id="is_registration_enabled" label="Registration Allowed" />
|
||||
<x-forms.checkbox instantSave id="do_not_track" label="Do Not Track" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user