mirror of https://github.com/borgbase/vorta
Merge remote-tracking branch 'upstream/master' into search-file
This commit is contained in:
commit
63e231e24c
|
@ -3,17 +3,21 @@ on:
|
|||
workflow_dispatch:
|
||||
inputs:
|
||||
branch:
|
||||
description: 'Branch to use for building macOS release'
|
||||
description: 'Branch to use for building release'
|
||||
required: true
|
||||
default: 'master'
|
||||
borg_version:
|
||||
description: 'Borg version to package'
|
||||
required: true
|
||||
default: '1.2.1'
|
||||
default: '1.2.8'
|
||||
macos_version:
|
||||
description: 'macOS version for building'
|
||||
required: true
|
||||
default: 'macos-11'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: macos-11
|
||||
runs-on: ${{ github.event.inputs.macos_version }}
|
||||
|
||||
steps:
|
||||
- name: Check out selected branch
|
||||
|
|
|
@ -6,10 +6,13 @@ on:
|
|||
jobs:
|
||||
stale:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
pull-requests: write
|
||||
steps:
|
||||
- uses: actions/stale@v8
|
||||
with:
|
||||
days-before-issue-stale: 60
|
||||
days-before-issue-stale: 90
|
||||
days-before-pr-stale: -1
|
||||
days-before-issue-close: 7
|
||||
# days-before-pr-close: 10
|
|
@ -213,7 +213,7 @@
|
|||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string><html><head/><body><p><a href="https://github.com/borgbase/vorta"><span style=" text-decoration: underline; color:#0984e3;">Click here</span></a> for view Git repo.</p></body></html></string>
|
||||
<string><html><head/><body><p><a href="https://github.com/borgbase/vorta"><span style=" text-decoration: underline; color:#0984e3;">Click here</span></a> to view Git repo.</p></body></html></string>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
|
@ -241,7 +241,7 @@
|
|||
<number>20</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<widget class="QLabel" name="copyrightLabel">
|
||||
<property name="text">
|
||||
<string>
|
||||
Vorta is a cross-platform, open-source client designed to simplify the management of Borg backups.
|
||||
|
|
|
@ -626,6 +626,19 @@
|
|||
</column>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="logLink">
|
||||
<property name="text">
|
||||
<string><html><head/><body><p><a href="file:///"><span style=" text-decoration: underline; color:#0984e3;">View the logs</span></a></p></body></html></string>
|
||||
</property>
|
||||
<property name="indent">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="openExternalLinks">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="page_3">
|
||||
|
|
|
@ -5,7 +5,8 @@
|
|||
"patterns":
|
||||
[
|
||||
"fm:*/node_modules",
|
||||
"fm:*/.npm"
|
||||
"fm:*/.npm",
|
||||
"fm:*/npm-global"
|
||||
],
|
||||
"tags": ["type:dev", "lang:javascript", "os:linux", "os:darwin"],
|
||||
"author": "Divi"
|
||||
|
@ -33,5 +34,66 @@
|
|||
],
|
||||
"tags": ["type:dev", "lang:rust", "os:linux", "os:darwin"],
|
||||
"author": "Divi"
|
||||
},
|
||||
{
|
||||
"name": "Visual Studio Code cache and config files",
|
||||
"slug": "vscode-cache",
|
||||
"patterns": [
|
||||
"fm:*/.config/Code",
|
||||
"fm:*/.vscode/extensions/*"
|
||||
],
|
||||
"tags": ["type:editor", "editor:vscode", "os:linux"],
|
||||
"author": "shivansh02"
|
||||
},
|
||||
{
|
||||
"name": "Android Studio Artefacts",
|
||||
"slug": "android-studio",
|
||||
"patterns": [
|
||||
"fm:*/.android",
|
||||
"fm:*/.gradle",
|
||||
"fm:*/Android/Sdk",
|
||||
"fm:*/.AndroidStudio"
|
||||
],
|
||||
"tags": ["type:dev", "editor:android-studio", "os:linux"],
|
||||
"author": "shivansh02"
|
||||
},
|
||||
{
|
||||
"name": "Jetbrains IDEs cache, config, path and logs",
|
||||
"slug": "jetbrains",
|
||||
"patterns": [
|
||||
"fm:*/.config/JetBrains",
|
||||
"fm:*/.cache/JetBrains",
|
||||
"fm:*/.local/share/JetBrains"
|
||||
],
|
||||
"tags": ["type:dev", "editor:jetbrains", "os:linux"],
|
||||
"author": "SAMAD101"
|
||||
},
|
||||
{
|
||||
"name": "AWS artefacts",
|
||||
"slug": "aws-artefacts",
|
||||
"patterns": [
|
||||
"fm:*/.aws"
|
||||
],
|
||||
"tags": ["type:dev", "cloud:aws", "os:linux", "os:darwin"],
|
||||
"author": "SAMAD101"
|
||||
},
|
||||
{
|
||||
"name": "Spotify cache and config files",
|
||||
"slug": "spotify",
|
||||
"patterns": [
|
||||
"fm:*/.cache/spotify",
|
||||
"fm:*/.config/spotify"
|
||||
],
|
||||
"tags": ["type:media", "media:spotify", "os:linux"],
|
||||
"author": "SAMAD101"
|
||||
},
|
||||
{
|
||||
"name": "Docker artefacts",
|
||||
"slug": "docker-artefacts",
|
||||
"patterns": [
|
||||
"fm:*/.docker"
|
||||
],
|
||||
"tags": ["type:dev", "cloud:docker", "os:linux", "os:darwin"],
|
||||
"author": "SAMAD101"
|
||||
}
|
||||
]
|
||||
|
|
|
@ -459,6 +459,7 @@ class VortaScheduler(QtCore.QObject):
|
|||
Pruning and checking after successful backup.
|
||||
"""
|
||||
profile = BackupProfileModel.get(id=profile_id)
|
||||
notifier = VortaNotifications.pick()
|
||||
logger.info('Doing post-backup jobs for %s', profile.name)
|
||||
if profile.prune_on:
|
||||
msg = BorgPruneJob.prepare(profile)
|
||||
|
@ -489,6 +490,11 @@ class VortaScheduler(QtCore.QObject):
|
|||
self.app.jobs_manager.add_job(job)
|
||||
|
||||
logger.info('Finished background task for profile %s', profile.name)
|
||||
notifier.deliver(
|
||||
self.tr('Vorta Backup'),
|
||||
self.tr('Post Backup Tasks successful for %s' % profile.name),
|
||||
level='info',
|
||||
)
|
||||
|
||||
def remove_job(self, profile_id):
|
||||
if profile_id in self.timers:
|
||||
|
|
|
@ -59,7 +59,7 @@ class TrayMenu(QSystemTrayIcon):
|
|||
cancel_action.triggered.connect(self.app.backup_cancelled_event.emit)
|
||||
else:
|
||||
status.setText(self.tr('Next Task: %s') % next_task_time)
|
||||
profiles = BackupProfileModel.select()
|
||||
profiles = BackupProfileModel.select().order_by(BackupProfileModel.name)
|
||||
if profiles.count() > 1:
|
||||
profile_menu = menu.addMenu(self.tr('Backup Now'))
|
||||
for profile in profiles:
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import logging
|
||||
from datetime import datetime
|
||||
|
||||
from PyQt6 import QtCore, uic
|
||||
|
||||
|
@ -28,6 +29,9 @@ class AboutTab(AboutTabBase, AboutTabUI, BackupProfileMixin):
|
|||
)
|
||||
self.gpl_logo.setPixmap(get_colored_icon('gpl_logo', scaled_height=40, return_qpixmap=True))
|
||||
self.python_logo.setPixmap(get_colored_icon('python_logo', scaled_height=40, return_qpixmap=True))
|
||||
copyright_text = self.copyrightLabel.text()
|
||||
copyright_text = copyright_text.replace('2020', str(datetime.now().year))
|
||||
self.copyrightLabel.setText(copyright_text)
|
||||
|
||||
def set_borg_details(self, version, path):
|
||||
self.borgVersion.setText(version)
|
||||
|
|
|
@ -108,10 +108,13 @@ class DiffResultDialog(BaseFileDialog, DiffResultBase, DiffResultUI):
|
|||
"""
|
||||
if selection == 0:
|
||||
mode = FileTreeModel.DisplayMode.TREE
|
||||
self.bCollapseAll.setEnabled(True)
|
||||
elif selection == 1:
|
||||
mode = FileTreeModel.DisplayMode.SIMPLIFIED_TREE
|
||||
self.bCollapseAll.setEnabled(True)
|
||||
elif selection == 2:
|
||||
mode = FileTreeModel.DisplayMode.FLAT
|
||||
self.bCollapseAll.setEnabled(False)
|
||||
else:
|
||||
raise Exception("Unknown item in comboBoxDisplayMode with index {}".format(selection))
|
||||
|
||||
|
|
|
@ -127,8 +127,10 @@ class ExtractDialog(BaseFileDialog, ExtractDialogBase, ExtractDialogUI):
|
|||
"""
|
||||
if selection == 0:
|
||||
mode = FileTreeModel.DisplayMode.TREE
|
||||
self.bCollapseAll.setEnabled(True)
|
||||
elif selection == 1:
|
||||
mode = FileTreeModel.DisplayMode.SIMPLIFIED_TREE
|
||||
self.bCollapseAll.setEnabled(True)
|
||||
else:
|
||||
raise Exception("Unknown item in comboBoxDisplayMode with index {}".format(selection))
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ from PyQt6.QtWidgets import (
|
|||
QTableWidgetItem,
|
||||
)
|
||||
|
||||
from vorta import application
|
||||
from vorta import application, config
|
||||
from vorta.i18n import get_locale
|
||||
from vorta.scheduler import ScheduleStatusType
|
||||
from vorta.store.models import BackupProfileMixin, EventLogModel, WifiSettingModel
|
||||
|
@ -43,6 +43,10 @@ class ScheduleTab(ScheduleBase, ScheduleUI, BackupProfileMixin):
|
|||
# Set up log table
|
||||
self.logTableWidget.setAlternatingRowColors(True)
|
||||
header = self.logTableWidget.horizontalHeader()
|
||||
self.logLink.setText(
|
||||
f'<a href="file://{config.LOG_DIR}"><span style="text-decoration:'
|
||||
'underline; color:#0984e3;">Click here</span></a> for complete logs.'
|
||||
)
|
||||
header.setVisible(True)
|
||||
[header.setSectionResizeMode(i, QHeaderView.ResizeMode.ResizeToContents) for i in range(5)]
|
||||
header.setSectionResizeMode(3, QHeaderView.ResizeMode.Stretch)
|
||||
|
|
|
@ -6,14 +6,17 @@ import vorta.utils
|
|||
import vorta.views.archive_tab
|
||||
from PyQt6.QtCore import QDateTime, QItemSelectionModel, QModelIndex, Qt
|
||||
from PyQt6.QtWidgets import QMenu
|
||||
from vorta.store.models import ArchiveModel
|
||||
from vorta.views.diff_result import (
|
||||
ChangeType,
|
||||
DiffData,
|
||||
DiffResultDialog,
|
||||
DiffTree,
|
||||
FileType,
|
||||
parse_diff_json,
|
||||
parse_diff_lines,
|
||||
)
|
||||
from vorta.views.partials.treemodel import FileTreeModel
|
||||
|
||||
|
||||
def setup_diff_result_window(qtbot, mocker, tab, borg_json_output, json_mock_file="diff_archives"):
|
||||
|
@ -459,6 +462,22 @@ def test_archive_diff_json_parser(line, expected):
|
|||
assert item.data == DiffData(*expected[1:])
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"selection, expected_mode, expected_bCollapseAllEnabled",
|
||||
[
|
||||
(0, FileTreeModel.DisplayMode.TREE, True),
|
||||
(1, FileTreeModel.DisplayMode.SIMPLIFIED_TREE, True),
|
||||
(2, FileTreeModel.DisplayMode.FLAT, False),
|
||||
],
|
||||
)
|
||||
def test_change_display_mode(selection: int, expected_mode, expected_bCollapseAllEnabled):
|
||||
dialog = DiffResultDialog(ArchiveModel(), ArchiveModel(), DiffTree())
|
||||
dialog.change_display_mode(selection)
|
||||
|
||||
assert dialog.model.mode == expected_mode
|
||||
assert dialog.bCollapseAll.isEnabled() == expected_bCollapseAllEnabled
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
'search_string,expected_search_results',
|
||||
[
|
||||
|
|
|
@ -1,8 +1,15 @@
|
|||
import pytest
|
||||
import vorta.borg
|
||||
from PyQt6.QtCore import QModelIndex, Qt
|
||||
from vorta.views.extract_dialog import ExtractTree, FileData, FileType, parse_json_lines
|
||||
from vorta.views.partials.treemodel import FileSystemItem
|
||||
from vorta.store.models import ArchiveModel
|
||||
from vorta.views.extract_dialog import (
|
||||
ExtractDialog,
|
||||
ExtractTree,
|
||||
FileData,
|
||||
FileType,
|
||||
parse_json_lines,
|
||||
)
|
||||
from vorta.views.partials.treemodel import FileSystemItem, FileTreeModel
|
||||
|
||||
|
||||
def prepare_borg(mocker, borg_json_output):
|
||||
|
@ -181,6 +188,18 @@ def test_selection():
|
|||
assert a.data.checkstate == Qt.CheckState(1)
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
"selection, expected_mode, expected_bCollapseAllEnabled",
|
||||
[(0, FileTreeModel.DisplayMode.TREE, True), (1, FileTreeModel.DisplayMode.SIMPLIFIED_TREE, True)],
|
||||
)
|
||||
def test_change_display_mode(selection: int, expected_mode, expected_bCollapseAllEnabled):
|
||||
dialog = ExtractDialog(ArchiveModel(), ExtractTree())
|
||||
dialog.change_display_mode(selection)
|
||||
|
||||
assert dialog.model.mode == expected_mode
|
||||
assert dialog.bCollapseAll.isEnabled() == expected_bCollapseAllEnabled
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
'search_string,expected_search_results',
|
||||
[
|
||||
|
|
Loading…
Reference in New Issue