vorta icon indicating copy to clipboard operation
vorta copied to clipboard

FRQ: Show progress per profile instead of all profiles at once

Open jonathanjsimon opened this issue 2 years ago • 6 comments

The problem

I have several profiles on my system, each backing up to different locations with different filters. The backups frequently run at the same time since they have similar schedules. When this happens, the set of running backups push feedback into the UI at the same time and the UI flips between all the feedback from all the profiles at once. This is both confusing, hard to read, and can result in the loss of error messages and other important feedback.

Requested Solution

Only feedback from the selected profile should show in the status area at the bottom. Switching profiles should show the last status from the newly selected profile and then continue to update with status from that new profile. To help users identify that there is feedback from a profile other than the one they have selected, some icon (exclamation point? warning triangle?) could appear near the profile selection drop down and those profiles with feedback (or some other thing that need user attention) could be marked in a similar way.

Separately and additionally, per profile feedback could also be listed in the system tray menu on a per profile basis.

Alternatives

At the very least, don't show feedback from other profiles.

Additional context

I don't think there is any additional context to add.

jonathanjsimon avatar Sep 20 '23 14:09 jonathanjsimon

Related: https://github.com/borgbase/vorta/discussions/1764#discussioncomment-6713818

real-yfprojects avatar Nov 23 '23 21:11 real-yfprojects

As per current changes, progress only for the selected profile is shown. But I had some things I wanted to discuss for this PR:

  • The functions responsible for displaying the logs and progress are:
    def set_progress(self, text=''):
        profile = extract_profile_name(text)
        if profile == self.current_profile.name:
            self.progressText.setText(text)
            self.progressText.repaint()

    def set_log(self, text=''):
        profile = extract_profile_name(text)
        if profile == self.current_profile.name:
            self.logText.setText(text)
            self.logText.repaint()

So for this solution I have created a separate util function that extracts the profile name from the text being passed from the signal. The alternate could be to take the profile name as a parameter and then comparing it with the current profile, but that would require a lot of changes when emitting this signal, in multiple files

  • Also, author wrote

Switching profiles should show the last status from the newly selected profile and then continue to update with status from that new profile.

I dont know if that can be done, since these progress texts just signals being emitted and then painted as QLabels. So, if anything can be added to that as well

But after current changes, only changes for and only the currently selected profile are shown Thanks

TheLazron avatar Mar 08 '24 11:03 TheLazron

@TheLazron Speaking as an outsider looking in, couldn't the profile have some field in its various data structures to store the last state? Similar projects I've worked on have had some sort of feedback manager that sits between the actual data structures and the UI such that each profile is internally updating itself and alerting the feedback manager to the data change while the feedback manager decides which ones to push into the UI based on UI selection. When the profile selection changes in the UI, the UI loads all the relevant user data from the feedback manager rather than directly from the underlying profile.

jonathanjsimon avatar Mar 11 '24 19:03 jonathanjsimon

Oh that can be done, a single field for the profile model that stores the last state for that profile. That way when current profile is switched then its last status can be shown. This would also help with

To help users identify that there is feedback from a profile other than the one they have selected, some icon (exclamation point? warning triangle?) could appear near the profile selection drop down

I'll work on the slot functions to handle this

TheLazron avatar Mar 12 '24 15:03 TheLazron

@jonathanjsimon the proposed solution worked well. I added last_status field to the BackupProfileModel, which stores the last progress status for each profile. On switching profiles, the this last_status is shown and then further progress is continued for that profile

Switching profiles should show the last status from the newly selected profile and then continue to update with status from that new profile.

TheLazron avatar Mar 13 '24 17:03 TheLazron

@TheLazron Nice, I look forward to testing it.

jonathanjsimon avatar Mar 13 '24 17:03 jonathanjsimon