Simple Uploader for eLTER catalogue
Aim
To enable eLTER site managers to upload data files associated with a metadata record.
A deployment of the catalogue can now configure which uploader (Hubbub or Simple) is included in the deployment. This is done using Profiles. Declaring which profile is active switches which uploader is deployed.
Docker
The Docker image creates a volume at /var/upload/datastore
, this is where the data files are uploaded to. This is where docker compose mounts a host directory and where the SAN is mounted in production deploymnet.
Spring Configuration
DevelopmentUserStoreConfig.java
changed from creating lots of beans for each user to using @PostConstruct
that adds all the users to the userStore. This class is used in local development instead of the Crowd user and group stores.
Hubbub configuration moved into upload/hubbub
package and only added to application context on upload:hubbub
profile
WebConfig.java
- Removed
permissionService
as it is created by Spring automatically - UploadDocumentService now only created if
upload:hububb
profile is active - Renamed
catalogueDataRepository
API
- In new package
../upload/simple
- Controller to handle requests
- StorageService to handle saving files to file system
Client
Client is made up of Backbone Views, Models and Collections. Dropzone provides the file upload facility. In web/src/scripts/*/upload/simple/
directories.
-
web/src/scripts/Main.coffee
sorted the methods alphabetically. Add initialisation for the simple uploader app. - Adding link to uploader when the catalogue is not an EIDC catalogue
templates/html/gemini/_admin.ftl
. Also lots of tidying up to make the template more readable. Added assignments to simplify theif
statements. - Underscore upgrade has removed it as a Global variable, therefore needed to add it back in to many files that used it with out defining it.
- Needed to ignore some tests e.g.
web/test/views/FacetsPanelView.spec.coffee
they break but I can't figure out why
Other
PermissionService.java
- Extracted from
services
package into own package - Added interface and renamed implementing class to
CrowdPermissionService
- Moved hubbub into a sub-package of
upload
to allowsimple
as an alternative uploader