Skip to content
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

Feature/backup #585

Merged
merged 483 commits into from
Mar 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
483 commits
Select commit Hold shift + click to select a range
db9ab26
Web: ManualBackup: Added common components for the storage module, re…
TatianaLopaeva Oct 2, 2021
4d181ec
Web: Refactoring, deleted useless code.
TatianaLopaeva Oct 2, 2021
0187977
Merge branch 'develop' into feature/backup
TatianaLopaeva Oct 4, 2021
4d67a29
Web: Settings: Added translation.
TatianaLopaeva Oct 5, 2021
c82b931
Web: Changed constants.
TatianaLopaeva Oct 5, 2021
37094d5
Web: AutoBackup: Added constants.
TatianaLopaeva Oct 5, 2021
80fb5a7
Web: Fixed components styles.
TatianaLopaeva Oct 5, 2021
0b97525
Web: Fixed translation.
TatianaLopaeva Oct 5, 2021
c12d4b2
Web: Fixed schedule styles.
TatianaLopaeva Oct 5, 2021
3123d79
Web: Fixed schedule styles.
TatianaLopaeva Oct 5, 2021
539a0fe
Web: Restore: cChanging the backup list component to fit the layout.
TatianaLopaeva Oct 5, 2021
12ab207
Web: Files: Deleted useless code.
TatianaLopaeva Oct 5, 2021
d83a400
Web: Restore: Added changing the height of the content of the modal d…
TatianaLopaeva Oct 6, 2021
9651538
Web: Files: SelectFolderInput/SelectFileInput: Extended the component…
TatianaLopaeva Oct 11, 2021
0badca9
Added new translation.
TatianaLopaeva Oct 11, 2021
9b2596f
Web: Changed logic according to layouts.
TatianaLopaeva Oct 11, 2021
284a26b
Web: AutoBackup: Disabled button when process copying.
TatianaLopaeva Oct 11, 2021
07cb12a
Web: AutoBackup: Added ThirdPartyStorage module, refactoring.
TatianaLopaeva Oct 14, 2021
e6fade3
Web: ManualBackup: Deleted useless prop.
TatianaLopaeva Oct 14, 2021
7ad6891
WEb: AutoBackup: Renamed files.
TatianaLopaeva Oct 14, 2021
f74fc73
Web: AutoBackup: Transferring files to a shared folder
TatianaLopaeva Oct 14, 2021
d85e464
Web: AutoBackup: Renamed files.
TatianaLopaeva Oct 14, 2021
2275ffd
Web: AutoBackup: Refactoring.
TatianaLopaeva Oct 14, 2021
0748119
Web: AutoBackup: Renamed file, fixed styles.
TatianaLopaeva Oct 14, 2021
cc73e85
Web: AutoBackup: fixed schedule styles.
TatianaLopaeva Oct 14, 2021
17628fd
Web: Settings: AutoBackup: Added correct allocation of the maximum nu…
TatianaLopaeva Oct 16, 2021
c5ebdb3
Web: settings: Renamed manual backup.
TatianaLopaeva Oct 16, 2021
be77a82
Web: Settings: ManualBackup: Canceled switching to a new tab when dow…
TatianaLopaeva Oct 16, 2021
f98e866
Web: Settings: Renamed files.
TatianaLopaeva Oct 16, 2021
1803681
Web: Backup: Renamed files.
TatianaLopaeva Oct 16, 2021
8ba2f0c
Merge branch 'develop' into feature/backup
TatianaLopaeva Oct 25, 2021
ffe9049
Web: Files: Fixed styles.
TatianaLopaeva Oct 25, 2021
86eb453
Web :Files: fixed translation.
TatianaLopaeva Oct 25, 2021
29ee1ea
Web: PreparationPortal: Added error message.
TatianaLopaeva Oct 27, 2021
e1a7d5f
Web: Refactoring, added error handlers.
TatianaLopaeva Oct 27, 2021
f6e362d
Web: Files: RestoreBackup: Disabled restore button when is restoring …
TatianaLopaeva Oct 27, 2021
184975e
Web: RestoreBackup: Fixed redirect to preparation page when restore f…
TatianaLopaeva Oct 27, 2021
25d5e0f
Web: AutoBackup: Fixed error handler.
TatianaLopaeva Oct 27, 2021
c488fb0
Web: Common: Added enableRestore api method.
TatianaLopaeva Oct 28, 2021
33245ac
Web: Bakup: Optimization, added a flag about the ability to show the …
TatianaLopaeva Oct 28, 2021
07c5dcf
Web: Refactoring.
TatianaLopaeva Oct 28, 2021
6ee6f21
Web: Components: Added max width of section header.
TatianaLopaeva Oct 28, 2021
d114f5c
Web: RestoreBackup: Renamed files.
TatianaLopaeva Oct 28, 2021
3d8a4a1
Web: Refactoring.
TatianaLopaeva Oct 28, 2021
ffa27f3
Web: Fixed import
TatianaLopaeva Oct 28, 2021
424c536
Web: RestoreBackup: Fixed styles.
TatianaLopaeva Oct 28, 2021
937f5ef
Web: Fixed styles for radio button.
TatianaLopaeva Oct 29, 2021
33fa8b9
Web: Fixed day of month.
TatianaLopaeva Oct 29, 2021
300791d
Web: Deleted useless code.
TatianaLopaeva Oct 29, 2021
3eaff28
Web: Fixed month and weekday options.
TatianaLopaeva Oct 29, 2021
aa165a7
Web: Added common styles.
TatianaLopaeva Oct 29, 2021
59eee87
Web: Backup: Deleted useless code.
TatianaLopaeva Oct 29, 2021
94d0cd1
Web: Refactoring.
TatianaLopaeva Oct 29, 2021
6dadf80
Web: Backup: Fixed translation.
TatianaLopaeva Oct 29, 2021
28cb2e5
Web: Deleted disabling cancel button.
TatianaLopaeva Nov 1, 2021
cafbe52
Web: Backup: Optimization.
TatianaLopaeva Nov 1, 2021
7b083aa
Web: Refactoring, fixed non-update stateю
TatianaLopaeva Nov 1, 2021
d1fe095
Web: AutoBackup: Added disable use of buttons at the time of saving, …
TatianaLopaeva Nov 1, 2021
2cba76f
backup: add "backupFileUpload.ashx"
SuhorukovAnton Nov 19, 2021
32770e3
backup: set tenant before download backup file
SuhorukovAnton Nov 19, 2021
307fc3e
backup: update nginx config
SuhorukovAnton Nov 19, 2021
92ee0db
Web: Files: Refactoring manual backup.
TatianaLopaeva Feb 3, 2022
bd8d980
Web: Files: Fixed manual backup.
TatianaLopaeva Feb 3, 2022
077e812
Web: files: AutoBackup: Refactoring, reset period settings moved to a…
TatianaLopaeva Feb 4, 2022
99ab376
Web: Files: Fixed incorrect saving of the day of the week, refactoring.
TatianaLopaeva Feb 4, 2022
1fdb2b5
WEb: files: AutoBackup: Fix initial hour.
TatianaLopaeva Feb 4, 2022
914c4d1
Web: files: AutoBackup: Moved reset module settings to separate funct…
TatianaLopaeva Feb 4, 2022
6ca6233
Web: Files: AutoBackup: Deleted unnecessary request.
TatianaLopaeva Feb 4, 2022
2f0677a
Web: files: AutoBackup: Refactoring.
TatianaLopaeva Feb 6, 2022
f129494
Web: files: AutoBackup: fixed radio button.
TatianaLopaeva Feb 6, 2022
988248f
Web: Files: AutoBackup: Refactoring modules.
TatianaLopaeva Feb 6, 2022
80dafc0
Web: files: RestoreBackup: Refactoring.
TatianaLopaeva Feb 6, 2022
6b89f94
Web: files: ManualBackup: Refactoring.
TatianaLopaeva Feb 6, 2022
40d5607
Merge branch 'develop' into feature/backup
TatianaLopaeva Feb 7, 2022
a3ffead
Web: Files: Added upload method.
TatianaLopaeva Feb 7, 2022
b47e1f0
Web: files: Fixed upload method.
TatianaLopaeva Feb 7, 2022
fd75288
backup: bugfix
SuhorukovAnton Feb 7, 2022
0f714eb
WEb: Files: RestoreBackup: Added logic for third party storage.
TatianaLopaeva Feb 7, 2022
87b0931
Web: Files: RestoreBackup: Refactoring.
TatianaLopaeva Feb 7, 2022
d2dfac2
Web: RestoreBackup: Changed styles.
TatianaLopaeva Feb 8, 2022
aac8360
Web: Files: SelectFolderDialog: Added missing prop.
TatianaLopaeva Feb 8, 2022
7d4069a
WEb: files: ManualBackup: Changed styles.
TatianaLopaeva Feb 8, 2022
0c73b7f
Web: Files: AutoBackup: Changed styles.
TatianaLopaeva Feb 8, 2022
0dbf561
Web: Files: AutoBackup: changed schedule styles.
TatianaLopaeva Feb 8, 2022
783d5bd
Web: files: restoreBackup: Optimization.
TatianaLopaeva Feb 8, 2022
d429bcc
Merge branch 'develop' into feature/backup
SuhorukovAnton Feb 9, 2022
f354775
Merge branch 'develop' into feature/backup
SuhorukovAnton Feb 9, 2022
a7337f6
Web: Files: ManualBackup: Optimization, refactoring.
TatianaLopaeva Feb 9, 2022
e8c2ce8
Merge branch 'feature/backup' of github.com:ONLYOFFICE/AppServer into…
TatianaLopaeva Feb 9, 2022
f8a748a
Web: files: Code simplification.
TatianaLopaeva Feb 9, 2022
6510927
backup: add api method enableAutoBackup
SuhorukovAnton Feb 9, 2022
ddd2e71
Web: Files: Backup: Added method to check if automatic backup is avai…
TatianaLopaeva Feb 9, 2022
0069c6e
Web: Files: RestoreBackup: Fixed timer.
TatianaLopaeva Feb 9, 2022
6f9d9e4
backup: bugfix
SuhorukovAnton Feb 9, 2022
038178b
Merge branch 'feature/backup' of github.com:ONLYOFFICE/AppServer into…
TatianaLopaeva Feb 10, 2022
1acf512
backup: add in startup backupFileUpload.ashx
SuhorukovAnton Feb 10, 2022
920d999
backup: add "completed" in end restore and transfer
SuhorukovAnton Feb 10, 2022
0d083c9
Merge branch 'feature/backup' of https://github.com/ONLYOFFICE/AppSer…
SuhorukovAnton Feb 10, 2022
73f82b1
backup: bugfix: link = null
SuhorukovAnton Feb 10, 2022
6ee6169
Web: files: added start restore.
TatianaLopaeva Feb 10, 2022
214df42
Merge branch 'feature/backup' of github.com:ONLYOFFICE/AppServer into…
TatianaLopaeva Feb 10, 2022
e111627
backup: fix GetTasks
SuhorukovAnton Feb 10, 2022
099d704
Web: files: Fixed enabling of auto backup/restore.
TatianaLopaeva Feb 10, 2022
4fbf317
Merge branch 'feature/backup' of github.com:ONLYOFFICE/AppServer into…
TatianaLopaeva Feb 10, 2022
70b3231
Merge branch 'develop' into feature/backup
TatianaLopaeva Feb 14, 2022
206ed1a
Backup: Added request to exception.
TatianaLopaeva Feb 14, 2022
6ba390e
Web: Files: AutoBackup: optimization, refactoring.
TatianaLopaeva Feb 14, 2022
4a6ad13
Web: files: Changed styles for preparation portal.
TatianaLopaeva Feb 14, 2022
853d228
Web: Files: RestoreBackup: Hidden elements of header.
TatianaLopaeva Feb 15, 2022
879a027
Web: Files: AutoBackup: Optimization modules.
TatianaLopaeva Feb 15, 2022
b5ebbef
Web: files: AutoBackup: Delete useless code.
TatianaLopaeva Feb 16, 2022
f978cb6
Web: files: AutoBackup: Optimization saving process.
TatianaLopaeva Feb 16, 2022
4b06ae5
Web: Files: Common: Added redirect to preparation portal.
TatianaLopaeva Feb 18, 2022
41b5a1d
Web: Files: Hidden elements of NavMenu, disabled click on logo.
TatianaLopaeva Feb 18, 2022
d09776d
Web: Files: The logic of the dialog with the list of backups has been…
TatianaLopaeva Feb 21, 2022
c29d35c
Web: Files: Added possibility to delete backup elem without selected …
TatianaLopaeva Feb 22, 2022
85d6f35
Web: Files: Changed styles for empty backup list.
TatianaLopaeva Feb 22, 2022
877783c
Web: Common: Added list loader.
TatianaLopaeva Feb 22, 2022
b5bcfa0
Web: common: Added list loader to the Loaders file.
TatianaLopaeva Feb 22, 2022
2725414
Web: Files: Restore: Added new loader.
TatianaLopaeva Feb 22, 2022
bbb01a9
WEb: Files: Restore: Fixed page fall.
TatianaLopaeva Feb 24, 2022
dd183de
Web: Moved files to separate folder.
TatianaLopaeva Feb 24, 2022
ac595bb
Web: Auto: Rename folder.
TatianaLopaeva Feb 24, 2022
c0a1f20
Web: ManualBackup: Rename folder.
TatianaLopaeva Feb 24, 2022
32d73f9
Web: Restore: Rename folder.
TatianaLopaeva Feb 24, 2022
56caa47
Web: Backup: Added desktop view.
TatianaLopaeva Feb 25, 2022
a5a72e3
Web: Backup: Changed styles.
TatianaLopaeva Feb 25, 2022
47faaf1
Web: Backup: Added description of modules.
TatianaLopaeva Feb 25, 2022
d9a8fd5
Web: Backup: Added max length to the text.
TatianaLopaeva Feb 25, 2022
f07aa0a
Merge branch 'develop' into feature/backup
AlexeySafronov Feb 25, 2022
0302dfd
Web: ManualBackup: Fixed temporary link for desktop version.
TatianaLopaeva Feb 25, 2022
2bb8418
Web: Backup: Added help information for modules.
TatianaLopaeva Feb 25, 2022
93e5cf8
Web: RestoreBackup: Added error handler for local file.
TatianaLopaeva Feb 25, 2022
eae8b7c
Web: Socket: Added "restore-backup" event listeners
AlexeySafronov Feb 25, 2022
6c8165e
Merge branch 'feature/backup' of https://github.com/ONLYOFFICE/AppSer…
AlexeySafronov Feb 25, 2022
9120fc2
Web: Renamed translations keys, deleted useless.
TatianaLopaeva Feb 28, 2022
f576f80
Merge branch 'feature/backup' of github.com:ONLYOFFICE/AppServer into…
TatianaLopaeva Feb 28, 2022
c2518d3
Web: AutoBackup: Fixed styles of schedule component for desktop.
TatianaLopaeva Feb 28, 2022
e4deaa1
Web: Settings: Added backup store.
TatianaLopaeva Feb 28, 2022
de5af49
WEb: AutoBackup: Deleted isDesktop prop;
TatianaLopaeva Feb 28, 2022
fd51115
Web: ManualBackup: Fixed progress for desktop view.
TatianaLopaeva Mar 1, 2022
4b59e11
Web: PreparationPortal: Added progress initiation when restore portal.
TatianaLopaeva Mar 2, 2022
f57cff1
Merge branch 'develop' into feature/backup
TatianaLopaeva Mar 2, 2022
d565fff
Web: Added preparation portal dialog.
TatianaLopaeva Mar 2, 2022
53eef11
WEb: PreparationPortal: Deleted useless code.
TatianaLopaeva Mar 2, 2022
6fe7eb3
Web: Deleted close button from dialog.
TatianaLopaeva Mar 2, 2022
85e8cee
Web: Added new translations for help information.
TatianaLopaeva Mar 2, 2022
a27734e
Web: Added new translations.
TatianaLopaeva Mar 3, 2022
10e8ab7
Web: Backup: Moved auto backup information to the store.
TatianaLopaeva Mar 4, 2022
d6fe627
Web: AutoBackup: Refactoring.
TatianaLopaeva Mar 4, 2022
1fce535
WEb: Backup: Added constants.
TatianaLopaeva Mar 4, 2022
ef2d2e5
Web: Backup: Moved backup progress to the store, refactoring.
TatianaLopaeva Mar 5, 2022
b432201
Web: BackupStore: Fixed period label.
TatianaLopaeva Mar 5, 2022
17743d3
Web: Files: Added translation for fr, de, it, zh-CH languages transla…
TatianaLopaeva Mar 9, 2022
7130cd8
Web: Fixed translation for max copies.
TatianaLopaeva Mar 9, 2022
c0b0a26
Web: Backup: Moved common third-party list to the story.
TatianaLopaeva Mar 9, 2022
aaf50bd
Web: BackupStore: Fixed backup progress.
TatianaLopaeva Mar 9, 2022
ce4f4cb
Web: AutoBackup: Renaming.
TatianaLopaeva Mar 9, 2022
2aa0a97
Web: AutoBackup/ManualBackup: Deleted useless code.
TatianaLopaeva Mar 9, 2022
e38ac63
Web: RestoreProgress: Fixed storage.
TatianaLopaeva Mar 9, 2022
eafb967
Web: RestoreBackup: Added socketHelper to the backup list dialog.
TatianaLopaeva Mar 9, 2022
37f42e5
Web: RestoreBackup: Deleted useless code.
TatianaLopaeva Mar 9, 2022
ae267b9
WEb: Separated translations.
TatianaLopaeva Mar 10, 2022
c95d3e9
Web: Arrangement of translations alphabetically.
TatianaLopaeva Mar 10, 2022
a43c41b
Web: Added translation for Data Management on en, ru.
TatianaLopaeva Mar 10, 2022
64dfd61
Merge branch 'develop' into feature/backup
TatianaLopaeva Mar 10, 2022
7bca87c
Web: Moved translations to the Common (ru).
TatianaLopaeva Mar 10, 2022
8080e41
Web: Moved translations to Common file (zh-CN).
TatianaLopaeva Mar 10, 2022
297394f
Web: Moved translations to Common file (uk).
TatianaLopaeva Mar 10, 2022
e663d59
Web: Moved translations to Common file (vi).
TatianaLopaeva Mar 10, 2022
500945a
Web: Moved translations to Common file (tr).
TatianaLopaeva Mar 10, 2022
bff2518
Web: Moved translations to Common file (sl).
TatianaLopaeva Mar 10, 2022
0c9713c
Web: Moved translations to Common file (sk).
TatianaLopaeva Mar 10, 2022
8ba131d
Web: Moved translations to Common file (ro).
TatianaLopaeva Mar 10, 2022
34e1f83
Web: Moved translations to Common file (pt-BR).
TatianaLopaeva Mar 10, 2022
4eae2cd
Web: Moved translations to Common file (pt).
TatianaLopaeva Mar 10, 2022
56b4eec
Web: Moved translations to Common file (pl).
TatianaLopaeva Mar 10, 2022
d2e1f04
Web: Moved translations to Common file (nl).
TatianaLopaeva Mar 10, 2022
0efd8d1
Web: Moved translations to Common file (lv).
TatianaLopaeva Mar 10, 2022
e15108a
Web: Moved translations to Common file (lo).
TatianaLopaeva Mar 10, 2022
05da088
Web: Moved translations to Common file (ko).
TatianaLopaeva Mar 10, 2022
9467226
Web: Moved translations to Common file (ja).
TatianaLopaeva Mar 10, 2022
84f1a05
Web: Moved translations to Common file (it).
TatianaLopaeva Mar 10, 2022
a94be67
Web: Moved translations to Common file (fr).
TatianaLopaeva Mar 10, 2022
7b5f653
Web: Moved translations to Common file (fi).
TatianaLopaeva Mar 10, 2022
a403bdb
Web: Moved translations to Common file (es).
TatianaLopaeva Mar 10, 2022
5d4a54e
Web: Moved translations to Common file (en).
TatianaLopaeva Mar 10, 2022
9a4715f
Web: Moved translations to Common file (el).
TatianaLopaeva Mar 10, 2022
685e7e0
Web: Moved translations to Common file (de).
TatianaLopaeva Mar 10, 2022
ca45ca7
Web: Moved translations to Common file (cs).
TatianaLopaeva Mar 10, 2022
1cb0345
Web: Moved translations to Common file (bg).
TatianaLopaeva Mar 10, 2022
afb0510
Web: Moved translations to Common file (az).
TatianaLopaeva Mar 10, 2022
d793b09
WEb: Files: Changed translation keys.
TatianaLopaeva Mar 10, 2022
dc273d4
Web: Files: Changed translations keys.
TatianaLopaeva Mar 10, 2022
ed9ea31
Web: Backup: Deleted useless translations.
TatianaLopaeva Mar 10, 2022
ed4cb3a
Web: Arrangement of translations alphabetically.
TatianaLopaeva Mar 10, 2022
95742e0
Web: Backup: changed routing for mobile view.
TatianaLopaeva Mar 11, 2022
ef2e130
Web: Backup: Adding storage information from the store.
TatianaLopaeva Mar 11, 2022
12174c7
Web: ManualBackup: Refactoring, deleted useless code.
TatianaLopaeva Mar 11, 2022
0533670
Web: RestoreBackup: Deleted useless code, refactoring.
TatianaLopaeva Mar 11, 2022
32f4b30
WEb: AutoBackup: Refactoring, deleted useless code.
TatianaLopaeva Mar 11, 2022
934b982
Web: Changed translation according layouts.
TatianaLopaeva Mar 11, 2022
36959d8
Web: Backup: Fixed styles for backup.
TatianaLopaeva Mar 11, 2022
4b32423
Web: Backup: MobileView: Added showing and hiding of section header.
TatianaLopaeva Mar 11, 2022
cb67836
backup: fix restore from third-party storage
SuhorukovAnton Mar 14, 2022
43af2f6
implement InitiateChunkedUploadAsync in discDataStore
SuhorukovAnton Mar 14, 2022
bce9e82
Web: Deleted useless code.
TatianaLopaeva Mar 15, 2022
08dccad
Merge branch 'feature/backup' of github.com:ONLYOFFICE/AppServer into…
TatianaLopaeva Mar 15, 2022
8cbc15a
Web: Backup: Fixed language for weekdays and for help url.
TatianaLopaeva Mar 15, 2022
969f62a
Web: PreparationPortal: Removed settings request.
TatianaLopaeva Mar 15, 2022
1d6281b
Web: Common: Deleted useless code.
TatianaLopaeva Mar 15, 2022
a61ba56
Web: Common: Added constants.
TatianaLopaeva Mar 15, 2022
209d7bd
Web: Files: Deleted unused code.
TatianaLopaeva Mar 15, 2022
de81329
WEb: Backup: Added help button component.
TatianaLopaeva Mar 15, 2022
39bca9a
Web: RestoreBackup: Fixed page crash.
TatianaLopaeva Mar 15, 2022
2d2182d
Web: RestoreStorage: Deleted unused code.
TatianaLopaeva Mar 15, 2022
72390a0
Web: Common: Fixed help url.
TatianaLopaeva Mar 15, 2022
1f7f9e0
Web: Backup: Added translations (en).
TatianaLopaeva Mar 16, 2022
b637ccc
WEb: RestoreBackup: Added loader for restore button.
TatianaLopaeva Mar 16, 2022
cbbe1dd
Web: Components: Fixed file icon going beyond input. (for iOS, macOS)
TatianaLopaeva Mar 16, 2022
38d685c
Merge branch 'develop' into feature/backup
AlexeySafronov Mar 17, 2022
a534566
Web: Backup: Fixed double of toastr when create backup.
TatianaLopaeva Mar 18, 2022
c22bc6d
Merge branch 'feature/backup' of github.com:ONLYOFFICE/AppServer into…
TatianaLopaeva Mar 18, 2022
c61df32
Web: AutoBackup: Fixed dropdown height for time and count of copies.
TatianaLopaeva Mar 18, 2022
e99b63c
Web: PreparationPortal: Fixed position of image on mobile.
TatianaLopaeva Mar 18, 2022
786fdb7
Web: PreparationPortal: Renamed file.
TatianaLopaeva Mar 18, 2022
4a959f3
Web: Backup: Fixed a bug of false disable of third-party resources.
TatianaLopaeva Mar 18, 2022
9ca8191
Web: ManualBackup: Added import.
TatianaLopaeva Mar 18, 2022
3f95733
WEb: Common: Deleted useless code.
TatianaLopaeva Mar 21, 2022
4e4bea4
Web: Components: Deleted useless classname.
TatianaLopaeva Mar 21, 2022
f54b0d0
Web: files: Deleted useless code.
TatianaLopaeva Mar 21, 2022
73033f9
Web: Files: Added missing translation.
TatianaLopaeva Mar 21, 2022
8a76417
Web: Backup: Added organization name from settings.
TatianaLopaeva Mar 21, 2022
5420cef
Web: Deleted useless files.
TatianaLopaeva Mar 21, 2022
a72106d
Web: Files: Deleted useless file after merge.
TatianaLopaeva Mar 21, 2022
26272fc
Web: Separated BackupTypes constant.
TatianaLopaeva Mar 21, 2022
6215091
Web: Added red border when file is not selected and restore button cl…
TatianaLopaeva Mar 21, 2022
51315f6
WEb: Components: HelpButton: Added tooltipMaxWidth prop.
TatianaLopaeva Mar 21, 2022
a4deb55
Web: AutoBackup: Added clarification on the time.
TatianaLopaeva Mar 21, 2022
9bea7b3
Merge branch 'develop' into feature/backup
TatianaLopaeva Mar 22, 2022
fd4320d
Web: RestoreBackup: Added user agreement on restore to the dialog.
TatianaLopaeva Mar 22, 2022
21a2e75
Web: RestoreBackup: Added toastr when file wasn't selected and restor…
TatianaLopaeva Mar 22, 2022
5b6251f
WEb: Backup: Deleted useless code.
TatianaLopaeva Mar 22, 2022
bbc0d20
Web: Backup: Changed translation.
TatianaLopaeva Mar 22, 2022
2559bec
Web: RestoreBackup: Fixed offsetLeft of help button component.
TatianaLopaeva Mar 22, 2022
251f149
Web: Revert withoutBodyScroll after merge.
TatianaLopaeva Mar 22, 2022
ee8b6ea
Web: Files: deleted useless folders after merge.
TatianaLopaeva Mar 22, 2022
a13d1cc
Merge branch 'develop' into feature/backup
AlexeySafronov Mar 23, 2022
2bd4219
Web: Fixed import.
TatianaLopaeva Mar 24, 2022
7392830
Merge branch 'feature/backup' of github.com:ONLYOFFICE/AppServer into…
TatianaLopaeva Mar 24, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion common/ASC.Api.Core/Middleware/TenantStatusFilter.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using System.Net;
using System;
using System.Linq;
using System.Net;

