ui ui ui ui ui ui ux ux ux ux ux ux

This commit is contained in:
Andras Bacsai
2024-03-21 12:44:32 +01:00
parent 8f66a41c09
commit b5775ff9d2
61 changed files with 597 additions and 430 deletions

View File

@@ -3,16 +3,19 @@
@if ($this->activity)
@if (isset($header))
<div class="flex gap-2 pb-2">
<h2>{{ $header }}</h2>
<h3>{{ $header }}</h3>
@if ($isPollingActive)
<x-loading />
@endif
</div>
@endif
<div
class="scrollbar flex flex-col-reverse w-full overflow-y-auto border border-solid rounded border-coolgray-300 max-h-[32rem] p-4 text-xs text-white">
class="flex flex-col-reverse w-full px-4 py-2 overflow-y-auto text-white border border-solid rounded bg-coolgray-100 scrollbar border-coolgray-300 max-h-96">
<pre class="font-mono whitespace-pre-wrap" @if ($isPollingActive) wire:poll.1000ms="polling" @endif>{{ RunRemoteProcess::decodeOutput($this->activity) }}</pre>
</div>
@else
@if (isset($showWaiting))
<x-loading text="Waiting..." />
@endif
@endif
</div>

View File

@@ -41,7 +41,7 @@
</a>
<a class="mx-4 rounded group-hover:dark:text-white group-hover:text-black"
href="{{ route('project.edit', ['project_uuid' => data_get($project, 'uuid')]) }}">
<svg xmlns="http://www.w3.org/2000/svg" class="icon hover:text-coollabs" viewBox="0 0 24 24"
<svg xmlns="http://www.w3.org/2000/svg" class="icon hover:bg-coollabs" viewBox="0 0 24 24"
stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round"
stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none" />

View File

