mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-14 02:15:51 +00:00
feat(storage): group backups by database and filter by s3 status
Group backup schedules by their parent database (type + ID) for better organization in the UI. Filter to only display backups with save_s3 enabled. Restructure the template to show database name as a header with nested backups underneath, allowing clearer visualization of which backups belong to each database. Add key binding to livewire component to ensure proper re-rendering when resources change.
This commit is contained in:
1 parent
ca3ae289eb
commit
86c8ec9c20
3 files changed
+76
-55
No files matched your search
@@ -13,11 +13,13 @@ class Resources extends Component
|
||||
public function render()
|
||||
{
|
||||
$backups = ScheduledDatabaseBackup::where('s3_storage_id', $this->storage->id)
|
||||
->where('save_s3', true)
|
||||
->with('database')
|
||||
->get();
|
||||
->get()
|
||||
->groupBy(fn ($backup) => $backup->database_type.'-'.$backup->database_id);
|
||||
|
||||
return view('livewire.storage.resources', [
|
||||
'backups' => $backups,
|
||||
'groupedBackups' => $backups,
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user