using ASC.Common;
using ASC.Common.Logging;
Expand All @@ -15,6 +17,8 @@ namespace ASC.Api.Core.Middleware
public class TenantStatusFilter : IResourceFilter
{
private readonly ILog log;
private readonly string[] passthroughtRequestEndings = new[] { "preparation-portal", "getrestoreprogress", "settings", "settings.json" }; //TODO add or update when "preparation-portal" will be done


public TenantStatusFilter(IOptionsMonitor<ILog> options, TenantManager tenantManager)
{
Expand Down Expand Up @@ -44,6 +48,17 @@ public void OnResourceExecuting(ResourceExecutingContext context)
log.WarnFormat("Tenant {0} is not removed or suspended", tenant.TenantId);
return;
}

if (tenant.Status == TenantStatus.Transfering || tenant.Status == TenantStatus.Restoring)
{
if (passthroughtRequestEndings.Any(path => context.HttpContext.Request.Path.ToString().EndsWith(path, StringComparison.InvariantCultureIgnoreCase)))
{
return;
}
context.Result = new StatusCodeResult((int)HttpStatusCode.Forbidden);
log.WarnFormat("Tenant {0} is {1}", tenant.TenantId, tenant.Status);
return;
}
}
}
}
7 changes: 5 additions & 2 deletions common/ASC.Common/Threading/DistributedTaskQueue.cs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ public void QueueTask(DistributedTaskProgress taskProgress)
}