@@ -17,7 +17,7 @@
</x-slot:button-text>
</x-popup>
{{-- <div class="toast">
<div class="flex flex-col text-white rounded alert bg-coolgray-200">
<div class="flex flex-col text-white rounded alert-error bg-coolgray-200">
<span>Love Coolify as we do? <a href="https://coolify.io/sponsorships"
class="underline text-warning">Please
consider donating!</a>💜</span>
@@ -40,7 +40,7 @@
@endif
@if (!currentTeam()->isAnyNotificationEnabled())
<div class="toast">
<div class="flex flex-col text-white rounded alert bg-coolgray-200">
<div class="flex flex-col text-white rounded alert-error bg-coolgray-200">
<span><span class="font-bold text-red-500">WARNING:</span> No notifications enabled.<br><br> It is
highly recommended to enable at least
one

View File

@@ -1,32 +0,0 @@
<form x-data="{ raw: true }" class="custom-modal" wire:submit='submit'>
<div class="flex items-end gap-2">
<h1>Docker Compose</h1>
<div x-cloak x-show="raw">
<x-forms.button class="w-64" @click.prevent="raw = !raw">Show Deployable Compose</x-forms.button>
</div>
<div x-cloak x-show="raw === false">
<x-forms.button class="w-64" @click.prevent="raw = !raw">Show Source
Compose</x-forms.button>
</div>
</div>
<div>Volume names are updated upon save. The service UUID will be added as a prefix to all volumes, to prevent
name collision. <br>To see the actual volume names, check the Deployable Compose file, or go to Storage
menu.</div>
<div x-cloak x-show="raw" class="font-mono">
<x-forms.textarea rows="20" id="service.docker_compose_raw">
</x-forms.textarea>
</div>
<div x-cloak x-show="raw === false" class="font-mono">
<x-forms.textarea rows="20" readonly id="service.docker_compose">
</x-forms.textarea>
</div>
<div class="flex justify-end w-full gap-2">
<x-forms.button class="w-64" type="submit">
Save
</x-forms.button>
<x-forms.button wire:click='closeModal'>
Close
</x-forms.button>
</div>
</form>

View File

@@ -8,10 +8,15 @@
<livewire:project.database.backup-now :backup="$backup" />
@endif
@if ($backup->database_id !== 0)
<x-forms.button isError wire:click="delete">Delete</x-forms.button>
<x-modal-confirmation isErrorButton>
<x-slot:button-title>
Delete
</x-slot:button-title>
This will stop the scheduled backup for this database.<br>Please think again.
</x-modal-confirmation>
@endif
</div>
<div class="w-32 pb-2">
<div class="w-48 pb-2">
<x-forms.checkbox instantSave label="Backup Enabled" id="backup.enabled" />
<x-forms.checkbox instantSave label="S3 Enabled" id="backup.save_s3" />
</div>

View File

@@ -1,14 +1,14 @@
<div class="flex flex-col-reverse gap-2">
@forelse($executions as $execution)
<form wire:key="{{ data_get($execution, 'id') }}" class="relative flex flex-col p-4 border-dotted border-1 bg-coolgray-100"
@class([
<form wire:key="{{ data_get($execution, 'id') }}"
class="relative flex flex-col p-4 border-dotted border-1 bg-coolgray-100" @class([
'border-green-500' => data_get($execution, 'status') === 'success',
'border-red-500' => data_get($execution, 'status') === 'failed',
])>
@if (data_get($execution, 'status') === 'running')
<div class="absolute top-2 right-2">
<x-loading />
</div>
<div class="absolute top-2 right-2">
<x-loading />
</div>
@endif
<div>Database: {{ data_get($execution, 'database_name', 'N/A') }}</div>
<div>Status: {{ data_get($execution, 'status') }}</div>
@@ -26,8 +26,12 @@
<x-forms.button class=" hover:bg-coolgray-400"
wire:click="download({{ data_get($execution, 'id') }})">Download</x-forms.button>
@endif
<x-forms.button isError wire:click="deleteBackup({{ data_get($execution, 'id') }})"
wire:confirm.prompt="Are you sure?\n\nType DELETE to confirm|DELETE">Delete</x-forms.button>
<x-modal-confirmation isErrorButton action="deleteBackup({{ data_get($execution, 'id') }})">
<x-slot:button-title>
Delete
</x-slot:button-title>
This will delete this backup. It is not reversible.<br>Please think again.
</x-modal-confirmation>
</div>
</form>
@empty

View File

@@ -1,6 +1,7 @@
<div>
<h1>Backups</h1>
<livewire:project.database.heading :database="$database" />
<x-modal modalId="startDatabase">
<x-slot:modalBody>
<livewire:activity-monitor header="Database Startup Logs" />
@@ -11,11 +12,17 @@
</x-forms.button>
</x-slot:modalSubmit>
</x-modal>
<livewire:project.database.create-scheduled-backup :database="$database" :s3s="$s3s" />
<div class="pt-6">
<div class="flex gap-2 ">
<h2 class="pb-4">Scheduled Backups</h2>
<x-forms.button onclick="createScheduledBackup.showModal()">+ Add</x-forms.button>
<x-slide-over>
<x-slot:title>New Scheduled Backup</x-slot:title>
<x-slot:content>
<livewire:project.database.create-scheduled-backup :database="$database" :s3s="$s3s" />
</x-slot:content>
<button @click="slideOverOpen=true" class="button">+
Add</button>
</x-slide-over>
</div>
<livewire:project.database.scheduled-backups :database="$database" />
</div>

View File

@@ -1,23 +1,16 @@
<dialog id="createScheduledBackup" class="modal">
<form method="dialog" class="flex flex-col gap-2 rounded modal-box" wire:submit='submit'>
<h2>New Backup</h2>
<x-forms.input placeholder="0 0 * * * or daily" id="frequency" label="Frequency" required />
<h3>S3 Storage</h3>
<x-forms.checkbox id="save_s3" label="Save to S3" />
<x-forms.select id="selected_storage_id">
@if ($s3s->count() === 0)
<option value="0">No S3 Storages found.</option>
@else
@foreach ($s3s as $s3)
<option value="{{ $s3->id }}">{{ $s3->name }}</option>
@endforeach
@endif
</x-forms.select>
<x-forms.button onclick="createScheduledBackup.close()" type="submit">
Save
</x-forms.button>
</form>
<form method="dialog" class="modal-backdrop">
<button>close</button>
</form>
</dialog>
<form class="flex flex-col gap-2 rounded" wire:submit='submit'>
<x-forms.input placeholder="0 0 * * * or daily" id="frequency" label="Frequency" required />
<x-forms.checkbox id="save_s3" label="Save to S3" />
<x-forms.select id="selected_storage_id">
@if ($s3s->count() === 0)
<option value="0">No S3 Storages found.</option>
@else
@foreach ($s3s as $s3)
<option value="{{ $s3->id }}">{{ $s3->name }}</option>
@endforeach
@endif
</x-forms.select>
<x-forms.button type="submit" @click="slideOverOpen=false">
Save
</x-forms.button>
</form>

View File

@@ -1,4 +1,73 @@
<nav wire:poll.5000ms="check_status">
<x-resources.breadcrumbs :resource="$database" :parameters="$parameters" />
<x-databases.navbar :database="$database" :parameters="$parameters" />
<x-slide-over @startdatabase.window="slideOverOpen = true" closeWithX fullScreen>
<x-slot:title>Database Startup Logs</x-slot:title>
<x-slot:content>
<livewire:activity-monitor showWaiting />
</x-slot:content>
</x-slide-over>
<div class="navbar-main">
<a class="{{ request()->routeIs('project.database.configuration') ? 'text-white' : '' }}"
href="{{ route('project.database.configuration', $parameters) }}">
<button>Configuration</button>
</a>
<a class="{{ request()->routeIs('project.database.command') ? 'text-white' : '' }}"
href="{{ route('project.database.command', $parameters) }}">
<button>Execute Command</button>
</a>
<a class="{{ request()->routeIs('project.database.logs') ? 'text-white' : '' }}"
href="{{ route('project.database.logs', $parameters) }}">
<button>Logs</button>
</a>
@if (
$database->getMorphClass() === 'App\Models\StandalonePostgresql' ||
$database->getMorphClass() === 'App\Models\StandaloneMongodb' ||
$database->getMorphClass() === 'App\Models\StandaloneMysql' ||
$database->getMorphClass() === 'App\Models\StandaloneMariadb')
<a class="{{ request()->routeIs('project.database.backup.index') ? 'text-white' : '' }}"
href="{{ route('project.database.backup.index', $parameters) }}">
<button>Backups</button>
</a>
@endif
<div class="flex-1"></div>
@if (!str($database->status)->startsWith('exited'))
<x-modal-confirmation @click="$wire.dispatch('stopEvent')">
<x-slot:button-title>
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 text-error" viewBox="0 0 24 24"
stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round"
stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<path d="M6 5m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v12a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z">
</path>
<path d="M14 5m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v12a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z">
</path>
</svg>
Stop
</x-slot:button-title>
This database will be stopped. <br>Please think again.
</x-modal-confirmation>
@else
<button @click="$wire.dispatch('startEvent')" class="gap-2 button">
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 text-warning" viewBox="0 0 24 24"
stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round"
stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<path d="M7 4v16l13 -8z" />
</svg>
Start
</button>
@endif
@script
<script>
$wire.$on('startEvent', () => {
window.dispatchEvent(new CustomEvent('startdatabase'));
$wire.$call('start');
});
$wire.$on('stopEvent', () => {
$wire.$dispatch('warning', 'Stopping database.');
$wire.$call('stop');
});
</script>
@endscript
</div>
</nav>

View File

@@ -1,6 +1,6 @@
<div>
<h2>Import Backup</h2>
<div class="mt-2 mb-4 rounded alert">
<div class="mt-2 mb-4 rounded alert-error">
<svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6 stroke-current shrink-0" fill="none" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" />
@@ -55,6 +55,6 @@
<livewire:activity-monitor header="Database import output" />
</div>
@else
<div class="text-neutral-500">Database must be running to import a backup.</div>
<div>Database must be running to import a backup.</div>
@endif
</div>

View File

@@ -1,7 +1,7 @@
<div>
<div class="flex flex-wrap gap-2">
@forelse($database->scheduledBackups as $backup)
@if ($type === 'database')
@if ($type == 'database')
<a class="flex flex-col box"
href="{{ route('project.database.backup.execution', [...$parameters, 'backup_uuid' => $backup->uuid]) }}">
<div>Frequency: {{ $backup->frequency }}</div>
@@ -25,10 +25,10 @@
</div>
@if ($type === 'service-database' && $selectedBackup)
<div class="pt-10">
<livewire:project.database.backup-edit key="{{ $selectedBackup->id }}" :backup="$selectedBackup" :s3s="$s3s"
<livewire:project.database.backup-edit wire:key="{{ $selectedBackup->id }}" :backup="$selectedBackup" :s3s="$s3s"
:status="data_get($database, 'status')" />
<h3 class="py-4">Executions</h3>
<livewire:project.database.backup-executions key="{{ $selectedBackup->id }}" :backup="$selectedBackup"
<livewire:project.database.backup-executions wire:keykey="{{ $selectedBackup->id }}" :backup="$selectedBackup"
:executions="$selectedBackup->executions" />
</div>
@endif

View File

@@ -33,7 +33,7 @@
<livewire:project.shared.environment-variable.show wire:key="environment-{{ $env->id }}"
:env="$env" type="project" />
@empty
<div class="text-neutral-500">No environment variables found.</div>
<div>No environment variables found.</div>
@endforelse
</div>
</div>

View File

@@ -62,7 +62,7 @@
<livewire:project.shared.environment-variable.show wire:key="environment-{{ $env->id }}"
:env="$env" type="environment" />
@empty
<div class="text-neutral-500">No environment variables found.</div>
<div>No environment variables found.</div>
@endforelse
</div>
</div>

View File

@@ -34,7 +34,7 @@
@endif
@empty
<div class="flex flex-col items-center justify-center gap-2">
<div class="text-neutral-500">
<div>
No private keys found.
</div>
<a href="{{ route('security.private-key.index') }}">

View File

@@ -28,12 +28,12 @@
</div>
</div>
<h3 class="pt-2">Advanced</h3>
<div class="w-64">
<x-forms.checkbox instantSave label="Exclude from service status"
<div class="w-96">
<x-forms.checkbox instantSave="instantSaveExclude" label="Exclude from service status"
helper="If you do not need to monitor this resource, enable. Useful if this service is optional."
id="database.exclude_from_status"></x-forms.checkbox>
<x-forms.checkbox helper="Drain logs to your configured log drain endpoint in your Server settings."
instantSave="instantSaveAdvanced" id="database.is_log_drain_enabled" label="Drain Logs" />
instantSave="instantSaveLogDrain" id="database.is_log_drain_enabled" label="Drain Logs" />
</div>
</form>
</div>

View File

@@ -0,0 +1,29 @@
<div x-data="{ raw: true }">
<div class="pb-4">Volume names are updated upon save. The service UUID will be added as a prefix to all volumes, to
prevent
name collision. <br>To see the actual volume names, check the Deployable Compose file, or go to Storage
menu.</div>
<div x-cloak x-show="raw" class="font-mono">
<x-forms.textarea rows="20" id="service.docker_compose_raw">
</x-forms.textarea>
</div>
<div x-cloak x-show="raw === false" class="font-mono">
<x-forms.textarea rows="20" readonly id="service.docker_compose">
</x-forms.textarea>
</div>
<div class="flex justify-end w-full gap-2 pt-4">
<div class="flex items-end gap-2">
<div x-cloak x-show="raw">
<x-forms.button class="w-64" @click.prevent="raw = !raw">Show Deployable Compose</x-forms.button>
</div>
<div x-cloak x-show="raw === false">
<x-forms.button class="w-64" @click.prevent="raw = !raw">Show Source
Compose</x-forms.button>
</div>
</div>
<x-forms.button class="w-64" wire:click.prevent='saveEditedCompose'>
Save
</x-forms.button>
</div>
</div>

View File

@@ -55,9 +55,15 @@
<div x-cloak x-show="activeTab === 'backups'">
<div class="flex gap-2 ">
<h2 class="pb-4">Scheduled Backups</h2>
<x-forms.button onclick="createScheduledBackup.showModal()">+ Add</x-forms.button>
<x-slide-over>
<x-slot:title>New Scheduled Backup</x-slot:title>
<x-slot:content>
<livewire:project.database.create-scheduled-backup :database="$serviceDatabase" :s3s="$s3s" />
</x-slot:content>
<button @click="slideOverOpen=true" class="button">+
Add</button>
</x-slide-over>
</div>
<livewire:project.database.create-scheduled-backup :database="$serviceDatabase" :s3s="$s3s" />
<livewire:project.database.scheduled-backups :database="$serviceDatabase" />
</div>
@endisset

View File

@@ -1,12 +0,0 @@
<div>
<x-modal noSubmit modalId="startService">
<x-slot:modalBody>
<livewire:activity-monitor header="Service Startup Logs" />
</x-slot:modalBody>
<x-slot:modalSubmit>
<x-forms.button onclick="startService.close()" type="submit">
Close
</x-forms.button>
</x-slot:modalSubmit>
</x-modal>
</div>

View File

@@ -1,6 +1,135 @@
<div>
<livewire:project.service.modal />
<x-slide-over @startservice.window="slideOverOpen = true" closeWithX fullScreen>
<x-slot:title>Service Startup</x-slot:title>
<x-slot:content>
<livewire:activity-monitor header="Logs" showWaiting />
</x-slot:content>
</x-slide-over>
<h1>Configuration</h1>
<x-resources.breadcrumbs :resource="$service" :parameters="$parameters" />
<x-services.navbar :service="$service" :parameters="$parameters" />
<div class="navbar-main" x-data>
<a class="{{ request()->routeIs('project.service.configuration') ? 'text-white' : '' }}"
href="{{ route('project.service.configuration', $parameters) }}">
<button>Configuration</button>
</a>
<x-services.links :service="$service" />
<div class="flex-1"></div>
@if (str($service->status())->contains('running'))
<button @click="$wire.dispatch('restartEvent')" class="gap-2 button">
<svg class="w-5 h-5 text-warning" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"
stroke-width="2">
<path d="M19.933 13.041a8 8 0 1 1-9.925-8.788c3.899-1 7.935 1.007 9.425 4.747" />
<path d="M20 4v5h-5" />
</g>
</svg>
Pull Latest Images & Restart
</button>
<x-modal-confirmation @click="$wire.dispatch('stopEvent')">
<x-slot:button-title>
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 text-error" viewBox="0 0 24 24"
stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round"
stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<path d="M6 5m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v12a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z">
</path>
<path d="M14 5m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v12a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z">
</path>
</svg>
Stop
</x-slot:button-title>
This service will be stopped. <br>Please think again.
</x-modal-confirmation>
@elseif (str($service->status())->contains('degraded'))
<button @click="$wire.dispatch('startEvent')" class="gap-2 button">
<svg class="w-5 h-5 text-warning" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"
stroke-width="2">
<path d="M19.933 13.041a8 8 0 1 1-9.925-8.788c3.899-1 7.935 1.007 9.425 4.747" />
<path d="M20 4v5h-5" />
</g>
</svg>
Restart Degraded Services
</button>
<x-modal-confirmation @click="$wire.dispatch('stopEvent')">
<x-slot:button-title>
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 text-error" viewBox="0 0 24 24"
stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round"
stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<path d="M6 5m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v12a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z">
</path>
<path d="M14 5m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v12a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z">
</path>
</svg>
Stop
</x-slot:button-title>
This service will be stopped. <br>Please think again.
</x-modal-confirmation>
@elseif (str($service->status())->contains('exited'))
<button wire:click='stop(true)' class="gap-2 button">
<svg class="w-5 h-5 " viewBox="0 0 32 32" xmlns="http://www.w3.org/2000/svg">
<path fill="red" d="M26 20h-6v-2h6zm4 8h-6v-2h6zm-2-4h-6v-2h6z" />
<path fill="red"
d="M17.003 20a4.895 4.895 0 0 0-2.404-4.173L22 3l-1.73-1l-7.577 13.126a5.699 5.699 0 0 0-5.243 1.503C3.706 20.24 3.996 28.682 4.01 29.04a1 1 0 0 0 1 .96h14.991a1 1 0 0 0 .6-1.8c-3.54-2.656-3.598-8.146-3.598-8.2Zm-5.073-3.003A3.11 3.11 0 0 1 15.004 20c0 .038.002.208.017.469l-5.9-2.624a3.8 3.8 0 0 1 2.809-.848ZM15.45 28A5.2 5.2 0 0 1 14 25h-2a6.5 6.5 0 0 0 .968 3h-2.223A16.617 16.617 0 0 1 10 24H8a17.342 17.342 0 0 0 .665 4H6c.031-1.836.29-5.892 1.803-8.553l7.533 3.35A13.025 13.025 0 0 0 17.596 28Z" />
</svg>
Force Cleanup Containers
</button>
<button @click="$wire.dispatch('startEvent')" class="gap-2 button">
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 text-warning" viewBox="0 0 24 24"
stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round"
stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<path d="M7 4v16l13 -8z" />
</svg>
Deploy
</button>
@else
<x-modal-confirmation @click="$wire.dispatch('stopEvent')">
<x-slot:button-title>
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 text-error" viewBox="0 0 24 24"
stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round"
stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<path d="M6 5m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v12a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z">
</path>
<path d="M14 5m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v12a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z">
</path>
</svg>
Stop
</x-slot:button-title>
This service will be stopped. <br>Please think again.
</x-modal-confirmation>
<button @click="$wire.dispatch('startEvent')" class="gap-2 button">
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 text-warning" viewBox="0 0 24 24"
stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round"
stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
<path d="M7 4v16l13 -8z" />
</svg>
Deploy
</button>
@endif
</div>
@script
<script>
$wire.$on('stopEvent', () => {
$wire.$dispatch('warning', 'Stopping service.');
$wire.$call('stop');
});
$wire.$on('startEvent', () => {
window.dispatchEvent(new CustomEvent('startservice'));
$wire.$call('start');
});
$wire.$on('restartEvent', () => {
$wire.$dispatch('warning', 'Pulling new images.');
$wire.$call('restart');
});
$wire.on('imagePulled', () => {
window.dispatchEvent(new CustomEvent('startservice'));
$wire.$dispatch('warning', 'Restarting service.');
});
</script>
@endscript
</div>

View File

@@ -7,7 +7,12 @@
<h2>{{ Str::headline($application->name) }}</h2>
@endif
<x-forms.button type="submit">Save</x-forms.button>
<x-forms.button isError wire:click='delete'>Delete</x-forms.button>
<x-modal-confirmation isErrorButton>
<x-slot:button-title>
Delete
</x-slot:button-title>
This will delete this service application. It is not reversible.<br>Please think again.
</x-modal-confirmation>
</div>
<div class="flex flex-col gap-2">
<div class="flex gap-2">

View File

@@ -1,14 +1,17 @@
<form wire:submit='submit' class="flex flex-col gap-4 pb-2">
<div class="flex gap-2">
<div>
<form wire:submit.prevent='submit' class="flex flex-col gap-4 pb-2">
<div>
<div class="flex gap-2">
<h2>Service Stack</h2>
<div>Configuration</div>
<x-forms.button type="submit">Save</x-forms.button>
<x-slide-over closeWithX fullScreen>
<x-slot:title>Docker Compose</x-slot:title>
<x-slot:content>
<livewire:project.service.edit-compose serviceId="{{ $service->id }}" />
</x-slot:content>
<button @click.prevent="slideOverOpen=true" class="button">Edit Compose File</button>
</x-slide-over>
</div>
<x-forms.button type="submit">Save</x-forms.button>
<x-forms.button class="w-64"
onclick="Livewire.dispatch('openModal', {component: 'modal.edit-compose', arguments: {{ json_encode(['serviceId' => $service->id]) }} })">Edit
Compose
File</x-forms.button>
<div>Configuration</div>
</div>
<div class="flex gap-2">
<x-forms.input id="service.name" required label="Service Name" placeholder="My super wordpress site" />

View File

@@ -84,7 +84,7 @@
@endforeach
</div>
@else
<div class="text-neutral-500">No additional servers available to attach.</div>
<div>No additional servers available to attach.</div>
@endif
@endif
</div>

View File

@@ -24,7 +24,7 @@
<livewire:project.shared.environment-variable.show wire:key="environment-{{ $env->id }}"
:env="$env" :type="$resource->type()" />
@empty
<div class="text-neutral-500">No environment variables found.</div>
<div>No environment variables found.</div>
@endforelse
@if ($resource->type() === 'application' && $resource->environment_variables_preview->count() > 0 && $showPreview)
<div>

View File

@@ -11,10 +11,10 @@
<div>({{ $pull_request }})</div>
@endif
@if ($streamLogs)
<span wire:poll.2000ms='getLogs(true)' class="loading loading-xs text-warning loading-spinner"></span>
<x-loading wire:poll.2000ms='getLogs(true)' />
@endif
</div>
<form wire:submit='getLogs(true)' class="flex items-end gap-2 pt-2 ">
<form wire:submit='getLogs(true)' class="flex items-end gap-2 ">
<div class="w-96">
<x-forms.input label="Only Show Number of Lines" placeholder="1000" required
id="numberOfLines"></x-forms.input>

View File

@@ -22,7 +22,7 @@
<div>Last run: {{ data_get($task->latest_log, 'status', 'No runs yet') }}</div>
</a>
@empty
<div class="text-neutral-500">No scheduled tasks configured.</div>
<div>No scheduled tasks configured.</div>
@endforelse
</div>
</div>

View File

@@ -34,7 +34,7 @@
</script>
@endscript
<div class="toast z-[9999]" x-cloak x-show="showNotification">
<div class="flex flex-col text-white border border-red-500 border-dashed rounded alert bg-coolgray-200">
<div class="flex flex-col text-white border border-red-500 border-dashed rounded alert-error bg-coolgray-200">
<span><span class="font-bold text-left text-red-500">WARNING: </span>Coolify could not connect to the new
realtime service introduced in beta.154. <br>This will cause unusual problems on the UI if not
fixed!<br><br>Please check the

View File

@@ -24,7 +24,12 @@
class="flex items-center gap-2 group-hover:text-white p-2 border border-coolgray-200 hover:text-white hover:no-underline min-w-[24rem] cursor-default">
<div>{{ $token->name }}</div>
</div>
<x-forms.button wire:click="revoke('{{ $token->id }}')">Revoke</x-forms.button>
<x-modal-confirmation isErrorButton action="revoke({{ data_get($token, 'id') }})">
<x-slot:button-title>
Revoke token
</x-slot:button-title>
This API Token will be deleted and anything using it will fail. <br>Please think again.
</x-modal-confirmation>
</div>
@empty
<div>

View File

@@ -1,22 +1,11 @@
<div>
<x-modal yesOrNo modalId="stopProxy" modalTitle="Stop Proxy" action="stop">
<x-slot:modalBody>
<p>This proxy will be stopped. It is not reversible. <br>All resources will be unavailable.
<br>Please think
again.
</p>
</x-slot:modalBody>
</x-modal>
<x-modal yesOrNo modalId="restartProxy" modalTitle="Restart Proxy" action="restart">
<x-slot:modalBody>
<p>This proxy will be stopped and started. It is not reversible. <br>All resources will be unavailable
during the restart.
<br>Please think
again.
</p>
</x-slot:modalBody>
</x-modal>
@if ($server->isFunctional() && $server->proxyType() !== 'NONE')
<x-slide-over closeWithX fullScreen @startproxy.window="slideOverOpen = true">
<x-slot:title>Proxy Status</x-slot:title>
<x-slot:content>
<livewire:activity-monitor header="Logs" />
</x-slot:content>
</x-slide-over>
@if (data_get($server, 'proxy.status') === 'running')
<div class="flex gap-4">
@if ($currentRoute === 'server.proxy' && $traefikDashboardAvailable && $server->proxyType() === 'TRAEFIK_V2')
@@ -27,32 +16,39 @@
</a>
</button>
@endif
<x-forms.button isModal noStyle modalId="restartProxy"
class="flex items-center gap-2 cursor-pointer hover:text-white text-neutral-400">
<svg class="w-5 h-5 text-warning" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"
stroke-width="2">
<path d="M19.933 13.041a8 8 0 1 1-9.925-8.788c3.899-1 7.935 1.007 9.425 4.747" />
<path d="M20 4v5h-5" />
</g>
</svg>
Restart Proxy
</x-forms.button>
<x-forms.button isModal noStyle modalId="stopProxy"
class="flex items-center gap-2 cursor-pointer hover:text-white text-neutral-400">
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 text-error" viewBox="0 0 24 24"
stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round"
stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<path d="M6 5m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v12a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z"></path>
<path d="M14 5m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v12a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z"></path>
</svg>
Stop Proxy
</x-forms.button>
<x-modal-confirmation @click="$wire.dispatch('restartEvent')">
<x-slot:button-title>
<svg class="w-5 h-5 text-warning" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<g fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"
stroke-width="2">
<path d="M19.933 13.041a8 8 0 1 1-9.925-8.788c3.899-1 7.935 1.007 9.425 4.747" />
<path d="M20 4v5h-5" />
</g>
</svg>
Restart Proxy
</x-slot:button-title>
This proxy will be stopped and started. It is not reversible. <br>All resources will be unavailable
during the restart. <br>Please think again.
</x-modal-confirmation>
<x-modal-confirmation @click="$wire.dispatch('stopEvent')">
<x-slot:button-title>
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 text-error" viewBox="0 0 24 24"
stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round"
stroke-linejoin="round">
<path stroke="none" d="M0 0h24v24H0z" fill="none"></path>
<path d="M6 5m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v12a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z">
</path>
<path d="M14 5m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v12a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z">
</path>
</svg>
Stop Proxy
</x-slot:button-title>
This proxy will be stopped. It is not reversible. <br>All resources will be unavailable.
<br>Please think again.
</x-modal-confirmation>
</div>
@else
<button x-on:click="$wire.dispatch('checkProxy')"
class="flex items-center gap-2 cursor-pointer hover:text-white text-neutral-400">
<button @click="$wire.dispatch('checkProxy')" class="gap-2 button">
<svg xmlns="http://www.w3.org/2000/svg" class="w-5 h-5 text-warning" viewBox="0 0 24 24"
stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round"
stroke-linejoin="round">
@@ -63,10 +59,21 @@
</button>
@endif
@endif
<script>
Livewire.on('proxyChecked', () => {
startProxy.showModal();
window.Livewire.dispatch('startProxy');
})
</script>
@script
<script>
$wire.$on('restartEvent', () => {
$wire.$dispatch('warning', 'Restarting proxy.');
$wire.$call('restart');
});
$wire.$on('proxyChecked', () => {
window.dispatchEvent(new CustomEvent('startproxy'))
$wire.$call('startProxy');
});
$wire.$on('stopEvent', () => {
$wire.$dispatch('warning', 'Stopping proxy.');
$wire.$call('stop');
});
</script>
@endscript
</div>

View File

@@ -26,7 +26,7 @@
<div class="overflow-hidden">
<table class="min-w-full divide-y divide-coolgray-400">
<thead>
<tr class="text-neutral-500">
<tr>
<th class="px-5 py-3 text-xs font-medium text-left uppercase">
Project
</th>
@@ -98,7 +98,7 @@
<div class="overflow-hidden">
<table class="min-w-full divide-y divide-coolgray-400">
<thead>
<tr class="text-neutral-500">
<tr>
<th class="px-5 py-3 text-xs font-medium text-left uppercase">
Name
</th>
@@ -125,7 +125,7 @@
<td class="px-5 py-4 text-sm whitespace-nowrap">
{{ data_get($resource, 'State') }}
</td>
<td class="px-5 py-4 text-sm whitespace-nowrap">
<td class="flex gap-2 px-5 py-4 text-sm whitespace-nowrap">
@if (data_get($resource, 'State') === 'running')
<x-forms.button
wire:click="restartUnmanaged('{{ data_get($resource, 'ID') }}')"

View File

@@ -108,7 +108,7 @@
<div class="overflow-hidden">
<table class="min-w-full divide-y divide-coolgray-400">
<thead>
<tr class="text-neutral-500">
<tr>
<th class="px-5 py-3 text-xs font-medium text-left uppercase">Project
</th>
<th class="px-5 py-3 text-xs font-medium text-left uppercase">

View File

@@ -1,11 +1,9 @@
<div>
<form wire:submit='createGitHubApp' class="flex flex-col">
<h2>GitHub App</h2>
<form wire:submit='createGitHubApp' class="flex flex-col gap-2">
<div class="flex gap-2">
<x-forms.input id="name" label="Name" required />
<x-forms.input helper="If empty, your GitHub user will be used." id="organization" label="Organization" />
</div>
<h3 class="py-4">Advanced</h3>
<div class="flex gap-2">
<x-forms.input id="html_url" label="HTML Url" required />
<x-forms.input id="api_url" label="API Url" required />
@@ -15,7 +13,7 @@
<x-forms.input id="custom_port" type="number" label="Custom Git Port" required />
</div>
@if (!isCloud())
<x-forms.checkbox class="pt-2" id="is_system_wide" label="System Wide" />
<x-forms.checkbox id="is_system_wide" label="System Wide" />
@endif
<x-forms.button class="mt-4" type="submit">
Continue

View File

@@ -14,7 +14,7 @@
class="text-warning">{{ session('currentTeam.name') }}</span></span>
</div>
@if (request()->query->get('cancelled'))
<div class="mb-6 rounded alert">
<div class="mb-6 rounded alert-error">
<svg xmlns="http://www.w3.org/2000/svg" class="w-6 h-6 stroke-current shrink-0" fill="none"
viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"

View File

@@ -21,7 +21,7 @@
<livewire:project.shared.environment-variable.show wire:key="environment-{{ $env->id }}"
:env="$env" type="team" />
@empty
<div class="text-neutral-500">No environment variables found.</div>
<div>No environment variables found.</div>
@endforelse
</div>
</div>

View File

@@ -8,7 +8,7 @@
<div class="overflow-hidden">
<table class="min-w-full divide-y divide-coolgray-400">
<thead>
<tr class="text-neutral-500">
<tr>
<th class="px-5 py-3 text-xs font-medium text-left uppercase">Email
</th>
<th class="px-5 py-3 text-xs font-medium text-left uppercase">

View File

@@ -41,7 +41,7 @@
@endif
@endif
@else
<div class="text-neutral-500">(This is you)</div>
<div>(This is you)</div>
@endif
@endif
</td>

View File

@@ -9,7 +9,7 @@
<div class="overflow-hidden">
<table class="min-w-full divide-y divide-coolgray-400">
<thead>
<tr class="text-neutral-500">
<tr>
<th class="px-5 py-3 text-xs font-medium text-left uppercase">Name
</th>
<th class="px-5 py-3 text-xs font-medium text-left uppercase">Email</th>