-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: refresh multiple archives #1723
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The PR works as expected.
I am a bit unsure about the implementation, a bit more discussion is needed here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Until now the buttons where visually grouped into single and multi archive options. This PR dismisses this grouping logic. However I am starting to think that grouping the buttons like that might not be so useful afterall. What do you think?
src/vorta/views/archive_tab.py
Outdated
job.updated.connect(self._set_status) | ||
job.result.connect(self.info_result) | ||
self._toggle_all_buttons(False) | ||
self.app.jobs_manager.add_job(job) | ||
|
||
def info_result(self, result): | ||
self._toggle_all_buttons(True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will enable the buttons again although the other info jobs are still running.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So should I connect just the last job's result to this function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, theoretically you don't know which job finishes first. Did you try to run the current code? I would think that only one borg jobs succeeds because of the repo lock.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I tried running it (I attached a GIF above).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The enabled/disabled state of buttons seems to go on and off. Or is that just the GIF? And didn't we want to rename "Refresh" to something else? I recall a discussion here or elsewhere. |
Ah yes, done in the next commit.
Yes, I am confused how to disable them until all jobs are completed though (so they don't get enabled after every single job), looking around. |
Depends on how they are toggled right now. If it's from the BorgJob directly, there isn't much to be done without larger changes. |
Yeah, it's connected to the BorgJob's result :/ |
What can I do now? |
OK for me. An isolated change, which doesn't add much new code. Comments should be resolved, if any action is needed on them. |
I am only stuck with your question here: But you said
other issues are solved, so probably ready to merge. |
Then we will need to open a follow-up issue for that problem. Or decide to fix the flashing problem first. |
Not sure if I'm missing something but they seem to toggled in So if you move Edit: Didn't factor in re-enabling button after last job. |
This seems like a reasonable approach, I'll try this and update the PR, thanks! |
…iivi/vorta into feat/refresh-multiple-archives
…iivi/vorta into feat/refresh-multiple-archives
Updated so that the start backup button gets enabled again after refreshing all archives. |
Works as expected locally. Merging. Thanks for your patience on polishing this. 👏 |
Description
First task for one of my GSoC Projects, "Enhancing the Archive Table actions". I listed these tasks out in the proposal, in total they should take me around 50 hours:
This will allow Vorta users to select multiple archives and refresh them at once, hence improving UX.
Motivation and Context
Saves the user's time.
How Has This Been Tested?
I tested this manually:
Types of changes
Checklist:
I provide my contribution under the terms of the license of this repository and I affirm the Developer Certificate of Origin.