public void QueueTask(Action<DistributedTask, CancellationToken> action, DistributedTask distributedTask = null)
{
{
if (distributedTask == null)
{
distributedTask = new DistributedTask();
Expand Down Expand Up @@ -329,7 +329,10 @@ private void OnCompleted(Task task, string id)
if (distributedTask != null)
{
distributedTask.Status = DistributedTaskStatus.Completed;
distributedTask.Exception = task.Exception;
if (task.Exception != null)
{
distributedTask.Exception = task.Exception;
}
if (task.IsFaulted)
{
distributedTask.Status = DistributedTaskStatus.Failted;
Expand Down
36 changes: 30 additions & 6 deletions common/ASC.Data.Backup.Core/BackupAjaxHandler.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;

using ASC.Api.Utils;
Expand All @@ -14,7 +15,6 @@
using ASC.Notify.Cron;
using ASC.Web.Core.PublicResources;
using ASC.Web.Studio.Core;
using ASC.Web.Studio.Core.Backup;
using ASC.Web.Studio.Utility;

namespace ASC.Data.Backup
Expand All @@ -31,8 +31,11 @@ public class BackupAjaxHandler
private UserManager UserManager { get; }
private TenantExtra TenantExtra { get; }
private ConsumerFactory ConsumerFactory { get; }
private BackupFileUploadHandler BackupFileUploadHandler { get; }
private BackupService BackupService { get; }
private TempPath TempPath { get; }

private const string BackupTempFolder = "backup";
private const string BackupFileName = "backup.tmp";

#region backup

Expand All @@ -47,7 +50,7 @@ public BackupAjaxHandler(
UserManager userManager,
TenantExtra tenantExtra,
ConsumerFactory consumerFactory,
BackupFileUploadHandler backupFileUploadHandler)
TempPath tempPath)
{
TenantManager = tenantManager;
MessageService = messageService;
Expand All @@ -58,8 +61,8 @@ public BackupAjaxHandler(
UserManager = userManager;
TenantExtra = tenantExtra;
ConsumerFactory = consumerFactory;
BackupFileUploadHandler = backupFileUploadHandler;
BackupService = backupService;
TempPath = tempPath;
}

public void StartBackup(BackupStorageType storageType, Dictionary<string, string> storageParams, bool backupMail)
Expand Down Expand Up @@ -263,7 +266,7 @@ public void StartRestore(string backupId, BackupStorageType storageType, Diction

if (restoreRequest.StorageType == BackupStorageType.Local && !CoreBaseSettings.Standalone)
{
restoreRequest.FilePathOrId = BackupFileUploadHandler.GetFilePath();
restoreRequest.FilePathOrId = GetTmpFilePath();
}
}

Expand All @@ -280,7 +283,7 @@ public BackupProgress GetRestoreProgress()
return result;
}

private void DemandPermissionsRestore()
public void DemandPermissionsRestore()
{
PermissionContext.DemandPermissions(SecutiryConstants.EditPortalSettings);

Expand All @@ -289,6 +292,15 @@ private void DemandPermissionsRestore()
throw new BillingException(Resource.ErrorNotAllowedOption, "Restore");
}

public void DemandPermissionsAutoBackup()
{
PermissionContext.DemandPermissions(SecutiryConstants.EditPortalSettings);

if (!SetupInfo.IsVisibleSettings("AutoBackup") ||
(!CoreBaseSettings.Standalone && !TenantManager.GetTenantQuota(TenantManager.GetCurrentTenant().TenantId).AutoBackup))
throw new BillingException(Resource.ErrorNotAllowedOption, "AutoBackup");
}

#endregion

#region transfer
Expand Down Expand Up @@ -342,6 +354,18 @@ private int GetCurrentTenantId()
return TenantManager.GetCurrentTenant().TenantId;
}

public string GetTmpFilePath()
{
var folder = Path.Combine(TempPath.GetTempPath(), BackupTempFolder, TenantManager.GetCurrentTenant().TenantId.ToString());

if (!Directory.Exists(folder))
{
Directory.CreateDirectory(folder);
}

return Path.Combine(folder, BackupFileName);
}

public class Schedule
{
public BackupStorageType StorageType { get; set; }
Expand Down
82 changes: 47 additions & 35 deletions common/ASC.Data.Backup.Core/BackupFileUploadHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,55 +17,52 @@

using System;
using System.IO;
using System.Text.Json;
using System.Threading.Tasks;

using ASC.Common;
using ASC.Core;
using ASC.Web.Core.Utility;
using ASC.Web.Studio.Core;

using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;

namespace ASC.Web.Studio.Core.Backup
namespace ASC.Data.Backup
{
[Scope]
public class BackupFileUploadHandler
{
private const long MaxBackupFileSize = 1024L * 1024L * 1024L;
private const string BackupTempFolder = "backup";
private const string BackupFileName = "backup.tmp";

private PermissionContext PermissionContext { get; }
private TempPath TempPath { get; }
private TenantManager TenantManager { get; }

public BackupFileUploadHandler(
PermissionContext permissionContext,
TempPath tempPath,
TenantManager tenantManager)
public BackupFileUploadHandler(RequestDelegate next)
{
PermissionContext = permissionContext;
TempPath = tempPath;
TenantManager = tenantManager;
}

public string ProcessUpload(IFormFile file)
}
public async Task Invoke(HttpContext context,
PermissionContext permissionContext,
BackupAjaxHandler backupAjaxHandler)
{
if (file == null)
FileUploadResult result = null;
try
{
if (context.Request.Form.Files.Count == 0)
{
return "No files.";
result = Error("No files.");
}

if (!PermissionContext.CheckPermissions(SecutiryConstants.EditPortalSettings))
if (!permissionContext.CheckPermissions(SecutiryConstants.EditPortalSettings))
{
return "Access denied.";
result = Error("Access denied.");
}

var file = context.Request.Form.Files[0];

if (file.Length <= 0 || file.Length > MaxBackupFileSize)
{
return $"File size must be greater than 0 and less than {MaxBackupFileSize} bytes";
result = Error($"File size must be greater than 0 and less than {MaxBackupFileSize} bytes");
}

try
{
var filePath = GetFilePath();

var filePath = backupAjaxHandler.GetTmpFilePath();

if (File.Exists(filePath))
{
Expand All @@ -74,27 +71,42 @@ public string ProcessUpload(IFormFile file)

using (var fileStream = File.Create(filePath))
{
file.CopyTo(fileStream);
await file.CopyToAsync(fileStream);
}

return string.Empty;
result = Success();
}
catch (Exception error)
{
return error.Message;
result = Error(error.Message);
}

await context.Response.WriteAsync(JsonSerializer.Serialize(result));
}

internal string GetFilePath()
private FileUploadResult Success()
{
var folder = Path.Combine(TempPath.GetTempPath(), BackupTempFolder, TenantManager.GetCurrentTenant().TenantId.ToString());
return new FileUploadResult
{
Success = true
};
}

if (!Directory.Exists(folder))
private FileUploadResult Error(string messageFormat, params object[] args)
{
return new FileUploadResult
{
Directory.CreateDirectory(folder);
}
Success = false,
Message = string.Format(messageFormat, args)
};
}
}

return Path.Combine(folder, BackupFileName);
public static class BackupFileUploadHandlerExtensions
{
public static IApplicationBuilder UseBackupFileUploadHandler(this IApplicationBuilder builder)
{
return builder.UseMiddleware<BackupFileUploadHandler>();
}
}
}
Loading