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:
parent
8289dcc3ca
commit
6068387542
1 changed files with 15 additions and 0 deletions
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Reference in a new issue