feat: add import backup UI for ServiceDatabase

Add Import Backup section to ServiceDatabase view for supported
database types (PostgreSQL, MySQL, MariaDB, MongoDB).

This enables users to import backups directly from the ServiceDatabase
configuration page, utilizing the existing Import Livewire component.
This commit is contained in:
Murat Aslan 2025-12-12 11:47:16 +03:00
parent 8289dcc3ca
commit 6068387542

View file

@ -49,4 +49,19 @@
instantSave="instantSaveLogDrain" id="isLogDrainEnabled" label="Drain Logs" />
</div>
</form>
@php
$dbType = $database->databaseType();
$supportedTypes = ['mysql', 'mariadb', 'postgres', 'mongo'];
$isSupported = collect($supportedTypes)->contains(fn($type) => str_contains($dbType, $type));
@endphp
@if ($isSupported)
@can('update', $database)
<div class="pt-6">
<h3 class="pb-4">Import Backup</h3>
<livewire:project.database.import :resource="$database" />
</div>
@endcan
@endif
</div>