From 900b0d78d623b89b00c98f96b7846f27116280ef Mon Sep 17 00:00:00 2001 From: tim738745 <98717409+tim738745@users.noreply.github.com> Date: Fri, 22 Mar 2024 11:28:49 -0700 Subject: [PATCH] rebuild frontend using create-react-app (#259) --- .gitignore | 1 - docker-compose.yml | 14 +-- frontend/.dockerignore | 1 + frontend/.env | 5 + frontend/.gitignore | 23 ++++ {react => frontend}/Dockerfile | 4 +- {react => frontend}/Dockerfile-Openshift | 2 +- frontend/README.md | 70 +++++++++++ {react => frontend}/nginx.conf | 0 {react => frontend}/package.json | 56 +++++---- frontend/public/favicon.ico | Bin 0 -> 3870 bytes frontend/public/index.html | 47 ++++++++ frontend/public/logo192.png | Bin 0 -> 5347 bytes frontend/public/logo512.png | Bin 0 -> 9664 bytes frontend/public/manifest.json | 25 ++++ frontend/public/robots.txt | 3 + .../src/app/components/AlertDialog.js | 0 .../src/app/components}/App.js | 17 ++- .../src/app/components/Footer.js | 0 .../src/app/components/Header.js | 0 .../src/app/components/KeycloakProvider.js | 9 +- .../src/app/components/Layout.js | 0 .../src/app/components/Loading.js | 0 .../src/app/components}/Login.js | 2 +- .../src/app/components/Logout.js | 0 .../src/app/components/ReactTable.js | 0 .../app/components/ReactTablePagination.js | 0 {react => frontend}/src/app/static/logo.png | Bin {react => frontend}/src/app/styles/App.scss | 0 .../src/app/styles/FileUpload.scss | 0 .../src/app/styles/Footer.scss | 0 .../src/app/styles/Header.scss | 0 {react => frontend}/src/app/styles/Login.scss | 0 .../src/app/styles/ReactTable.scss | 0 .../src/app/styles/Roboto.scss | 0 {react => frontend}/src/app/styles/Users.scss | 0 .../src/app/styles/fonts/LICENSE.txt | 0 .../src/app/styles/fonts/Roboto-Bold.ttf | Bin .../app/styles/fonts/Roboto-BoldItalic.ttf | Bin .../src/app/styles/fonts/Roboto-Italic.ttf | Bin .../src/app/styles/fonts/Roboto-Regular.ttf | Bin .../src/app/styles/images/BCID_H_rgb_pos.png | Bin .../src/app/styles/images/BCID_H_rgb_rev.png | Bin .../src/app/styles/images/BCID_V_rgb_pos.png | Bin .../src/app/styles/images/tof.jpg | Bin {react => frontend}/src/app/styles/index.scss | 0 .../src/app/styles/variables.scss | 0 .../src/app/utilities/getFileSize.js | 0 .../src/app/utilities/props.js | 0 .../src/app/utilities/reactTable.js | 0 .../src/app/utilities/useAxios.js | 6 +- .../src/app/utilities/useKeycloak.js | 0 frontend/src/config.js | 19 +++ {react => frontend}/src/contexts.js | 0 .../src/dashboard/DashboardContainer.js | 0 {react => frontend}/src/dashboard/router.js | 0 .../src/icbc_data/IcbcDataContainer.js | 0 .../src/icbc_data/components/IcbcDataTable.js | 0 {react => frontend}/src/icbc_data/router.js | 0 {react => frontend}/src/icbc_data/routes.js | 0 {react => frontend}/src/index.js | 9 +- .../src/uploads/UploadContainer.js | 0 .../src/uploads/components/FileDrop.js | 0 .../src/uploads/components/FileDropArea.js | 0 .../src/uploads/components/UploadPage.js | 0 {react => frontend}/src/uploads/router.js | 0 {react => frontend}/src/uploads/routes.js | 0 .../src/users/UsersContainer.js | 0 .../src/users/components/UsersPage.js | 0 {react => frontend}/src/users/routes.js | 0 react/.eslintrc.js | 30 ----- react/README.md | 1 - react/public/favicon.ico | Bin 22486 -> 0 bytes react/public/index.html | 14 --- react/src/app/settings.js | 11 -- react/src/keycloak-source.json | 8 -- react/start.js | 32 ----- react/webpack.config.js | 114 ------------------ 78 files changed, 254 insertions(+), 269 deletions(-) create mode 100644 frontend/.dockerignore create mode 100644 frontend/.env create mode 100644 frontend/.gitignore rename {react => frontend}/Dockerfile (69%) rename {react => frontend}/Dockerfile-Openshift (95%) create mode 100644 frontend/README.md rename {react => frontend}/nginx.conf (100%) rename {react => frontend}/package.json (50%) create mode 100644 frontend/public/favicon.ico create mode 100644 frontend/public/index.html create mode 100644 frontend/public/logo192.png create mode 100644 frontend/public/logo512.png create mode 100644 frontend/public/manifest.json create mode 100644 frontend/public/robots.txt rename {react => frontend}/src/app/components/AlertDialog.js (100%) rename {react/src => frontend/src/app/components}/App.js (63%) rename {react => frontend}/src/app/components/Footer.js (100%) rename {react => frontend}/src/app/components/Header.js (100%) rename {react => frontend}/src/app/components/KeycloakProvider.js (72%) rename {react => frontend}/src/app/components/Layout.js (100%) rename {react => frontend}/src/app/components/Loading.js (100%) rename {react/src => frontend/src/app/components}/Login.js (94%) rename {react => frontend}/src/app/components/Logout.js (100%) rename {react => frontend}/src/app/components/ReactTable.js (100%) rename {react => frontend}/src/app/components/ReactTablePagination.js (100%) rename {react => frontend}/src/app/static/logo.png (100%) rename {react => frontend}/src/app/styles/App.scss (100%) rename {react => frontend}/src/app/styles/FileUpload.scss (100%) rename {react => frontend}/src/app/styles/Footer.scss (100%) rename {react => frontend}/src/app/styles/Header.scss (100%) rename {react => frontend}/src/app/styles/Login.scss (100%) rename {react => frontend}/src/app/styles/ReactTable.scss (100%) rename {react => frontend}/src/app/styles/Roboto.scss (100%) rename {react => frontend}/src/app/styles/Users.scss (100%) rename {react => frontend}/src/app/styles/fonts/LICENSE.txt (100%) rename {react => frontend}/src/app/styles/fonts/Roboto-Bold.ttf (100%) rename {react => frontend}/src/app/styles/fonts/Roboto-BoldItalic.ttf (100%) rename {react => frontend}/src/app/styles/fonts/Roboto-Italic.ttf (100%) rename {react => frontend}/src/app/styles/fonts/Roboto-Regular.ttf (100%) rename {react => frontend}/src/app/styles/images/BCID_H_rgb_pos.png (100%) rename {react => frontend}/src/app/styles/images/BCID_H_rgb_rev.png (100%) rename {react => frontend}/src/app/styles/images/BCID_V_rgb_pos.png (100%) rename {react => frontend}/src/app/styles/images/tof.jpg (100%) rename {react => frontend}/src/app/styles/index.scss (100%) rename {react => frontend}/src/app/styles/variables.scss (100%) rename {react => frontend}/src/app/utilities/getFileSize.js (100%) rename {react => frontend}/src/app/utilities/props.js (100%) rename {react => frontend}/src/app/utilities/reactTable.js (100%) rename {react => frontend}/src/app/utilities/useAxios.js (90%) rename {react => frontend}/src/app/utilities/useKeycloak.js (100%) create mode 100644 frontend/src/config.js rename {react => frontend}/src/contexts.js (100%) rename {react => frontend}/src/dashboard/DashboardContainer.js (100%) rename {react => frontend}/src/dashboard/router.js (100%) rename {react => frontend}/src/icbc_data/IcbcDataContainer.js (100%) rename {react => frontend}/src/icbc_data/components/IcbcDataTable.js (100%) rename {react => frontend}/src/icbc_data/router.js (100%) rename {react => frontend}/src/icbc_data/routes.js (100%) rename {react => frontend}/src/index.js (69%) rename {react => frontend}/src/uploads/UploadContainer.js (100%) rename {react => frontend}/src/uploads/components/FileDrop.js (100%) rename {react => frontend}/src/uploads/components/FileDropArea.js (100%) rename {react => frontend}/src/uploads/components/UploadPage.js (100%) rename {react => frontend}/src/uploads/router.js (100%) rename {react => frontend}/src/uploads/routes.js (100%) rename {react => frontend}/src/users/UsersContainer.js (100%) rename {react => frontend}/src/users/components/UsersPage.js (100%) rename {react => frontend}/src/users/routes.js (100%) delete mode 100644 react/.eslintrc.js delete mode 100644 react/README.md delete mode 100644 react/public/favicon.ico delete mode 100644 react/public/index.html delete mode 100644 react/src/app/settings.js delete mode 100644 react/src/keycloak-source.json delete mode 100644 react/start.js delete mode 100644 react/webpack.config.js diff --git a/.gitignore b/.gitignore index 59e952f2..c54ffabf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,6 @@ __pycache__/ .coverage .DS_Store -.env .idea/ .minio.sys/ .pyc diff --git a/docker-compose.yml b/docker-compose.yml index 0a67251d..19371282 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -58,17 +58,11 @@ services: db: condition: service_healthy web: - build: ./react - command: > - sh -c "npm install --legacy-peer-deps && - npm start" - env_file: - - keycloak.env - environment: - - API_BASE=http://localhost:8000 - - ENABLE_KEYCLOAK=true + build: ./frontend + command: npm run start volumes: - - ./react:/web + - ./frontend:/web + - /web/node_modules ports: - 3000:3000 diff --git a/frontend/.dockerignore b/frontend/.dockerignore new file mode 100644 index 00000000..b512c09d --- /dev/null +++ b/frontend/.dockerignore @@ -0,0 +1 @@ +node_modules \ No newline at end of file diff --git a/frontend/.env b/frontend/.env new file mode 100644 index 00000000..f70aacba --- /dev/null +++ b/frontend/.env @@ -0,0 +1,5 @@ +REACT_APP_ENABLE_KEYCLOAK=true +REACT_APP_API_BASE=http://localhost:8000 +REACT_APP_KEYCLOAK_CLIENT_ID=cthub-on-gold-cluster-3974 +REACT_APP_KEYCLOAK_REALM=standard +REACT_APP_KEYCLOAK_URL=https://dev.loginproxy.gov.bc.ca/auth/ \ No newline at end of file diff --git a/frontend/.gitignore b/frontend/.gitignore new file mode 100644 index 00000000..4d29575d --- /dev/null +++ b/frontend/.gitignore @@ -0,0 +1,23 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.js + +# testing +/coverage + +# production +/build + +# misc +.DS_Store +.env.local +.env.development.local +.env.test.local +.env.production.local + +npm-debug.log* +yarn-debug.log* +yarn-error.log* diff --git a/react/Dockerfile b/frontend/Dockerfile similarity index 69% rename from react/Dockerfile rename to frontend/Dockerfile index 9873de1f..707160f3 100644 --- a/react/Dockerfile +++ b/frontend/Dockerfile @@ -1,8 +1,10 @@ FROM node:16.13 WORKDIR /web -COPY . /web/ +COPY package*.json /web/ RUN npm install --legacy-peer-deps +COPY . . + EXPOSE 3000 diff --git a/react/Dockerfile-Openshift b/frontend/Dockerfile-Openshift similarity index 95% rename from react/Dockerfile-Openshift rename to frontend/Dockerfile-Openshift index 04476d87..ed6deb62 100644 --- a/react/Dockerfile-Openshift +++ b/frontend/Dockerfile-Openshift @@ -14,7 +14,7 @@ RUN npm install RUN pwd && \ ls -l && \ ls -l node_modules -RUN NODE_ENV=production | npm run build +RUN yes | npm run build # Stage 2: Copy the JS React SPA into the Nginx HTML directory FROM artifacts.developer.gov.bc.ca/docker-remote/bitnami/nginx:1.24.0 diff --git a/frontend/README.md b/frontend/README.md new file mode 100644 index 00000000..58beeacc --- /dev/null +++ b/frontend/README.md @@ -0,0 +1,70 @@ +# Getting Started with Create React App + +This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). + +## Available Scripts + +In the project directory, you can run: + +### `npm start` + +Runs the app in the development mode.\ +Open [http://localhost:3000](http://localhost:3000) to view it in your browser. + +The page will reload when you make changes.\ +You may also see any lint errors in the console. + +### `npm test` + +Launches the test runner in the interactive watch mode.\ +See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. + +### `npm run build` + +Builds the app for production to the `build` folder.\ +It correctly bundles React in production mode and optimizes the build for the best performance. + +The build is minified and the filenames include the hashes.\ +Your app is ready to be deployed! + +See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. + +### `npm run eject` + +**Note: this is a one-way operation. Once you `eject`, you can't go back!** + +If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. + +Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own. + +You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it. + +## Learn More + +You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). + +To learn React, check out the [React documentation](https://reactjs.org/). + +### Code Splitting + +This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting) + +### Analyzing the Bundle Size + +This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size) + +### Making a Progressive Web App + +This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app) + +### Advanced Configuration + +This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration) + +### Deployment + +This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment) + +### `npm run build` fails to minify + +This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify) diff --git a/react/nginx.conf b/frontend/nginx.conf similarity index 100% rename from react/nginx.conf rename to frontend/nginx.conf diff --git a/react/package.json b/frontend/package.json similarity index 50% rename from react/package.json rename to frontend/package.json index 44edfd37..c444fd99 100644 --- a/react/package.json +++ b/frontend/package.json @@ -1,5 +1,5 @@ { - "name": "app", + "name": "frontend", "version": "0.2.0", "private": true, "dependencies": { @@ -16,44 +16,50 @@ "keycloak-js": "^15.0.2", "process": "^0.11.10", "prop-types": "^15.7.2", - "react": "^17.0.1", - "react-dom": "^17.0.1", + "@testing-library/jest-dom": "^5.17.0", + "@testing-library/react": "^13.4.0", + "@testing-library/user-event": "^13.5.0", + "react": "^18.2.0", + "react-dom": "^18.2.0", "react-dropzone": "^10.2.2", "react-router-dom": "^5.3.0", + "react-scripts": "5.0.1", "react-table": "^7.7.0", "regenerator-runtime": "^0.13.9", + "web-vitals": "^2.1.4", "stream-browserify": "^3.0.0", "util": "^0.12.4" }, "devDependencies": { - "@babel/core": "^7.15.8", - "@babel/preset-env": "^7.15.8", - "@babel/preset-react": "^7.14.5", - "@typescript-eslint/eslint-plugin": "^4.33.0", - "@typescript-eslint/parser": "^4.33.0", - "babel-loader": "^8.2.3", - "copy-webpack-plugin": "^9.0.1", "css-loader": "^5.2.7", - "eslint": "^7.32.0", - "eslint-config-airbnb": "^18.2.1", - "eslint-plugin-import": "^2.25.2", - "eslint-plugin-jsx-a11y": "^6.4.1", - "eslint-plugin-react": "^7.26.1", - "eslint-plugin-react-hooks": "^4.2.0", - "html-webpack-plugin": "^5.5.0", - "jest": "^27.3.1", "sass": "^1.43.4", "sass-loader": "^11.1.1", "source-map-loader": "^2.0.2", "style-loader": "^2.0.0", - "url-loader": "^4.1.1", - "webpack-cli": "^4.9.1", - "webpack": "^5.60.0", - "webpack-dev-server": "^3.11.2" + "url-loader": "^4.1.1" }, "scripts": { - "start": "node start", - "build": "webpack", - "test": "jest --coverage" + "start": "react-scripts start", + "build": "react-scripts build", + "test": "react-scripts test", + "eject": "react-scripts eject" + }, + "eslintConfig": { + "extends": [ + "react-app", + "react-app/jest" + ] + }, + "browserslist": { + "production": [ + ">0.2%", + "not dead", + "not op_mini all" + ], + "development": [ + "last 1 chrome version", + "last 1 firefox version", + "last 1 safari version" + ] } } diff --git a/frontend/public/favicon.ico b/frontend/public/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..a11777cc471a4344702741ab1c8a588998b1311a GIT binary patch literal 3870 zcma);c{J4h9>;%nil|2-o+rCuEF-(I%-F}ijC~o(k~HKAkr0)!FCj~d>`RtpD?8b; zXOC1OD!V*IsqUwzbMF1)-gEDD=A573Z-&G7^LoAC9|WO7Xc0Cx1g^Zu0u_SjAPB3vGa^W|sj)80f#V0@M_CAZTIO(t--xg= z!sii`1giyH7EKL_+Wi0ab<)&E_0KD!3Rp2^HNB*K2@PHCs4PWSA32*-^7d{9nH2_E zmC{C*N*)(vEF1_aMamw2A{ZH5aIDqiabnFdJ|y0%aS|64E$`s2ccV~3lR!u<){eS` z#^Mx6o(iP1Ix%4dv`t@!&Za-K@mTm#vadc{0aWDV*_%EiGK7qMC_(`exc>-$Gb9~W!w_^{*pYRm~G zBN{nA;cm^w$VWg1O^^<6vY`1XCD|s_zv*g*5&V#wv&s#h$xlUilPe4U@I&UXZbL z0)%9Uj&@yd03n;!7do+bfixH^FeZ-Ema}s;DQX2gY+7g0s(9;`8GyvPY1*vxiF&|w z>!vA~GA<~JUqH}d;DfBSi^IT*#lrzXl$fNpq0_T1tA+`A$1?(gLb?e#0>UELvljtQ zK+*74m0jn&)5yk8mLBv;=@}c{t0ztT<v;Avck$S6D`Z)^c0(jiwKhQsn|LDRY&w(Fmi91I7H6S;b0XM{e zXp0~(T@k_r-!jkLwd1_Vre^v$G4|kh4}=Gi?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I!id#5Z7B*O2=PsR0 zEvc|8{NS^)!d)MDX(97Xw}m&kEO@5jqRaDZ!+%`wYOI<23q|&js`&o4xvjP7D_xv@ z5hEwpsp{HezI9!~6O{~)lLR@oF7?J7i>1|5a~UuoN=q&6N}EJPV_GD`&M*v8Y`^2j zKII*d_@Fi$+i*YEW+Hbzn{iQk~yP z>7N{S4)r*!NwQ`(qcN#8SRQsNK6>{)X12nbF`*7#ecO7I)Q$uZsV+xS4E7aUn+U(K baj7?x%VD!5Cxk2YbYLNVeiXvvpMCWYo=by@ literal 0 HcmV?d00001 diff --git a/frontend/public/index.html b/frontend/public/index.html new file mode 100644 index 00000000..bc0e7679 --- /dev/null +++ b/frontend/public/index.html @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + <% if (process.env.NODE_ENV === 'production') { %> + + <% } %> + CTHUB + + + +
+ + + diff --git a/frontend/public/logo192.png b/frontend/public/logo192.png new file mode 100644 index 0000000000000000000000000000000000000000..fc44b0a3796c0e0a64c3d858ca038bd4570465d9 GIT binary patch literal 5347 zcmZWtbyO6NvR-oO24RV%BvuJ&=?+<7=`LvyB&A_#M7mSDYw1v6DJkiYl9XjT!%$dLEBTQ8R9|wd3008in6lFF3GV-6mLi?MoP_y~}QUnaDCHI#t z7w^m$@6DI)|C8_jrT?q=f8D?0AM?L)Z}xAo^e^W>t$*Y0KlT5=@bBjT9kxb%-KNdk zeOS1tKO#ChhG7%{ApNBzE2ZVNcxbrin#E1TiAw#BlUhXllzhN$qWez5l;h+t^q#Eav8PhR2|T}y5kkflaK`ba-eoE+Z2q@o6P$)=&` z+(8}+-McnNO>e#$Rr{32ngsZIAX>GH??tqgwUuUz6kjns|LjsB37zUEWd|(&O!)DY zQLrq%Y>)Y8G`yYbYCx&aVHi@-vZ3|ebG!f$sTQqMgi0hWRJ^Wc+Ibv!udh_r%2|U) zPi|E^PK?UE!>_4`f`1k4hqqj_$+d!EB_#IYt;f9)fBOumGNyglU(ofY`yHq4Y?B%- zp&G!MRY<~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4V0k4|L=uj!U{L+oLa(z#&iuhJr3-PjO3R z5s?=nn_5^*^Rawr>>Nr@K(jwkB#JK-=+HqwfdO<+P5byeim)wvqGlP-P|~Nse8=XF zz`?RYB|D6SwS}C+YQv+;}k6$-%D(@+t14BL@vM z2q%q?f6D-A5s$_WY3{^G0F131bbh|g!}#BKw=HQ7mx;Dzg4Z*bTLQSfo{ed{4}NZW zfrRm^Ca$rlE{Ue~uYv>R9{3smwATcdM_6+yWIO z*ZRH~uXE@#p$XTbCt5j7j2=86e{9>HIB6xDzV+vAo&B?KUiMP|ttOElepnl%|DPqL b{|{}U^kRn2wo}j7|0ATu<;8xA7zX}7|B6mN literal 0 HcmV?d00001 diff --git a/frontend/public/manifest.json b/frontend/public/manifest.json new file mode 100644 index 00000000..080d6c77 --- /dev/null +++ b/frontend/public/manifest.json @@ -0,0 +1,25 @@ +{ + "short_name": "React App", + "name": "Create React App Sample", + "icons": [ + { + "src": "favicon.ico", + "sizes": "64x64 32x32 24x24 16x16", + "type": "image/x-icon" + }, + { + "src": "logo192.png", + "type": "image/png", + "sizes": "192x192" + }, + { + "src": "logo512.png", + "type": "image/png", + "sizes": "512x512" + } + ], + "start_url": ".", + "display": "standalone", + "theme_color": "#000000", + "background_color": "#ffffff" +} diff --git a/frontend/public/robots.txt b/frontend/public/robots.txt new file mode 100644 index 00000000..e9e57dc4 --- /dev/null +++ b/frontend/public/robots.txt @@ -0,0 +1,3 @@ +# https://www.robotstxt.org/robotstxt.html +User-agent: * +Disallow: diff --git a/react/src/app/components/AlertDialog.js b/frontend/src/app/components/AlertDialog.js similarity index 100% rename from react/src/app/components/AlertDialog.js rename to frontend/src/app/components/AlertDialog.js diff --git a/react/src/App.js b/frontend/src/app/components/App.js similarity index 63% rename from react/src/App.js rename to frontend/src/app/components/App.js index 6ca2838f..3153bd5d 100644 --- a/react/src/App.js +++ b/frontend/src/app/components/App.js @@ -1,4 +1,3 @@ -import 'regenerator-runtime/runtime'; import React from 'react'; import { BrowserRouter as Router, @@ -6,15 +5,13 @@ import { Switch, } from 'react-router-dom'; -import settings from './app/settings'; -import IcbcDataRouter from './icbc_data/router'; -import UploadRouter from './uploads/router'; -import DashboardContainer from './dashboard/DashboardContainer'; -import useKeycloak from './app/utilities/useKeycloak' -import Login from './Login'; -import Layout from './app/components/Layout' - -const { ENABLE_KEYCLOAK } = settings; +import IcbcDataRouter from '../../icbc_data/router'; +import UploadRouter from '../../uploads/router'; +import DashboardContainer from '../../dashboard/DashboardContainer'; +import useKeycloak from '../utilities/useKeycloak' +import Login from './Login' +import Layout from './Layout' +import { ENABLE_KEYCLOAK } from '../../config'; const App = () => { const keycloak = useKeycloak() diff --git a/react/src/app/components/Footer.js b/frontend/src/app/components/Footer.js similarity index 100% rename from react/src/app/components/Footer.js rename to frontend/src/app/components/Footer.js diff --git a/react/src/app/components/Header.js b/frontend/src/app/components/Header.js similarity index 100% rename from react/src/app/components/Header.js rename to frontend/src/app/components/Header.js diff --git a/react/src/app/components/KeycloakProvider.js b/frontend/src/app/components/KeycloakProvider.js similarity index 72% rename from react/src/app/components/KeycloakProvider.js rename to frontend/src/app/components/KeycloakProvider.js index 6c9aba2b..269213e6 100644 --- a/react/src/app/components/KeycloakProvider.js +++ b/frontend/src/app/components/KeycloakProvider.js @@ -1,20 +1,19 @@ import React, { useState, useEffect } from 'react' import { KeycloakContext } from '../../contexts' -import settings from '../settings' +import { ENABLE_KEYCLOAK } from '../../config' const KeycloakProvider = ({authClient, initOptions, LoadingComponent, children}) => { - const keycloakEnabled = settings.ENABLE_KEYCLOAK - const [loading, setLoading] = useState(keycloakEnabled ? true : false) + const [loading, setLoading] = useState(ENABLE_KEYCLOAK ? true : false) const [keycloak, setKeycloak] = useState({}) useEffect(() => { - if (keycloakEnabled) { + if (ENABLE_KEYCLOAK) { authClient.init(initOptions).then(() => { setKeycloak(authClient) setLoading(false) }) } - }, [keycloakEnabled, authClient, initOptions]) + }, [authClient, initOptions]) if (loading) { return diff --git a/react/src/app/components/Layout.js b/frontend/src/app/components/Layout.js similarity index 100% rename from react/src/app/components/Layout.js rename to frontend/src/app/components/Layout.js diff --git a/react/src/app/components/Loading.js b/frontend/src/app/components/Loading.js similarity index 100% rename from react/src/app/components/Loading.js rename to frontend/src/app/components/Loading.js diff --git a/react/src/Login.js b/frontend/src/app/components/Login.js similarity index 94% rename from react/src/Login.js rename to frontend/src/app/components/Login.js index fa4cfae3..3e7f6f3f 100644 --- a/react/src/Login.js +++ b/frontend/src/app/components/Login.js @@ -1,6 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; -import useKeycloak from './app/utilities/useKeycloak'; +import useKeycloak from '../../app/utilities/useKeycloak'; const Login = (props) => { const { redirectUri } = props; diff --git a/react/src/app/components/Logout.js b/frontend/src/app/components/Logout.js similarity index 100% rename from react/src/app/components/Logout.js rename to frontend/src/app/components/Logout.js diff --git a/react/src/app/components/ReactTable.js b/frontend/src/app/components/ReactTable.js similarity index 100% rename from react/src/app/components/ReactTable.js rename to frontend/src/app/components/ReactTable.js diff --git a/react/src/app/components/ReactTablePagination.js b/frontend/src/app/components/ReactTablePagination.js similarity index 100% rename from react/src/app/components/ReactTablePagination.js rename to frontend/src/app/components/ReactTablePagination.js diff --git a/react/src/app/static/logo.png b/frontend/src/app/static/logo.png similarity index 100% rename from react/src/app/static/logo.png rename to frontend/src/app/static/logo.png diff --git a/react/src/app/styles/App.scss b/frontend/src/app/styles/App.scss similarity index 100% rename from react/src/app/styles/App.scss rename to frontend/src/app/styles/App.scss diff --git a/react/src/app/styles/FileUpload.scss b/frontend/src/app/styles/FileUpload.scss similarity index 100% rename from react/src/app/styles/FileUpload.scss rename to frontend/src/app/styles/FileUpload.scss diff --git a/react/src/app/styles/Footer.scss b/frontend/src/app/styles/Footer.scss similarity index 100% rename from react/src/app/styles/Footer.scss rename to frontend/src/app/styles/Footer.scss diff --git a/react/src/app/styles/Header.scss b/frontend/src/app/styles/Header.scss similarity index 100% rename from react/src/app/styles/Header.scss rename to frontend/src/app/styles/Header.scss diff --git a/react/src/app/styles/Login.scss b/frontend/src/app/styles/Login.scss similarity index 100% rename from react/src/app/styles/Login.scss rename to frontend/src/app/styles/Login.scss diff --git a/react/src/app/styles/ReactTable.scss b/frontend/src/app/styles/ReactTable.scss similarity index 100% rename from react/src/app/styles/ReactTable.scss rename to frontend/src/app/styles/ReactTable.scss diff --git a/react/src/app/styles/Roboto.scss b/frontend/src/app/styles/Roboto.scss similarity index 100% rename from react/src/app/styles/Roboto.scss rename to frontend/src/app/styles/Roboto.scss diff --git a/react/src/app/styles/Users.scss b/frontend/src/app/styles/Users.scss similarity index 100% rename from react/src/app/styles/Users.scss rename to frontend/src/app/styles/Users.scss diff --git a/react/src/app/styles/fonts/LICENSE.txt b/frontend/src/app/styles/fonts/LICENSE.txt similarity index 100% rename from react/src/app/styles/fonts/LICENSE.txt rename to frontend/src/app/styles/fonts/LICENSE.txt diff --git a/react/src/app/styles/fonts/Roboto-Bold.ttf b/frontend/src/app/styles/fonts/Roboto-Bold.ttf similarity index 100% rename from react/src/app/styles/fonts/Roboto-Bold.ttf rename to frontend/src/app/styles/fonts/Roboto-Bold.ttf diff --git a/react/src/app/styles/fonts/Roboto-BoldItalic.ttf b/frontend/src/app/styles/fonts/Roboto-BoldItalic.ttf similarity index 100% rename from react/src/app/styles/fonts/Roboto-BoldItalic.ttf rename to frontend/src/app/styles/fonts/Roboto-BoldItalic.ttf diff --git a/react/src/app/styles/fonts/Roboto-Italic.ttf b/frontend/src/app/styles/fonts/Roboto-Italic.ttf similarity index 100% rename from react/src/app/styles/fonts/Roboto-Italic.ttf rename to frontend/src/app/styles/fonts/Roboto-Italic.ttf diff --git a/react/src/app/styles/fonts/Roboto-Regular.ttf b/frontend/src/app/styles/fonts/Roboto-Regular.ttf similarity index 100% rename from react/src/app/styles/fonts/Roboto-Regular.ttf rename to frontend/src/app/styles/fonts/Roboto-Regular.ttf diff --git a/react/src/app/styles/images/BCID_H_rgb_pos.png b/frontend/src/app/styles/images/BCID_H_rgb_pos.png similarity index 100% rename from react/src/app/styles/images/BCID_H_rgb_pos.png rename to frontend/src/app/styles/images/BCID_H_rgb_pos.png diff --git a/react/src/app/styles/images/BCID_H_rgb_rev.png b/frontend/src/app/styles/images/BCID_H_rgb_rev.png similarity index 100% rename from react/src/app/styles/images/BCID_H_rgb_rev.png rename to frontend/src/app/styles/images/BCID_H_rgb_rev.png diff --git a/react/src/app/styles/images/BCID_V_rgb_pos.png b/frontend/src/app/styles/images/BCID_V_rgb_pos.png similarity index 100% rename from react/src/app/styles/images/BCID_V_rgb_pos.png rename to frontend/src/app/styles/images/BCID_V_rgb_pos.png diff --git a/react/src/app/styles/images/tof.jpg b/frontend/src/app/styles/images/tof.jpg similarity index 100% rename from react/src/app/styles/images/tof.jpg rename to frontend/src/app/styles/images/tof.jpg diff --git a/react/src/app/styles/index.scss b/frontend/src/app/styles/index.scss similarity index 100% rename from react/src/app/styles/index.scss rename to frontend/src/app/styles/index.scss diff --git a/react/src/app/styles/variables.scss b/frontend/src/app/styles/variables.scss similarity index 100% rename from react/src/app/styles/variables.scss rename to frontend/src/app/styles/variables.scss diff --git a/react/src/app/utilities/getFileSize.js b/frontend/src/app/utilities/getFileSize.js similarity index 100% rename from react/src/app/utilities/getFileSize.js rename to frontend/src/app/utilities/getFileSize.js diff --git a/react/src/app/utilities/props.js b/frontend/src/app/utilities/props.js similarity index 100% rename from react/src/app/utilities/props.js rename to frontend/src/app/utilities/props.js diff --git a/react/src/app/utilities/reactTable.js b/frontend/src/app/utilities/reactTable.js similarity index 100% rename from react/src/app/utilities/reactTable.js rename to frontend/src/app/utilities/reactTable.js diff --git a/react/src/app/utilities/useAxios.js b/frontend/src/app/utilities/useAxios.js similarity index 90% rename from react/src/app/utilities/useAxios.js rename to frontend/src/app/utilities/useAxios.js index 307a1275..1b932994 100644 --- a/react/src/app/utilities/useAxios.js +++ b/frontend/src/app/utilities/useAxios.js @@ -1,14 +1,14 @@ import axios from 'axios' -import settings from '../settings'; import useKeycloak from './useKeycloak' +import { API_BASE } from '../../config'; const useAxios = (useDefault = false, opts = {}) => { + const keycloak = useKeycloak() if (useDefault) { return axios.create(opts) } - const keycloak = useKeycloak() const instance = axios.create({ - baseURL: settings.API_BASE, + baseURL: API_BASE, ...opts, }) instance.interceptors.request.use(async (config) => { diff --git a/react/src/app/utilities/useKeycloak.js b/frontend/src/app/utilities/useKeycloak.js similarity index 100% rename from react/src/app/utilities/useKeycloak.js rename to frontend/src/app/utilities/useKeycloak.js diff --git a/frontend/src/config.js b/frontend/src/config.js new file mode 100644 index 00000000..5985d014 --- /dev/null +++ b/frontend/src/config.js @@ -0,0 +1,19 @@ +export const ENABLE_KEYCLOAK = window.cthub_config + ? window.cthub_config.REACT_APP_ENABLE_KEYCLOAK + : process.env.REACT_APP_ENABLE_KEYCLOAK; + +export const API_BASE = window.cthub_config + ? window.cthub_config.REACT_APP_API_BASE + : process.env.REACT_APP_API_BASE; + +export const KEYCLOAK_CLIENT_ID = window.cthub_config + ? window.cthub_config.REACT_APP_KEYCLOAK_CLIENT_ID + : process.env.REACT_APP_KEYCLOAK_CLIENT_ID; + +export const KEYCLOAK_REALM = window.cthub_config + ? window.cthub_config.REACT_APP_KEYCLOAK_REALM + : process.env.REACT_APP_KEYCLOAK_REALM; + +export const KEYCLOAK_URL = window.cthub_config + ? window.cthub_config.REACT_APP_KEYCLOAK_URL + : process.env.REACT_APP_KEYCLOAK_URL; diff --git a/react/src/contexts.js b/frontend/src/contexts.js similarity index 100% rename from react/src/contexts.js rename to frontend/src/contexts.js diff --git a/react/src/dashboard/DashboardContainer.js b/frontend/src/dashboard/DashboardContainer.js similarity index 100% rename from react/src/dashboard/DashboardContainer.js rename to frontend/src/dashboard/DashboardContainer.js diff --git a/react/src/dashboard/router.js b/frontend/src/dashboard/router.js similarity index 100% rename from react/src/dashboard/router.js rename to frontend/src/dashboard/router.js diff --git a/react/src/icbc_data/IcbcDataContainer.js b/frontend/src/icbc_data/IcbcDataContainer.js similarity index 100% rename from react/src/icbc_data/IcbcDataContainer.js rename to frontend/src/icbc_data/IcbcDataContainer.js diff --git a/react/src/icbc_data/components/IcbcDataTable.js b/frontend/src/icbc_data/components/IcbcDataTable.js similarity index 100% rename from react/src/icbc_data/components/IcbcDataTable.js rename to frontend/src/icbc_data/components/IcbcDataTable.js diff --git a/react/src/icbc_data/router.js b/frontend/src/icbc_data/router.js similarity index 100% rename from react/src/icbc_data/router.js rename to frontend/src/icbc_data/router.js diff --git a/react/src/icbc_data/routes.js b/frontend/src/icbc_data/routes.js similarity index 100% rename from react/src/icbc_data/routes.js rename to frontend/src/icbc_data/routes.js diff --git a/react/src/index.js b/frontend/src/index.js similarity index 69% rename from react/src/index.js rename to frontend/src/index.js index 504adedd..667ea39e 100644 --- a/react/src/index.js +++ b/frontend/src/index.js @@ -3,12 +3,17 @@ import ReactDOM from 'react-dom' import Keycloak from 'keycloak-js'; import KeycloakProvider from './app/components/KeycloakProvider'; -import App from './App'; +import App from './app/components/App'; import Loading from './app/components/Loading'; +import { KEYCLOAK_CLIENT_ID, KEYCLOAK_REALM, KEYCLOAK_URL } from './config'; import './app/styles/index.scss'; -const keycloak = new Keycloak() +const keycloak = new Keycloak({ + clientId: KEYCLOAK_CLIENT_ID, + realm: KEYCLOAK_REALM, + url: KEYCLOAK_URL +}) const keycloakInitOptions = { onLoad: 'check-sso', pkceMethod: 'S256' diff --git a/react/src/uploads/UploadContainer.js b/frontend/src/uploads/UploadContainer.js similarity index 100% rename from react/src/uploads/UploadContainer.js rename to frontend/src/uploads/UploadContainer.js diff --git a/react/src/uploads/components/FileDrop.js b/frontend/src/uploads/components/FileDrop.js similarity index 100% rename from react/src/uploads/components/FileDrop.js rename to frontend/src/uploads/components/FileDrop.js diff --git a/react/src/uploads/components/FileDropArea.js b/frontend/src/uploads/components/FileDropArea.js similarity index 100% rename from react/src/uploads/components/FileDropArea.js rename to frontend/src/uploads/components/FileDropArea.js diff --git a/react/src/uploads/components/UploadPage.js b/frontend/src/uploads/components/UploadPage.js similarity index 100% rename from react/src/uploads/components/UploadPage.js rename to frontend/src/uploads/components/UploadPage.js diff --git a/react/src/uploads/router.js b/frontend/src/uploads/router.js similarity index 100% rename from react/src/uploads/router.js rename to frontend/src/uploads/router.js diff --git a/react/src/uploads/routes.js b/frontend/src/uploads/routes.js similarity index 100% rename from react/src/uploads/routes.js rename to frontend/src/uploads/routes.js diff --git a/react/src/users/UsersContainer.js b/frontend/src/users/UsersContainer.js similarity index 100% rename from react/src/users/UsersContainer.js rename to frontend/src/users/UsersContainer.js diff --git a/react/src/users/components/UsersPage.js b/frontend/src/users/components/UsersPage.js similarity index 100% rename from react/src/users/components/UsersPage.js rename to frontend/src/users/components/UsersPage.js diff --git a/react/src/users/routes.js b/frontend/src/users/routes.js similarity index 100% rename from react/src/users/routes.js rename to frontend/src/users/routes.js diff --git a/react/.eslintrc.js b/react/.eslintrc.js deleted file mode 100644 index 9343ebd6..00000000 --- a/react/.eslintrc.js +++ /dev/null @@ -1,30 +0,0 @@ -module.exports = { - env: { - browser: true, - es2021: true, - }, - extends: [ - 'plugin:react/recommended', - 'airbnb', - ], - parserOptions: { - ecmaFeatures: { - jsx: true, - }, - ecmaVersion: 12, - sourceType: 'module', - }, - plugins: [ - 'react', - ], - rules: { - 'no-use-before-define': 'off', - 'linebreak-style': 0, - 'react/jsx-filename-extension': [1, { extensions: ['.js', '.jsx'] }], - 'react/jsx-props-no-spreading': [0, { - custom: 'ignore', - html: 'ignore', - explicitSpread: 'ignore', - }], - }, -}; diff --git a/react/README.md b/react/README.md deleted file mode 100644 index 9301f3b6..00000000 --- a/react/README.md +++ /dev/null @@ -1 +0,0 @@ -# Frontend \ No newline at end of file diff --git a/react/public/favicon.ico b/react/public/favicon.ico deleted file mode 100644 index 1841396d21ce974cdec16f7414c88683cd36af16..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 22486 zcmeHP3w+Mi|Nm%0{Y#rtDHTchOGGO*gp8KyX)AlyYBgz1S(xaC=tUx`Q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SQDhXF z=a2rvj!pCVh40t{G&lgBlKs#0+z!3*5gcGsrrreK4m>d>@+R2iqyHA>qostW4cmAn z@~{5uEG2w?*x9RBAYa1Rs%YTe59J4!jBpA&qs4+ zeD4R%rsMjCzaJp{WF>P*=puN?x8ULXRjFzSn6iF^KCmTJB2&`)roe+U`-2I+;Tb$k zsA1#7!;3;3iC8z-OB9dTWbx~m<04lOkH1l%`NJZQ6M3D~*KiP;w#tVFmV|;|MWLQA zO7=VabCtuF-rpgIP-g%L(?#dF0)4MD?U{NSzFo}Sj_Xs3p3`ZhkW)T1g-yEWyKIVl z882l_uHfYD3?3IFEXNM`w|@$s!eh5vN5gOH{r5#&7!QQnmSLBRH&O}1?pEe0W{Rhb_qXV-!5xLNK>uy1DAYis$(^ElUJuM-)v+&|>5^((yS3&}l1 z?gBk=9>LCA?~nHWZ{M9{e}>JsJ{#rC6uktIBg;KUwl6eGm5Bx?kQ)L)sC1MOH3%L6K34H|Lwc9F8;G zKC3-@mTAM_AuVfKL7pNy1EOanvQ3=bZd^@SQ`dxcx~FaV7H8KqeKnz->)HnXaPa>* C+3a-y diff --git a/react/public/index.html b/react/public/index.html deleted file mode 100644 index 1fc8b0df..00000000 --- a/react/public/index.html +++ /dev/null @@ -1,14 +0,0 @@ - - - - App - - - - - - -
- - - \ No newline at end of file diff --git a/react/src/app/settings.js b/react/src/app/settings.js deleted file mode 100644 index 0b1fd4cc..00000000 --- a/react/src/app/settings.js +++ /dev/null @@ -1,11 +0,0 @@ -/* global - __API_BASE__, - __ENABLE_KEYCLOAK__, -*/ - -const settings = { - API_BASE: __API_BASE__, - ENABLE_KEYCLOAK: __ENABLE_KEYCLOAK__, -}; - -export default settings; diff --git a/react/src/keycloak-source.json b/react/src/keycloak-source.json deleted file mode 100644 index 2659d6d3..00000000 --- a/react/src/keycloak-source.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "confidential-port": 0, - "auth-server-url": "https://dev.oidc.gov.bc.ca/auth/", - "realm": "onestopauth", - "ssl-required": "external", - "public-client": true, - "resource": "clean-transportation-data-hub-595" -} \ No newline at end of file diff --git a/react/start.js b/react/start.js deleted file mode 100644 index 6e828a8d..00000000 --- a/react/start.js +++ /dev/null @@ -1,32 +0,0 @@ -const Webpack = require('webpack'); -const WebpackDevServer = require('webpack-dev-server'); -const path = require('path'); - -const webpackConfig = require('./webpack.config'); - -const serverOptions = { - contentBase: path.join(__dirname, 'public'), - publicPath: '/', - index: '/index.html', - disableHostCheck: true, - historyApiFallback: { - verbose: true, - index: '/index.html', - rewrites: [{ - from: /\/api/, - to: '/api', - }], - }, - compress: true, - hot: true, - watchOptions: { - ignored: ['node_modules'], - poll: 1500, - }, -}; - -WebpackDevServer.addDevServerEntrypoints(webpackConfig, serverOptions); -const compiler = Webpack(webpackConfig); -const devServer = new WebpackDevServer(compiler, serverOptions); - -devServer.listen(3000, '0.0.0.0', () => {}); diff --git a/react/webpack.config.js b/react/webpack.config.js deleted file mode 100644 index eed6da6c..00000000 --- a/react/webpack.config.js +++ /dev/null @@ -1,114 +0,0 @@ -const Webpack = require('webpack'); -const path = require('path'); -const CopyWebpackPlugin = require('copy-webpack-plugin'); - -const isDevelopment = 'API_BASE' in process.env && process.env.API_BASE === 'http://localhost:8000'; - -module.exports = { - devServer: { - historyApiFallback: true, - hot: isDevelopment, - inline: isDevelopment - }, - devtool: 'source-map', - resolve: { - alias: { - process: 'process/browser', - }, - fallback: { - crypto: require.resolve('crypto-browserify'), - stream: require.resolve('stream-browserify'), - util: require.resolve('util/'), - }, - }, - entry: path.resolve(__dirname, 'src', 'index.js'), - mode: isDevelopment ? 'development' : 'production', - module: { - rules: [{ - enforce: 'pre', - test: /\.js$/, - use: [{ - loader: 'source-map-loader', - options: { - filterSourceMappingUrl: (url, resourcePath) => { - if (resourcePath.includes('/node_modules/')) { - return false; - } - - return true; - }, - }, - }], - }, { - exclude: /node_modules/, - include: path.resolve(__dirname, 'src'), - test: /\.(jsx|js)$/, - use: [{ - loader: 'babel-loader', - options: { - presets: [ - ['@babel/preset-env', { - targets: 'defaults', - }], - '@babel/preset-react', - ], - }, - }], - }, { - test: /\.css$/i, - use: ['style-loader', 'css-loader'], - }, { - test: /\.s[ac]ss$/i, - use: ['style-loader', 'css-loader', 'sass-loader'], - }, { - test: /\.(otf|eot|svg|png|ttf|woff|jpe?g|woff2)$/i, - use: [{ - loader: 'url-loader', - }], - }], - }, - output: { - crossOriginLoading: 'anonymous', - filename: 'static/bundle.js', - path: path.resolve(__dirname, 'public'), - publicPath: '/', - }, - plugins: [ - new Webpack.ProvidePlugin({ - Buffer: ['buffer', 'Buffer'], - process: 'process/browser', - }), - new CopyWebpackPlugin({ - patterns: [{ - from: './src/keycloak-source.json', - to: './keycloak.json', - force: true, - transform(content) { - const keycloak = JSON.parse(content.toString()); - - if ('KEYCLOAK_CLIENT_ID' in process.env) { - keycloak.resource = process.env.KEYCLOAK_CLIENT_ID; - } - - if ('KEYCLOAK_REALM' in process.env) { - keycloak.realm = process.env.KEYCLOAK_REALM; - } - - if ('KEYCLOAK_URL' in process.env) { - keycloak['auth-server-url'] = process.env.KEYCLOAK_URL; - - if (process.env.KEYCLOAK_URL === 'http://keycloak:8080/auth/') { - keycloak['ssl-required'] = 'none'; - } - } - - return JSON.stringify(keycloak, null, 2); - }, - }], - }), - new Webpack.DefinePlugin({ - __API_BASE__: 'API_BASE' in process.env ? JSON.stringify(process.env.API_BASE) : JSON.stringify('/'), - __ENABLE_KEYCLOAK__: 'ENABLE_KEYCLOAK' in process.env ? process.env.ENABLE_KEYCLOAK === 'true' : false, - }), - ], -};