@@ -219,15 +219,14 @@ class PrivateKey extends BaseModel
|
|||||||
private static function fingerprintExists($fingerprint, $excludeId = null)
|
private static function fingerprintExists($fingerprint, $excludeId = null)
|
||||||
{
|
{
|
||||||
$query = self::query()
|
$query = self::query()
|
||||||
->where('fingerprint', $fingerprint);
|
->where('fingerprint', $fingerprint)
|
||||||
|
->where('id', '!=', $excludeId);
|
||||||
|
|
||||||
if (currentTeam()) {
|
if (currentTeam()) {
|
||||||
$query->where('team_id', currentTeam()->id);
|
$query->where('team_id', currentTeam()->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $query
|
return $query->exists();
|
||||||
->when($excludeId, fn ($query) => $query->where('id', '!=', $excludeId))
|
|
||||||
->exists();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function cleanupUnusedKeys()
|
public static function cleanupUnusedKeys()
|
||||||
|
|||||||
@@ -17,11 +17,14 @@ class Checkbox extends Component
|
|||||||
public ?string $value = null,
|
public ?string $value = null,
|
||||||
public ?string $label = null,
|
public ?string $label = null,
|
||||||
public ?string $helper = null,
|
public ?string $helper = null,
|
||||||
|
public string|bool|null $checked = false,
|
||||||
public string|bool $instantSave = false,
|
public string|bool $instantSave = false,
|
||||||
public bool $disabled = false,
|
public bool $disabled = false,
|
||||||
public string $defaultClass = 'dark:border-neutral-700 text-coolgray-400 focus:ring-warning dark:bg-coolgray-100 rounded cursor-pointer dark:disabled:bg-base dark:disabled:cursor-not-allowed',
|
public string $defaultClass = 'dark:border-neutral-700 text-coolgray-400 focus:ring-warning dark:bg-coolgray-100 rounded cursor-pointer dark:disabled:bg-base dark:disabled:cursor-not-allowed',
|
||||||
) {
|
) {
|
||||||
//
|
if ($this->disabled) {
|
||||||
|
$this->defaultClass .= ' opacity-40';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -227,13 +227,17 @@ function generateServiceSpecificFqdns(ServiceApplication|Application $resource)
|
|||||||
$MINIO_BROWSER_REDIRECT_URL = $variables->where('key', 'MINIO_BROWSER_REDIRECT_URL')->first();
|
$MINIO_BROWSER_REDIRECT_URL = $variables->where('key', 'MINIO_BROWSER_REDIRECT_URL')->first();
|
||||||
$MINIO_SERVER_URL = $variables->where('key', 'MINIO_SERVER_URL')->first();
|
$MINIO_SERVER_URL = $variables->where('key', 'MINIO_SERVER_URL')->first();
|
||||||
|
|
||||||
if (str($MINIO_BROWSER_REDIRECT_URL->value)->isEmpty()) {
|
if (is_null($MINIO_BROWSER_REDIRECT_URL) || is_null($MINIO_SERVER_URL)) {
|
||||||
$MINIO_BROWSER_REDIRECT_URL?->update([
|
return collect([]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (str($MINIO_BROWSER_REDIRECT_URL->value ?? '')->isEmpty()) {
|
||||||
|
$MINIO_BROWSER_REDIRECT_URL->update([
|
||||||
'value' => generateFqdn($server, 'console-'.$uuid, true),
|
'value' => generateFqdn($server, 'console-'.$uuid, true),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
if (str($MINIO_SERVER_URL->value)->isEmpty()) {
|
if (str($MINIO_SERVER_URL->value ?? '')->isEmpty()) {
|
||||||
$MINIO_SERVER_URL?->update([
|
$MINIO_SERVER_URL->update([
|
||||||
'value' => generateFqdn($server, 'minio-'.$uuid, true),
|
'value' => generateFqdn($server, 'minio-'.$uuid, true),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
@@ -246,13 +250,17 @@ function generateServiceSpecificFqdns(ServiceApplication|Application $resource)
|
|||||||
$LOGTO_ENDPOINT = $variables->where('key', 'LOGTO_ENDPOINT')->first();
|
$LOGTO_ENDPOINT = $variables->where('key', 'LOGTO_ENDPOINT')->first();
|
||||||
$LOGTO_ADMIN_ENDPOINT = $variables->where('key', 'LOGTO_ADMIN_ENDPOINT')->first();
|
$LOGTO_ADMIN_ENDPOINT = $variables->where('key', 'LOGTO_ADMIN_ENDPOINT')->first();
|
||||||
|
|
||||||
if (str($LOGTO_ENDPOINT?->value)->isEmpty()) {
|
if (is_null($LOGTO_ENDPOINT) || is_null($LOGTO_ADMIN_ENDPOINT)) {
|
||||||
$LOGTO_ENDPOINT?->update([
|
return collect([]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (str($LOGTO_ENDPOINT->value ?? '')->isEmpty()) {
|
||||||
|
$LOGTO_ENDPOINT->update([
|
||||||
'value' => generateFqdn($server, 'logto-'.$uuid),
|
'value' => generateFqdn($server, 'logto-'.$uuid),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
if (str($LOGTO_ADMIN_ENDPOINT?->value)->isEmpty()) {
|
if (str($LOGTO_ADMIN_ENDPOINT->value ?? '')->isEmpty()) {
|
||||||
$LOGTO_ADMIN_ENDPOINT?->update([
|
$LOGTO_ADMIN_ENDPOINT->update([
|
||||||
'value' => generateFqdn($server, 'logto-admin-'.$uuid),
|
'value' => generateFqdn($server, 'logto-admin-'.$uuid),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
return [
|
return [
|
||||||
'coolify' => [
|
'coolify' => [
|
||||||
'version' => '4.0.0-beta.369',
|
'version' => '4.0.0-beta.370',
|
||||||
'self_hosted' => env('SELF_HOSTED', true),
|
'self_hosted' => env('SELF_HOSTED', true),
|
||||||
'autoupdate' => env('AUTOUPDATE', false),
|
'autoupdate' => env('AUTOUPDATE'),
|
||||||
'base_config_path' => env('BASE_CONFIG_PATH', '/data/coolify'),
|
'base_config_path' => env('BASE_CONFIG_PATH', '/data/coolify'),
|
||||||
'helper_image' => env('HELPER_IMAGE', 'ghcr.io/coollabsio/coolify-helper'),
|
'helper_image' => env('HELPER_IMAGE', 'ghcr.io/coollabsio/coolify-helper'),
|
||||||
'is_windows_docker_desktop' => env('IS_WINDOWS_DOCKER_DESKTOP', false),
|
'is_windows_docker_desktop' => env('IS_WINDOWS_DOCKER_DESKTOP', false),
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
return '4.0.0-beta.369';
|
return '4.0.0-beta.370';
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
'disabled' => false,
|
'disabled' => false,
|
||||||
'instantSave' => false,
|
'instantSave' => false,
|
||||||
'value' => null,
|
'value' => null,
|
||||||
|
'checked' => false,
|
||||||
'hideLabel' => false,
|
'hideLabel' => false,
|
||||||
'fullWidth' => false,
|
'fullWidth' => false,
|
||||||
])
|
])
|
||||||
@@ -14,7 +15,9 @@
|
|||||||
'w-full' => $fullWidth,
|
'w-full' => $fullWidth,
|
||||||
])>
|
])>
|
||||||
@if (!$hideLabel)
|
@if (!$hideLabel)
|
||||||
<label @class(['flex gap-4 items-center px-0 min-w-fit label w-full cursor-pointer', 'opacity-40' => $disabled])>
|
<label @class([
|
||||||
|
'flex gap-4 items-center px-0 min-w-fit label w-full cursor-pointer',
|
||||||
|
])>
|
||||||
<span class="flex flex-grow gap-2">
|
<span class="flex flex-grow gap-2">
|
||||||
@if ($label)
|
@if ($label)
|
||||||
{!! $label !!}
|
{!! $label !!}
|
||||||
@@ -26,9 +29,10 @@
|
|||||||
@endif
|
@endif
|
||||||
</span>
|
</span>
|
||||||
@endif
|
@endif
|
||||||
<input @disabled($disabled) type="checkbox" {{ $attributes->merge(['class' => $defaultClass]) }}
|
<input @disabled($disabled) type="checkbox" {{ $attributes->merge(['class' => $defaultClass]) }}
|
||||||
@if ($instantSave) wire:loading.attr="disabled" wire:click='{{ $instantSave === 'instantSave' || $instantSave == '1' ? 'instantSave' : $instantSave }}'
|
@if ($instantSave) wire:loading.attr="disabled" wire:click='{{ $instantSave === 'instantSave' || $instantSave == '1' ? 'instantSave' : $instantSave }}'
|
||||||
wire:model={{ $id }} @else wire:model={{ $value ?? $id }} @endif />
|
@if ($checked) checked @endif
|
||||||
|
wire:model={{ $id }} @else wire:model={{ $value ?? $id }} @endif />
|
||||||
@if (!$hideLabel)
|
@if (!$hideLabel)
|
||||||
</label>
|
</label>
|
||||||
@endif
|
@endif
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
@endif
|
@endif
|
||||||
<template x-teleport="body">
|
<template x-teleport="body">
|
||||||
<div x-show="modalOpen"
|
<div x-show="modalOpen"
|
||||||
class="fixed top-0 left-0 lg:px-0 px-4 z-[99] flex items-center justify-center w-screen h-screen" x-cloak>
|
class="fixed top-0 left-0 lg:px-0 px-4 z-[99] flex items-center justify-center w-screen h-screen">
|
||||||
<div x-show="modalOpen" x-transition:enter="ease-out duration-100" x-transition:enter-start="opacity-0"
|
<div x-show="modalOpen" x-transition:enter="ease-out duration-100" x-transition:enter-start="opacity-0"
|
||||||
x-transition:enter-end="opacity-100" x-transition:leave="ease-in duration-100"
|
x-transition:enter-end="opacity-100" x-transition:leave="ease-in duration-100"
|
||||||
x-transition:leave-start="opacity-100" x-transition:leave-end="opacity-0"
|
x-transition:leave-start="opacity-100" x-transition:leave-end="opacity-0"
|
||||||
|
|||||||
@@ -103,7 +103,7 @@
|
|||||||
@if (!is_null(config('constants.coolify.autoupdate', null)))
|
@if (!is_null(config('constants.coolify.autoupdate', null)))
|
||||||
<div class="text-right md:w-96">
|
<div class="text-right md:w-96">
|
||||||
<x-forms.checkbox instantSave helper="AUTOUPDATE is set in .env file, you need to modify it there."
|
<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" />
|
disabled checked="{{ config('constants.coolify.autoupdate') }}" label="Auto Update Enabled" />
|
||||||
</div>
|
</div>
|
||||||
@else
|
@else
|
||||||
<x-forms.checkbox instantSave id="is_auto_update_enabled" label="Auto Update Enabled" />
|
<x-forms.checkbox instantSave id="is_auto_update_enabled" label="Auto Update Enabled" />
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
{
|
{
|
||||||
"coolify": {
|
"coolify": {
|
||||||
"v4": {
|
"v4": {
|
||||||
"version": "4.0.0-beta.369"
|
"version": "4.0.0-beta.370"
|
||||||
},
|
},
|
||||||
"nightly": {
|
"nightly": {
|
||||||
"version": "4.0.0-beta.370"
|
"version": "4.0.0-beta.371"
|
||||||
},
|
},
|
||||||
"helper": {
|
"helper": {
|
||||||
"version": "1.0.4"
|
"version": "1.0.4"
|
||||||
@@ -16,4 +16,4 @@
|
|||||||
"version": "0.0.15"
|
"version": "0.0.15"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user