-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement everything necessary to get database import working, at least for the happy path. Only basic validation has been done, so anything here should definitely be considered beta. Major integration notes: * Add new overlay with a file selector, an 'apply to all libraries' checkbox, and a conflict resolution method. * Add an import_db POST endpoint whose body contains the uploaded database. * Implement POST body parsing. All parameters up to this point have fit in the query string, but that doesn't work for potentially megabytes of marker data. There are almost definitely libraries that can do the proper parsing for me, but I like to reinvent the wheel for some reason. * Remove gate preventing the 'More' button from showing up by default. * Mostly share bulkAdd implementation to do the actual restoration, since the underlying concept is the same. Other changes: * Adjust some queries that could get too large if we wanted information on too many items. SQL limits the number of conditions, and when importing markers we might need information on thousands of individual metadataIds. Add some checks to use a different system in those cases, in which we grab all items for the entire section, them filter those based on the ids passed in. * Rename PurgeConflictResolution to MarkerConflictResolution, as the enum is now shared between purge restoration and DB import. * Several bulkRestore fixes caught when testing bulk import: * Properly set 'lastAction' when checking for overlap among markers we want to restore. * Don't add markerActions to existingMarkers map when there's already an identical existing marker. * Fix broken ImageTest test.
- Loading branch information
Showing
12 changed files
with
670 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.