mirror of
https://github.com/eduardolat/pgbackweb.git
synced 2026-04-25 05:35:57 +03:00
[PR #26] [MERGED] Feat/display backup size #140
Labels
No labels
bug
confirmed next step
duplicate
enhancement
help wanted
in progress
in progress
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/pgbackweb#140
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/eduardolat/pgbackweb/pull/26
Author: @julien-wff
Created: 8/11/2024
Status: ✅ Merged
Merged: 8/12/2024
Merged by: @eduardolat
Base:
main← Head:Feat/display-backup-size📝 Commits (5)
03604dfAdd file_size field to execution table8e149cfSave file_size4881f04Specify the unit of size94759c6Add component to display file size3df6d96Add file size display on execution list and popup📊 Changes
11 files changed (+132 additions, -13 deletions)
View changed files
➕
internal/database/migrations/20240811205655_add_file_size_to_executions_table.sql(+9 -0)📝
internal/integration/storage/local.go(+12 -5)📝
internal/integration/storage/s3.go(+16 -5)📝
internal/service/executions/run_execution.go(+4 -2)📝
internal/service/executions/update_execution.sql(+2 -1)➕
internal/util/strutil/format_file_size.go(+22 -0)➕
internal/util/strutil/format_file_size_test.go(+29 -0)➕
internal/view/web/component/pretty_file_size.go(+24 -0)📝
internal/view/web/dashboard/executions/index.go(+1 -0)📝
internal/view/web/dashboard/executions/list_executions.go(+6 -0)📝
internal/view/web/dashboard/executions/show_execution.go(+7 -0)📄 Description
Hi there!
Thank you very much for making this piece of software. A GUI database backup project has been on my todo list for a long time, but I'll use yours since it's pretty good!
When using pgbackweb, I wished the size of the backups would be displayed, so I made it. Hope you think it fits the project!
Since I don't think we can't get the size of an
io.Readerwithout consuming the stream, I had to pull the file size from the destinations. I just returned a simpleint64, but I wonder if a struct with a single field would not be better for code sustainability.Backups prior to this PR simply won't have a display size
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.