format files lol

This commit is contained in:
Andras Bacsai
2023-08-11 20:19:42 +02:00
parent 054bebb081
commit c762195c8a
141 changed files with 1305 additions and 1307 deletions

View File

@@ -9,21 +9,21 @@
@endif
</div>
<div class="w-32 pb-2">
<x-forms.checkbox instantSave label="Backup Enabled" id="backup.enabled"/>
<x-forms.checkbox instantSave label="S3 Enabled" id="backup.save_s3"/>
<x-forms.checkbox instantSave label="Backup Enabled" id="backup.enabled" />
<x-forms.checkbox instantSave label="S3 Enabled" id="backup.save_s3" />
</div>
@if($backup->save_s3)
@if ($backup->save_s3)
<div class="pb-6">
<x-forms.select id="backup.s3_storage_id" label="S3 Storage" required>
<option value="default" disabled>Select a S3 storage</option>
@foreach($s3s as $s3)
@foreach ($s3s as $s3)
<option value="{{ $s3->id }}">{{ $s3->name }}</option>
@endforeach
</x-forms.select>
</div>
@endif
<div class="flex gap-2">
<x-forms.input label="Frequency" id="backup.frequency"/>
<x-forms.input label="Number of backups to keep (locally)" id="backup.number_of_backups_locally"/>
<x-forms.input label="Frequency" id="backup.frequency" />
<x-forms.input label="Number of backups to keep (locally)" id="backup.number_of_backups_locally" />
</div>
</form>

View File

@@ -1,7 +1,7 @@
<div class="flex gap-2">
<div class="flex-1"></div>
{{-- @if(data_get($execution,'status') !== 'failed')--}}
{{-- <x-forms.button class="bg-coollabs-100 hover:bg-coollabs" wire:click="download">Download</x-forms.button>--}}
{{-- @endif--}}
{{-- @if (data_get($execution, 'status') !== 'failed') --}}
{{-- <x-forms.button class="bg-coollabs-100 hover:bg-coollabs" wire:click="download">Download</x-forms.button> --}}
{{-- @endif --}}
<x-forms.button isError wire:click="delete">Delete</x-forms.button>
</div>

View File

@@ -1,20 +1,19 @@
<div class="flex flex-col gap-2 flex-col-reverse">
<div class="flex flex-col flex-col-reverse gap-2">
@forelse($executions as $execution)
<form class="border-1 bg-coolgray-300 p-2 border-dotted flex flex-col"
@class([
'border-green-500' => data_get($execution,'status') === 'success',
'border-red-500' => data_get($execution,'status') === 'failed',
])>
<div>Started At: {{data_get($execution,'created_at')}}</div>
<div>Status: {{data_get($execution,'status')}}</div>
@if(data_get($execution,'message'))
<div>Message: {{data_get($execution,'message')}}</div>
<form class="flex flex-col p-2 border-dotted border-1 bg-coolgray-300" @class([
'border-green-500' => data_get($execution, 'status') === 'success',
'border-red-500' => data_get($execution, 'status') === 'failed',
])>
<div>Started At: {{ data_get($execution, 'created_at') }}</div>
<div>Status: {{ data_get($execution, 'status') }}</div>
@if (data_get($execution, 'message'))
<div>Message: {{ data_get($execution, 'message') }}</div>
@endif
<div>Size: {{data_get($execution,'size')}} B / {{round((int)data_get($execution,'size') / 1024,2)}}
kB / {{round((int)data_get($execution,'size')/1024/1024,2)}} MB
<div>Size: {{ data_get($execution, 'size') }} B / {{ round((int) data_get($execution, 'size') / 1024, 2) }}
kB / {{ round((int) data_get($execution, 'size') / 1024 / 1024, 2) }} MB
</div>
<div>Location: {{data_get($execution,'filename')}}</div>
<livewire:project.database.backup-execution :execution="$execution" :wire:key="$execution->id"/>
<div>Location: {{ data_get($execution, 'filename') }}</div>
<livewire:project.database.backup-execution :execution="$execution" :wire:key="$execution->id" />
</form>
@empty
<div>No executions found.</div>

View File

@@ -1,4 +1,4 @@
<nav x-init="$wire.check_status" wire:poll.10000ms="check_status">
<x-resources.breadcrumbs :resource="$database" :parameters="$parameters"/>
<x-databases.navbar :database="$database" :parameters="$parameters"/>
<x-resources.breadcrumbs :resource="$database" :parameters="$parameters" />
<x-databases.navbar :database="$database" :parameters="$parameters" />
</nav>

View File

@@ -1,10 +1,10 @@
<div>
<form wire:submit.prevent="submit">
<div class="flex gap-2 items-end">
<x-forms.input id="filename" label="Filename"/>
<div class="flex items-end gap-2">
<x-forms.input id="filename" label="Filename" />
<x-forms.button type="submit">Save</x-forms.button>
<x-forms.button isError wire:click.prevent="delete">Delete</x-forms.button>
</div>
<x-forms.textarea id="content" label="Content"/>
<x-forms.textarea id="content" label="Content" />
</form>
</div>

