Skip to content

Commit 588f2aa

Browse files
ehennestadEivind Hennestad
andauthored
Added backend server, OIDC service account ++ for a v2.0.0 release
* Added backend server for sending emails * Update GeneralWizard.js Make sure button for loading json files will not act as a submit button * Update react app with backend server Added button for uploading excel file with subjects Added button for sending json schema and excel file to curation Modifed package.json with extra required modules and to run express server * Update server.js Fixed bug with invalid variable name Removed whitespace in email message body * Update server.js fix broken path * Change : Send email from metadata wizard to the data custodian * Update MailTransporter.js Use original setup for mail transport * Update MailTransporter.js ... * Update MailTransporter.js * Update MailTransporter.js added logging to console for debug * Update MailTransporter.js Updated mail transporter with configurations that finally works for using the mail relay * Update server.js Update sender of email and send an email both to the metadata provider and to the curation team * Added excel upload within form and submission completed page The excel file is now uploaded directly to the form on the experiments page of the wizard The form is submitted when completing page 5, and user is taken to a "submission completed" page * Update package.json * Update server.js added curation team to email recipient list removed line that was automatically added by mistake * Update MailTransporter.js minor fix * Update server.js Fixed api response to client after wrapping code in separate functions Fixed email message, needed to make new message object before setting recipient * Add ticket number to form Addticket number as optional form input, will be used in email subject line * Update server.js Removed bodyparser code + minor changes * Update package.json cleanup * Added handling of email submission error Updated server to send appropriate status code to the client Added schema and module for a "submission failed page" Updated wizard to redirect user to one of "submission completed" or "submission failed" pages based on the response from the server * Refactored wizard using maps Removed switch blocks and replaced with a "state_map" Added onChange callback for saving formdata when data is entered in fields Removed all code which is currently not implemented Moved uischema and transformErrors into subcomponents Used same subcomponent for success and failiure Set some properties of contributors as required * Update Wizard.js Remove logging Handle case where wizardData cookie does not exist * Update server.js Get email address of contact person, not data custodian Changed text of email body to correspond with filled in values Fixed typo * Update server.js Added different email message for the autoconfirmation email. * Update package.json Change version of rjsf/core back to 3.0.0 * Update server.js Added newline in mail body * Read ticketnumber as query parameter from url * Updated contributors page based on suggestions from Ulrike and Ingrid * Update dataSet schema and funding * Update ErrorTransformer.js Update error messages for the last page * Update package-lock.json * Change name of json download and minor tweaks to user-facing text * trying out ebrains colors * misc adding of different field suggestions * Update fetch_controlled_terms.js * Test controlled terms fetcher on production-dev * Update fetchControlledTerms.js Fix, overwrite old file with instances * test regular rebuild * Update where kg access token is generated on the backend * Update css and add ebrains colors across components * Added privacy notice banner Plus some updates to css / theme colors * Added a progress bar Add progress bar * Added a metadata console demo * Fix backend default route to allow frontend routing Also added code for sending a wizard invitation to user from console/curators dashboard * Test image upload * Added preview image upload widget * debug : upload size * Update server.js * Add file upload debug logging * Update ImageUpload.js * image-upload-test * More testing wrt image upload * Fix gitignore for controlledTerms datasetLicense is a manually entered file, so it should not be autogenerated, and it should not be ignored also removed some deprecated code and console.log statements * Add contributionType (controlledTerm) for otherContributors * Cleanup on backend (server) Created router files Added update function Renamed some * misc + fix broken postinstall script * Update setup.js remove performance.now * Update setup.js * Update package.json * added dataset id to console * Fixed some server bugs * for testing * snake_case to kebab-case * Refactor form schemas * Update Wizard.js * Moved json loader to wizard * remove wizard new * Fix some bugs * Reorganized some files * Fix funding and update translation tester * rename features to modules * Fix some openMINDS related names, create some mess * misc fixes and * Reorganized files, updated to rjsf 5.00-beta * Update package.json * Misc renaming and updating text * Update some titles and descriptions * Split functions into different modules Put getRequestOptions in its own module * Delete MultiSelector.js * Update .gitignore * Add dockerfile & dockerignore * misc * Update fetchControlledTerms to return promise * misc * Update setup.js Ensure build stage happens after all controlled terms are fetched * Update docker related changes * Show whether page is completed or not in progressbar * Update backend submission route Fix updated names in the jsonData * Update Dockerfile Simplify ownership configuration * Update error messages and small fixes * Fixed a few more spurious error messages and added technique as required property * ++ * Add popup notification if form is not valid * Update uiSchema.json Remove items that are not present in the current version * Remove old versions of schemas * misc * Fix bugs and add suggestions from Ingrid * Improve the studytarget form schema Fixed warnings that appeared in browser and improved performance * Misc updates Confirmation dialog upon pressing submit Minor fixes to text * ++ * Update ExperimentWizard.js Add confirmation modal on experiment page * Update schema for dataset pt1 page * Create ControlledTerms.js * Add templates * Create formSchemaAssembler.js Add module for assembling the form schemas based on text modules and names of controlled terms to include * server kg-util cleanup * frontend cleanup * Delete openminds-document-generator.js * Remove form schemas and add to gitignore * remove ignored files * Update Main.js minor changes, do not hard code experiment wizard as last step * Update setup Update setup to include to assembling of form schemas Update internal updater to include to assembling of form schemas * Use text template for user confirmation email ++ + fix some minor things in wizard/main + add comment in form schema assembler * Add index file to Wizard/Schemas * Fix bug where url parameter (ticketnumber) is not rendered in form on first render * Work around for issue with 1MB max file size limit for uploads. * Added output of date and time to console when update is initialized * Fixed path concatenation in importControlledTerms * Fixed issues that crashed the setup from running * Create source directory if missing in form schema builder * Update .gitignore * Update .dockerignore * no idea what i am doing * remove files that were added to gitignore * Create README.MD * Update README.MD * Update README.MD * Update .gitignore * Update .gitignore * Update test-doc-generator.js Added comments * Update .dockerignore * Revert "Update test-doc-generator.js" This reverts commit e6fe0f2. * Update test-doc-generator.js * Squashed commit of the following: commit 2b5ea26 Author: ehennestad <ehennestad@gmail.com> Date: Wed Mar 8 00:27:36 2023 +0100 Updated saving, metadata can be saved from any page commit 33d4367 Author: ehennestad <ehennestad@gmail.com> Date: Tue Mar 7 23:25:48 2023 +0100 Added download button in subheader commit a5e1ba3 Author: ehennestad <ehennestad@gmail.com> Date: Tue Mar 7 22:32:47 2023 +0100 Added dropdown menu with options for loading and saving metadata * Updated frontend format for downloaded json file * Removed how to cite * Added assembling of RJSF schemas to dev script * Remove unused variables and fix previous commit mistake * Save form data to json file with simple file attributes. * Generate filename for json file based on dataset shortName or contact person last name * Add a message popup when form is updated from file * Added functionality for populating form with KG core schema instances Added person as an example. Should clean up and generalize code more! * Fix: make sure directory for downloading KG instances to exists * Make sure subheader stays on top of other components * Prevent the postinstall / setup from running during the docker build process * Update fetchCoreSchemaInstances.js Cleanup * Change menu text for download as... * Update .dockerignore --------- Co-authored-by: Eivind Hennestad <eivinhen@1x-193-157-194-208.uio.no>
1 parent a69767e commit 588f2aa

