diff --git a/.github/workflows/curator-ui-node.yml b/.github/workflows/curator-ui-node.yml
index 02ecda992..ade4184aa 100644
--- a/.github/workflows/curator-ui-node.yml
+++ b/.github/workflows/curator-ui-node.yml
@@ -24,7 +24,7 @@ jobs:
- name: Use Node.js
uses: actions/setup-node@v3
with:
- node-version: "16.x"
+ node-version: "18.x"
- name: Build and test
run: |
git config --global url."https://github.com/".insteadOf git@github.com:
diff --git a/.gitignore b/.gitignore
index ae6a31fb5..2551bef14 100644
--- a/.gitignore
+++ b/.gitignore
@@ -214,10 +214,14 @@ Temporary Items
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
-# .idea/modules.xml
+.idea/compiler.xml
+.idea/modules.xml
# .idea/*.iml
# .idea/modules
-# *.iml
+*.iml
+.idea/vcs.xml
+.idea/jsLibraryMappings.xml
+.idea/inspectionProfiles/
# *.ipr
# CMake
diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
deleted file mode 100644
index 9c6941105..000000000
--- a/.idea/inspectionProfiles/Project_Default.xml
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/jsLibraryMappings.xml b/.idea/jsLibraryMappings.xml
deleted file mode 100644
index d23208fbb..000000000
--- a/.idea/jsLibraryMappings.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
deleted file mode 100644
index 35eb1ddfb..000000000
--- a/.idea/vcs.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/dev/docker-compose.dev.full.test.yml b/dev/docker-compose.dev.full.test.yml
index 1b9920bde..46e2bf35b 100644
--- a/dev/docker-compose.dev.full.test.yml
+++ b/dev/docker-compose.dev.full.test.yml
@@ -23,7 +23,7 @@ services:
BASE_URL: "${BASE_URL}"
COMPLETE_DATA_BUCKET: "${COMPLETE_DATA_BUCKET}"
COUNTRY_DATA_BUCKET: "${COUNTRY_DATA_BUCKET}"
- REACT_APP_RECAPTCHA_SITE_KEY: "${REACT_APP_RECAPTCHA_SITE_KEY}"
+ REACT_APP_RECAPTCHA_SITE_KEY: "${VITE_APP_RECAPTCHA_SITE_KEY}"
data:
command: "npm run dev"
volumes:
diff --git a/dev/docker-compose.dev.full.yml b/dev/docker-compose.dev.full.yml
index 5073375c5..716892542 100644
--- a/dev/docker-compose.dev.full.yml
+++ b/dev/docker-compose.dev.full.yml
@@ -26,7 +26,7 @@ services:
BASE_URL: "${BASE_URL}"
COMPLETE_DATA_BUCKET: "${COMPLETE_DATA_BUCKET}"
COUNTRY_DATA_BUCKET: "${COUNTRY_DATA_BUCKET}"
- REACT_APP_RECAPTCHA_SITE_KEY: "${REACT_APP_RECAPTCHA_SITE_KEY}"
+ REACT_APP_RECAPTCHA_SITE_KEY: "${VITE_APP_RECAPTCHA_SITE_KEY}"
NODE_ENV: "dev"
data:
command: "npm run dev"
@@ -50,8 +50,8 @@ services:
REACT_APP_PUBLIC_MAPBOX_TOKEN: "${REACT_APP_PUBLIC_MAPBOX_TOKEN}"
REACT_APP_POLICY_PUBLIC_ID: "${REACT_APP_POLICY_PUBLIC_ID}"
REACT_APP_COOKIE_CONSENT_PUBLIC_ID: "${REACT_APP_COOKIE_CONSENT_PUBLIC_ID}"
- REACT_APP_RECAPTCHA_SITE_KEY: "${REACT_APP_RECAPTCHA_SITE_KEY}"
- REACT_APP_DATA_DICTIONARY_LINK: "${REACT_APP_DATA_DICTIONARY_LINK}"
+ VITE_APP_RECAPTCHA_SITE_KEY: "${VITE_APP_RECAPTCHA_SITE_KEY}"
+ VITE_APP_DATA_DICTIONARY_LINK: "${VITE_APP_DATA_DICTIONARY_LINK}"
ENABLE_LOCAL_AUTH: "true"
DISEASE_NAME: "${DISEASE_NAME}"
localstack:
diff --git a/dev/docker-compose.dev.yml b/dev/docker-compose.dev.yml
index 480f31d21..d908e1599 100644
--- a/dev/docker-compose.dev.yml
+++ b/dev/docker-compose.dev.yml
@@ -30,10 +30,10 @@ services:
# We can't use curator:3001 here because that's an internal DNS,
# not accessible from the user's browser.
# In production simply /auth/google would work.
- REACT_APP_LOGIN_URL: "http://localhost:3001/auth/google"
- REACT_APP_PUBLIC_MAPBOX_TOKEN: "${REACT_APP_PUBLIC_MAPBOX_TOKEN}"
- REACT_APP_POLICY_PUBLIC_ID: "${REACT_APP_POLICY_PUBLIC_ID}"
- REACT_APP_COOKIE_CONSENT_PUBLIC_ID: "${REACT_APP_COOKIE_CONSENT_PUBLIC_ID}"
- REACT_APP_RECAPTCHA_SITE_KEY: "${REACT_APP_RECAPTCHA_SITE_KEY}"
- REACT_APP_DISEASE_NAME: "${REACT_APP_DISEASE_NAME}"
- REACT_APP_DATA_DICTIONARY_LINK: "${REACT_APP_DATA_DICTIONARY_LINK}"
+ VITE_APP_LOGIN_URL: "http://localhost:3001/auth/google"
+ VITE_APP_PUBLIC_MAPBOX_TOKEN: "${REACT_APP_PUBLIC_MAPBOX_TOKEN}"
+ VITE_APP_POLICY_PUBLIC_ID: "${REACT_APP_POLICY_PUBLIC_ID}"
+ VITE_APP_COOKIE_CONSENT_PUBLIC_ID: "${REACT_APP_COOKIE_CONSENT_PUBLIC_ID}"
+ VITE_APP_RECAPTCHA_SITE_KEY: "${VITE_APP_RECAPTCHA_SITE_KEY}"
+ VITE_APP_DISEASE_NAME: "${REACT_APP_DISEASE_NAME}"
+ VITE_APP_DATA_DICTIONARY_LINK: "${VITE_APP_DATA_DICTIONARY_LINK}"
diff --git a/dev/docker-compose.yml b/dev/docker-compose.yml
index f3f75cfb5..ee28d8b52 100644
--- a/dev/docker-compose.yml
+++ b/dev/docker-compose.yml
@@ -93,10 +93,10 @@ services:
environment:
PORT: "3002"
# UI and API run on different ports in dev, make the custom proxy work.
- REACT_APP_PROXY_URL: "http://curator:3001"
- REACT_APP_DISEASE_NAME: "${DISEASE_NAME}"
- REACT_APP_MAP_LINK_LOCAL: "${MAP_LINK_LOCAL}"
- REACT_APP_MAP_LINK_LOCAL_E2E: "${MAP_LINK_LOCAL_E2E}"
- REACT_APP_MAP_LINK_DEV: "${MAP_LINK_DEV}"
- REACT_APP_MAP_LINK_QA: "${MAP_LINK_QA}"
- REACT_APP_MAP_LINK_PROD: "${MAP_LINK_PROD}"
+ VITE_APP_PROXY_URL: "http://curator:3001"
+ VITE_APP_DISEASE_NAME: "${DISEASE_NAME}"
+ VITE_APP_MAP_LINK_LOCAL: "${MAP_LINK_LOCAL}"
+ VITE_APP_MAP_LINK_LOCAL_E2E: "${MAP_LINK_LOCAL_E2E}"
+ VITE_APP_MAP_LINK_DEV: "${MAP_LINK_DEV}"
+ VITE_APP_MAP_LINK_QA: "${MAP_LINK_QA}"
+ VITE_APP_MAP_LINK_PROD: "${MAP_LINK_PROD}"
diff --git a/verification/curator-service/Dockerfile b/verification/curator-service/Dockerfile
index 4999aa976..1390821fd 100644
--- a/verification/curator-service/Dockerfile
+++ b/verification/curator-service/Dockerfile
@@ -1,7 +1,7 @@
# This dockerfile builds the curator API service and its UI in a single container.
# The UI is served as a static resource from the curator API service express server.
# Security best practices are followed and a trimmed down image is used for production serving.
-FROM node:16.18.0 as builder
+FROM node:18.18.0 as builder
# Build the curator service.
WORKDIR /usr/src/app/verification/curator-service/api
@@ -42,18 +42,18 @@ ENV REACT_APP_PUBLIC_MAPBOX_TOKEN "pk.eyJ1IjoiaGVhbHRobWFwIiwiYSI6ImNrYzNjczdmcz
ENV REACT_APP_POLICY_PUBLIC_ID "89575059"
ENV REACT_APP_COOKIE_CONSENT_PUBLIC_ID "2070778"
ENV REACT_APP_RECAPTCHA_SITE_KEY "6LdhjvwgAAAAALrxavR_zR58kxxap07D4ba8X-jE"
-ENV REACT_APP_DISEASE_NAME "Mpox"
-ENV REACT_APP_MAP_LINK_DEV "http://dev-map.marburg.global.health/"
-ENV REACT_APP_MAP_LINK_LOCAL "http://dev-map.marburg.global.health/"
-ENV REACT_APP_MAP_LINK_LOCAL_E2E "http://dev-map.marburg.global.health/"
-ENV REACT_APP_MAP_LINK_PROD "http://dev-map.marburg.global.health/"
-ENV REACT_APP_MAP_LINK_QA "http://map.marburg.global.health/"
+ENV VITE_APP_DISEASE_NAME "Mpox"
+ENV VITE_APP_MAP_LINK_DEV "http://dev-map.marburg.global.health/"
+ENV VITE_APP_MAP_LINK_LOCAL "http://dev-map.marburg.global.health/"
+ENV VITE_APP_MAP_LINK_LOCAL_E2E "http://dev-map.marburg.global.health/"
+ENV VITE_APP_MAP_LINK_PROD "http://dev-map.marburg.global.health/"
+ENV VITE_APP_MAP_LINK_QA "http://map.marburg.global.health/"
RUN npm run build
# Multi-staged build, use a trimmed down version of node for prod.
-FROM node:16.18.0 as prod
+FROM node:18.18.0 as prod
# No need to run as root.
USER node
diff --git a/verification/curator-service/ui/.eslintrc b/verification/curator-service/ui/.eslintrc
index 1dd53634e..4a2fccca5 100644
--- a/verification/curator-service/ui/.eslintrc
+++ b/verification/curator-service/ui/.eslintrc
@@ -42,13 +42,12 @@
{
"files": ["**/*.ts", "**/*.tsx"],
"plugins": ["@typescript-eslint"],
- "extends": [
- "react-app",
+ "extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:cypress/recommended",
"prettier", // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier
- "plugin:prettier/recommended" // Enables eslint-plugin-prettier and eslint-config-prettier. This will display prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array
+ "plugin:prettier/recommended" // Enables eslint-plugin-prettier and eslint-config-prettier. This will display prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array
]
}
],
diff --git a/verification/curator-service/ui/.eslintrc.json b/verification/curator-service/ui/.eslintrc.json
new file mode 100644
index 000000000..bc46d9c5a
--- /dev/null
+++ b/verification/curator-service/ui/.eslintrc.json
@@ -0,0 +1,59 @@
+{
+ "parser": "@typescript-eslint/parser",
+ "plugins": ["@typescript-eslint"],
+ "extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
+ "parserOptions": {
+ "ecmaVersion": 2017,
+ "sourceType": "module",
+ "ecmaFeatures": {
+ "jsx": true
+ }
+ },
+ "env": {
+ "browser": true,
+ "node": true,
+ "es6": true,
+ "jest": true
+ },
+ "rules": {
+ "no-bitwise": [
+ "error"
+ ],
+ "linebreak-style": [
+ "error",
+ "unix"
+ ],
+ "quotes": [
+ "error",
+ "single"
+ ],
+ "semi": [
+ "error",
+ "always"
+ ],
+ "@typescript-eslint/no-redeclare": "off",
+ "@typescript-eslint/no-unused-expressions": "off",
+ "@typescript-eslint/no-explicit-any": "off",
+ "@typescript-eslint/no-non-null-assertion": "off",
+ "@typescript-eslint/explicit-module-boundary-types": "off",
+ "@typescript-eslint/no-var-requires": "off"
+ },
+ "overrides": [
+ {
+ "files": ["**/*.ts", "**/*.tsx"],
+ "plugins": ["@typescript-eslint"],
+ "extends": [
+ "eslint:recommended",
+ "plugin:@typescript-eslint/recommended",
+ "plugin:cypress/recommended",
+ "prettier", // Uses eslint-config-prettier to disable ESLint rules from @typescript-eslint/eslint-plugin that would conflict with prettier
+ "plugin:prettier/recommended" // Enables eslint-plugin-prettier and eslint-config-prettier. This will display prettier errors as ESLint errors. Make sure this is always the last configuration in the extends array
+ ]
+ }
+ ],
+ "settings": {
+ "react": {
+ "version": "detect"
+ }
+ }
+}
\ No newline at end of file
diff --git a/verification/curator-service/ui/.gitignore b/verification/curator-service/ui/.gitignore
index 4997e7efe..c09c79f7a 100644
--- a/verification/curator-service/ui/.gitignore
+++ b/verification/curator-service/ui/.gitignore
@@ -25,4 +25,8 @@ amplifyconfiguration.json
amplify-build-config.json
amplify-gradle-config.json
amplifytools.xcconfig
-.secret-*
\ No newline at end of file
+.secret-*
+
+.idea/modules.xml
+.idea/vcs.xml
+.idea/inspectionProfiles
\ No newline at end of file
diff --git a/verification/curator-service/ui/.idea/workspace.xml b/verification/curator-service/ui/.idea/workspace.xml
new file mode 100644
index 000000000..3e6567878
--- /dev/null
+++ b/verification/curator-service/ui/.idea/workspace.xml
@@ -0,0 +1,192 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {
+ "customColor": "",
+ "associatedIndex": 2
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1713340216703
+
+
+ 1713340216703
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/verification/curator-service/ui/Dockerfile b/verification/curator-service/ui/Dockerfile
index e03a2c23a..acb6dbd10 100644
--- a/verification/curator-service/ui/Dockerfile
+++ b/verification/curator-service/ui/Dockerfile
@@ -1,5 +1,5 @@
# Dev docker file for curator UI.
-FROM node:16.18.0
+FROM node:18.18.0
WORKDIR /usr/src/app/verification/curator-service/ui
# Install app dependencies
diff --git a/verification/curator-service/ui/public/index.html b/verification/curator-service/ui/index.html
similarity index 85%
rename from verification/curator-service/ui/public/index.html
rename to verification/curator-service/ui/index.html
index da32b90b0..506d9787d 100644
--- a/verification/curator-service/ui/public/index.html
+++ b/verification/curator-service/ui/index.html
@@ -3,31 +3,31 @@
-
+
-
+
-
+
-
-
+
+
-
+
+