View File

@@ -2,8 +2,8 @@
<dialog id="newInitScript" class="modal">
<form method="dialog" class="flex flex-col gap-2 rounded modal-box" wire:submit.prevent='save_new_init_script'>
<h3 class="text-lg font-bold">Add Init Script</h3>
<x-forms.input placeholder="create_test_db.sql" id="new_filename" label="Filename" required/>
<x-forms.textarea placeholder="CREATE DATABASE test;" id="new_content" label="Content" required/>
<x-forms.input placeholder="create_test_db.sql" id="new_filename" label="Filename" required />
<x-forms.textarea placeholder="CREATE DATABASE test;" id="new_content" label="Content" required />
<x-forms.button onclick="newInitScript.close()" type="submit">
Save
</x-forms.button>
@@ -21,41 +21,40 @@
</x-forms.button>
</div>
<div class="flex gap-2">
<x-forms.input label="Name" id="database.name"/>
<x-forms.input label="Description" id="database.description"/>
<x-forms.input label="Name" id="database.name" />
<x-forms.input label="Description" id="database.description" />
<x-forms.input label="Image" id="database.image" required
helper="For all available images, check here:<br><br><a target='_blank' href='https://hub.docker.com/_/postgres'>https://hub.docker.com/_/postgres</a>"/>
helper="For all available images, check here:<br><br><a target='_blank' href='https://hub.docker.com/_/postgres'>https://hub.docker.com/_/postgres</a>" />
</div>
<div class="flex gap-2">
@if ($database->started_at)
<x-forms.input label="Username" id="database.postgres_username" placeholder="If empty: postgres"
readonly helper="You can only modify it before the initial start."/>
readonly helper="You can only modify it before the initial start." />
<x-forms.input label="Password" id="database.postgres_password" type="password" required readonly
helper="You can only modify it before the initial start."/>
helper="You can only modify it before the initial start." />
<x-forms.input label="Database" id="database.postgres_db"
placeholder="If empty, it will be the same as Username."
readonly
helper="You can only modify it before the initial start."/>
placeholder="If empty, it will be the same as Username." readonly
helper="You can only modify it before the initial start." />
@else
<x-forms.input label="Username" id="database.postgres_user" placeholder="If empty: postgres"
helper="You can only modify it before the initial start."/>
helper="You can only modify it before the initial start." />
<x-forms.input label="Password" id="database.postgres_password" type="password" required
helper="You can only modify it before the initial start."/>
helper="You can only modify it before the initial start." />
<x-forms.input label="Database" id="database.postgres_db"
placeholder="If empty, it will be the same as Username."
helper="You can only modify it before the initial start."/>
placeholder="If empty, it will be the same as Username."
helper="You can only modify it before the initial start." />
@endif
</div>
<div class="flex gap-2">
<x-forms.input label="Initial Arguments" id="database.postgres_initdb_args"
placeholder="If empty, use default. See in docker docs."/>
placeholder="If empty, use default. See in docker docs." />
<x-forms.input label="Host Auth Method" id="database.postgres_host_auth_method"
placeholder="If empty, use default. See in docker docs."/>
placeholder="If empty, use default. See in docker docs." />
</div>
<div class="">
<h3 class="py-2">Network</h3>
<x-forms.input placeholder="3000:5432" id="database.ports_mappings" label="Ports Mappings"
helper="A comma separated list of ports you would like to map to the host system.<br><span class='inline-block font-bold text-warning'>Example</span>3000:5432,3002:5433"/>
helper="A comma separated list of ports you would like to map to the host system.<br><span class='inline-block font-bold text-warning'>Example</span>3000:5432,3002:5433" />
</div>
</form>
<div class="pb-16">
@@ -65,7 +64,7 @@
</div>
<div class="flex flex-col gap-2">
@forelse(data_get($database,'init_scripts', []) as $script)
<livewire:project.database.init-script :script="$script" :wire:key="$script['index']"/>
<livewire:project.database.init-script :script="$script" :wire:key="$script['index']" />
@empty
<div>No initialization scripts found.</div>
@endforelse

View File

@@ -1,10 +1,10 @@
<div class="flex flex-wrap gap-2">
@forelse($database->scheduledBackups as $backup)
<a class="box flex flex-col"
href="{{ route('project.database.backups.executions', [...$parameters,'backup_uuid'=> $backup->uuid]) }}">
<div>Frequency: {{$backup->frequency}}</div>
<div>Last backup: {{data_get($backup->latest_log, 'status','No backup yet')}}</div>
<div>Number of backups to keep (locally): {{$backup->number_of_backups_locally}}</div>
<a class="flex flex-col box"
href="{{ route('project.database.backups.executions', [...$parameters, 'backup_uuid' => $backup->uuid]) }}">
<div>Frequency: {{ $backup->frequency }}</div>
<div>Last backup: {{ data_get($backup->latest_log, 'status', 'No backup yet') }}</div>
<div>Number of backups to keep (locally): {{ $backup->number_of_backups_locally }}</div>
</a>
@empty
<div>No scheduled backups configured.</div>