86 files changed

Lines changed: 8081 additions & 3474 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.dockerignore

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Ignore the docket files
2+
.dockerignore
3+
Dockerfile
4+
5+
# Ignore node modules which will anyway be created when we run npm install
6+
/node_modules
7+
8+
# Ignore production files, they will be created when docker image is run
9+
/build
10+
11+
# Ignore some secrets
12+
**/mail_credentials.js
13+
14+
# controlled terms (fetched on run-time)
15+
/src/controlledTerms/*.json
16+
# But: keep the datasetLicense file because this is a manual entry
17+
!/src/controlledTerms/datasetLicense.json
18+
19+
# Ignore the schemas that are autogenerated on installation
20+
/src/modules/Wizard/Schemas
21+
# Make sure to not ignore the index file that is used to import all schemas
22+
!/src/modules/Wizard/Schemas/index.js

.gitignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,25 @@
11
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
22

3+
# controlled terms (fetched on run-time)
4+
/src/controlledTerms/*.json
5+
# But: keep the datasetLicense file because this is a manual entry
6+
!datasetLicense.json
7+
# openMINDS schemas
8+
openMINDS
9+
10+
# autogenerated during setup after controlled terms are fetched
11+
src/modules/Wizard/Schemas
12+
# Make sure to not ignore the index file that is used to import all schemas
13+
!src/modules/Wizard/Schemas/index.js
14+
!src/modules/Wizard/Schemas/README.md
15+
16+
# Downloaded data
17+
/server/data
18+
19+
# Temporary files
20+
/tmp/upload
21+
/tmp
22+
323
# dependencies
424
/node_modules
525
/.pnp

Dockerfile

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Build node image from Node Docker Hub
2+
FROM node:16
3+
4+
# Set node environment as docker-build
5+
ENV NODE_ENV="docker-build"
6+
7+
# Make app directory in container
8+
RUN mkdir /app
9+
10+
# Identify working directory
11+
WORKDIR /app
12+
13+
# Copy over app to app folder
14+
COPY . /app
15+
16+
# Install rpm packages from package.json
17+
RUN npm install --force
18+
19+
# Reset node environment variable
20+
ENV NODE_ENV=""
21+
22+
# Run the app as a non-privileged user
23+
RUN chown -R 1001:0 . && chmod -R gu+s+rw .
24+
USER 1001
25+
26+
# Expose server at port ( accessible outside of container)
27+
EXPOSE 8080
28+
29+
# Start app. Need to run setup first to prepare the app for production
30+
CMD node setup.js && node server/server.js
31+
32+
# To build, use the following command:
33+
# docker build .
34+
35+
# To build for Open Shift (from Apple Pro M1), use the following command:
36+
# docker build --platform=linux/amd64 .
37+
38+
# To run, use the following command:
39+
# docker run -it -d -P --name wizard --env OIDC_CLIENT_SECRET=$OIDC_CLIENT_SECRET <IMAGE ID>
40+
41+
# To push to EBRAINS Docker registry
42+
# docker login docker-registry.ebrains.eu
43+
44+
# docker image tag <image id> docker-registry.ebrains.eu/<project_name>/<repository_name>:<tag>
45+
# docker push docker-registry.ebrains.eu/<project_name>/<repository_name>:<tag>
46+
47+
# Example:
48+
# docker image tag ddb2fe9a8083 docker-registry.ebrains.eu/ebrains_wizard_test/wizard_dev:0.1.2
49+
# docker push docker-registry.ebrains.eu/ebrains_wizard_test/wizard_dev:0.1.2

0 commit comments

Comments
 (0)