mirror of
https://github.com/tiennm99/coolify.git
synced 2026-04-17 21:20:29 +00:00
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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user