Merge branch 'next' into feat/disable-default-redirect

This commit is contained in:
Kael
2024-10-28 19:20:52 +11:00
committed by GitHub
63 changed files with 628 additions and 872 deletions

View File

@@ -5,7 +5,7 @@
<x-forms.button type="submit">
Save
</x-forms.button>
{{--
{{--
<x-forms.button wire:click="downloadConfig">
Download Config
<x-modal-input buttonTitle="Upload Config" title="Upload Config" :closeOutside="false">
@@ -238,9 +238,9 @@
@if ($application->build_pack !== 'dockercompose')
<div class="pt-2 w-96">
<x-forms.checkbox
helper="Use a build server to build your application. You can configure your build server in the Server settings. This is experimental. For more info, check the <a href='https://coolify.io/docs/knowledge-base/server/build-server' class='underline' target='_blank'>documentation</a>."
helper="Use a build server to build your application. You can configure your build server in the Server settings. For more info, check the <a href='https://coolify.io/docs/knowledge-base/server/build-server' class='underline' target='_blank'>documentation</a>."
instantSave id="application.settings.is_build_server_enabled"
label="Use a Build Server? (experimental)" />
label="Use a Build Server?" />
</div>
@endif
@if ($application->could_set_build_commands())

View File

@@ -158,68 +158,65 @@
@endif
</div>
</div>
@if (!$server->isSwarm() && !$server->isBuildServer())
@if (isDev())
<div class="flex gap-2 items-center pt-4 pb-2">
<h3>Sentinel</h3>
@if ($server->isSentinelEnabled())
<div class="flex gap-2 items-center"
wire:poll.{{ $server->settings->sentinel_push_interval_seconds }}s="checkSyncStatus">
@if ($server->isSentinelLive())
<x-status.running status="In sync" noLoading
title="{{ $server->sentinel_updated_at }}" />
<x-forms.button wire:click='restartSentinel'>Restart</x-forms.button>
@else
<x-status.stopped status="Out of sync" noLoading
title="{{ $server->sentinel_updated_at }}" />
<x-forms.button wire:click='restartSentinel'>Sync</x-forms.button>
@endif
</div>
@endif
</div>
@else
</form>
@if ($server->isFunctional() && !$server->isSwarm() && !$server->isBuildServer())
<form wire:submit.prevent='saveSentinel'>
<div class="flex gap-2 items-center pt-4 pb-2">
<h3>Sentinel</h3>
<div>Sentinel is not available in this version (soon).</div>
@endif
@if (isDev())
<div class="flex flex-col gap-2">
<div class="w-64">
<x-forms.checkbox wire:model.live="server.settings.is_sentinel_enabled"
label="Enable Sentinel" />
@if ($server->isSentinelEnabled())
<x-forms.checkbox instantSave id="server.settings.is_metrics_enabled"
label="Enable Metrics" />
@if ($server->isSentinelEnabled())
<div class="flex gap-2 items-center">
@if ($server->isSentinelLive())
<x-status.running status="In sync" noLoading title="{{ $server->sentinel_updated_at }}" />
<x-forms.button type="submit">Save</x-forms.button>
<x-forms.button wire:click='restartSentinel'>Restart</x-forms.button>
@else
<x-forms.checkbox instantSave disabled id="server.settings.is_metrics_enabled"
label="Enable Metrics" />
<x-status.stopped status="Out of sync" noLoading
title="{{ $server->sentinel_updated_at }}" />
<x-forms.button type="submit">Save</x-forms.button>
<x-forms.button wire:click='restartSentinel'>Sync</x-forms.button>
@endif
</div>
@endif
</div>
<div class="flex flex-col gap-2">
<div class="flex gap-2">Experimental feature <x-helper
helper="Sentinel reports your server's & container's health and collects metrics." /></div>
<div class="w-64">
<x-forms.checkbox wire:model.live="server.settings.is_sentinel_enabled" label="Enable Sentinel" />
@if ($server->isSentinelEnabled())
<div class="flex flex-wrap gap-2 sm:flex-nowrap items-end">
<x-forms.input type="password" id="server.settings.sentinel_token" label="Sentinel token"
required helper="Token for Sentinel." />
<x-forms.button wire:click="regenerateSentinelToken">Regenerate</x-forms.button>
</div>
<x-forms.input id="server.settings.sentinel_custom_url" required label="Coolify URL"
helper="URL to your Coolify instance. If it is empty that means you do not have a FQDN set for your Coolify instance." />
<div class="flex flex-col gap-2">
<div class="flex flex-wrap gap-2 sm:flex-nowrap">
<x-forms.input id="server.settings.sentinel_metrics_refresh_rate_seconds"
label="Metrics rate (seconds)" required
helper="The interval for gathering metrics. Lower means more disk space will be used." />
<x-forms.input id="server.settings.sentinel_metrics_history_days"
label="Metrics history (days)" required
helper="How many days should the metrics data should be reserved." />
<x-forms.input id="server.settings.sentinel_push_interval_seconds"
label="Push interval (seconds)" required
helper="How many seconds should the metrics data should be pushed to the collector." />
</div>
</div>
<x-forms.checkbox instantSave id="server.settings.is_metrics_enabled"
label="Enable Metrics" />
@else
<x-forms.checkbox instantSave disabled id="server.settings.is_metrics_enabled"
label="Enable Metrics" />
@endif
</div>
@endif
@endif
</form>
@if ($server->isSentinelEnabled())
<div class="flex flex-wrap gap-2 sm:flex-nowrap items-end">
<x-forms.input type="password" id="server.settings.sentinel_token" label="Sentinel token"
required helper="Token for Sentinel." />
<x-forms.button wire:click="regenerateSentinelToken">Regenerate</x-forms.button>
</div>
<x-forms.input id="server.settings.sentinel_custom_url" required label="Coolify URL"
helper="URL to your Coolify instance. If it is empty that means you do not have a FQDN set for your Coolify instance." />
<div class="flex flex-col gap-2">
<div class="flex flex-wrap gap-2 sm:flex-nowrap">
<x-forms.input id="server.settings.sentinel_metrics_refresh_rate_seconds"
label="Metrics rate (seconds)" required
helper="The interval for gathering metrics. Lower means more disk space will be used." />
<x-forms.input id="server.settings.sentinel_metrics_history_days"
label="Metrics history (days)" required
helper="How many days should the metrics data should be reserved." />
<x-forms.input id="server.settings.sentinel_push_interval_seconds"
label="Push interval (seconds)" required
helper="How many seconds should the metrics data should be pushed to the collector." />
</div>
</div>
@endif
</div>
</form>
@endif
</div>

View File

@@ -14,17 +14,17 @@
</div>
<div class="grid xl:grid-cols-2 grid-cols-1 gap-2">
@forelse ($privateKeys as $private_key)
<div class="box-without-bg justify-between dark:bg-coolgray-100 bg-white items-center">
<div class="flex flex-col ">
<div class="box-without-bg justify-between dark:bg-coolgray-100 bg-white items-center flex flex-col gap-2">
<div class="flex flex-col w-full">
<div class="box-title">{{ $private_key->name }}</div>
<div class="box-description">{{ $private_key->description }}</div>
</div>
@if (data_get($server, 'privateKey.uuid') !== $private_key->uuid)
<x-forms.button wire:click='setPrivateKey({{ $private_key->id }})'>
Use this key
<x-forms.button class="w-full" wire:click='setPrivateKey({{ $private_key->id }})'>
Use this key
</x-forms.button>
@else
<x-forms.button disabled>
<x-forms.button class="w-full" disabled>
Currently used
</x-forms.button>
@endif

View File

@@ -142,22 +142,23 @@
helper="When disabled, you will not need to confirm actions with a text and user password. This significantly reduces security and may lead to accidental deletions or unwanted changes. Use with extreme caution, especially on production servers." />
</div>
@else
<div class="md:w-96 pb-4">
<x-modal-confirmation title="Disable Two Step Confirmation?" buttonTitle="Disable Two Step Confirmation"
isErrorButton submitAction="toggleTwoStepConfirmation" :actions="[
'Tow Step confimation will be disabled globally.',
'Disabling two step confirmation reduces security (as anyone can easily delete anything).',
'The risk of accidental actions will increase.',
]"
confirmationText="DISABLE TWO STEP CONFIRMATION"
confirmationLabel="Please type the confirmation text to disable two step confirmation."
shortConfirmationLabel="Confirmation text" step3ButtonText="Disable Two Step Confirmation" />
</div>
<div class="md:w-96 pb-4">
<x-modal-confirmation title="Disable Two Step Confirmation?"
buttonTitle="Disable Two Step Confirmation" isErrorButton submitAction="toggleTwoStepConfirmation"
:actions="[
'Tow Step confimation will be disabled globally.',
'Disabling two step confirmation reduces security (as anyone can easily delete anything).',
'The risk of accidental actions will increase.',
]" confirmationText="DISABLE TWO STEP CONFIRMATION"
confirmationLabel="Please type the confirmation text to disable two step confirmation."
shortConfirmationLabel="Confirmation text" step3ButtonText="Disable Two Step Confirmation" />
</div>
<div class="p-4 mb-4 text-white border-l-4 border-red-500 bg-error md:w-[40rem] w-full mb-32">
<p class="font-bold">Warning!</p>
<p>Disabling two step confirmation reduces security (as anyone can easily delete anything) and increases
the
risk of accidental actions. This is not recommended for production servers.</p>
</div>
@endif
<div class="p-4 mb-4 text-white border-l-4 border-red-500 bg-error md:w-[40rem] w-full mb-32">
<p class="font-bold">Warning!</p>
<p>Disabling two step confirmation reduces security (as anyone can easily delete anything) and increases the
risk of accidental actions. This is not recommended for production servers.</p>
</div>
</form>
</div>

View File

@@ -1,5 +1,5 @@
<div wire:poll.2000ms="get_deployments" wire:init='get_deployments'>
@forelse ($deployments_per_tag_per_server as $server_name => $deployments)
<div wire:poll.2000ms="getDeployments" wire:init='getDeployments'>
@forelse ($deploymentsPerTagPerServer as $server_name => $deployments)
<h4 class="py-4">{{ $server_name }}</h4>
<div class="grid grid-cols-1 gap-2">
@foreach ($deployments as $deployment)

View File

@@ -1,15 +1,12 @@
<div>
<x-slot:title>
Tags | Coolify
</x-slot>
<h1>Tags</h1>
<div class="flex flex-col pb-6 ">
<div class="flex flex-col pb-6">
<div class="subtitle">Tags help you to perform actions on multiple resources.</div>
<div class="">
@if ($tags->count() === 0)
<div>No tags yet defined yet. Go to a resource and add a tag there.</div>
@else
<x-forms.datalist wire:model="tag" onUpdate='tag_updated'>
<x-forms.datalist wire:model="tag" onUpdate='tagUpdated'>
@foreach ($tags as $oneTag)
<option value="{{ $oneTag->name }}">{{ $oneTag->name }}</option>
@endforeach
@@ -21,7 +18,7 @@
<x-forms.input readonly label="Deploy Webhook URL" id="webhook" />
</div>
<x-modal-confirmation title="Redeploy all resources with this tag?" isHighlighted
buttonTitle="Redeploy All" submitAction="redeploy_all" :actions="[
buttonTitle="Redeploy All" submitAction="redeployAll" :actions="[
'All resources with this tag will be redeployed.',
'During redeploy resources will be temporarily unavailable.',
]"
@@ -31,34 +28,34 @@
</div>
<div class="grid grid-cols-1 gap-2 pt-4 lg:grid-cols-2 xl:grid-cols-3">
@foreach ($applications as $application)
<div class="box group">
<a href="{{ $application->link() }}" class="flex flex-col ">
<a href="{{ $application->link() }}"class="box group">
<div class="flex flex-col">
<div class="box-title">{{ $application->name }}</div>
<div class="box-description">
{{ $application->project()->name }}/{{ $application->environment->name }}
</div>
<div class="box-description">{{ $application->description }}</div>
</a>
</div>
</div>
</a>
@endforeach
@foreach ($services as $service)
<div class="box group">
<a href="{{ $service->link() }}" class="flex flex-col ">
<a href="{{ $service->link() }}" class="box group">
<div class="flex flex-col ">
<div class="box-title">{{ $service->name }}</div>
<div class="box-description">
{{ $service->project()->name }}/{{ $service->environment->name }}</div>
<div class="box-description">{{ $service->description }}</div>
</a>
</div>
</div>
</a>
@endforeach
</div>
<div class="flex items-center gap-2">
<h3 class="py-4">Deployments</h3>
@if (count($deployments_per_tag_per_server) > 0)
@if (count($deploymentsPerTagPerServer) > 0)
<x-loading />
@endif
</div>
<livewire:tags.deployments :deployments_per_tag_per_server="$deployments_per_tag_per_server" :resource_ids="$applications->pluck('id')" />
<livewire:tags.deployments :deploymentsPerTagPerServer="$deploymentsPerTagPerServer" :resourceIds="$applications->pluck('id')" />
</div>
@endif
@endif

View File

@@ -1,7 +1,4 @@
<div>
<x-slot:title>
Tag | Coolify
</x-slot>
<div class="flex items-start gap-2">
<div>
<h1>Tags</h1>

View File

@@ -1,8 +1,10 @@
<form wire:submit='viaLink' class="flex flex-col items-start gap-2 lg:items-end lg:flex-row">
<div class="flex flex-1 gap-2">
<x-forms.input id="email" type="email" label="Email" name="email" placeholder="Email" required />
<x-forms.input id="email" type="email" label="Email" name="email" placeholder="Email" required />
<x-forms.select id="role" name="role" label="Role">
<option value="owner">Owner</option>
@if (auth()->user()->role() === 'owner')
<option value="owner">Owner</option>
@endif
<option value="admin">Admin</option>
<option value="member">Member</option>
</x-forms.select>