From 5a7d208c08e216fb09aeeeac5687b59e02e38503 Mon Sep 17 00:00:00 2001 From: Adam Kendis Date: Tue, 30 Jun 2020 16:42:40 -0700 Subject: [PATCH 1/7] Deleted obsolete files and moved architecture diagram --- Dockerfile | 16 ---------------- .../Resources/311-system-architecture.png | Bin copyEnv.sh | 7 ------- server.js | 16 ---------------- 4 files changed, 39 deletions(-) delete mode 100644 Dockerfile rename 311-system-architecture.png => Documentation/Resources/311-system-architecture.png (100%) delete mode 100644 copyEnv.sh delete mode 100644 server.js diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 8365ee4d4..000000000 --- a/Dockerfile +++ /dev/null @@ -1,16 +0,0 @@ -FROM node:12.16.1-alpine -RUN npm config set unsafe-perm true -RUN npm install --silent webpack webpack-cli -g -WORKDIR /tmp -COPY package.json /tmp/ -RUN npm config set registry http://registry.npmjs.org/ && npm install --silent -WORKDIR /usr/src/app -COPY . /usr/src/app/ -RUN cp -a /tmp/node_modules /usr/src/app/ -#RUN webpack -ENV NODE_ENV=production -ENV PORT=3000 -ENV REACT_APP_MAPBOX_TOKEN=REDACTED -RUN ls -CMD [ "sh", "copyEnv.sh"] -EXPOSE 3000 diff --git a/311-system-architecture.png b/Documentation/Resources/311-system-architecture.png similarity index 100% rename from 311-system-architecture.png rename to Documentation/Resources/311-system-architecture.png diff --git a/copyEnv.sh b/copyEnv.sh deleted file mode 100644 index e6ecf2323..000000000 --- a/copyEnv.sh +++ /dev/null @@ -1,7 +0,0 @@ -echo REACT_APP_MAPBOX_TOKEN=$REACT_APP_MAPBOX_TOKEN > .env -echo DB_URL=$DB_URL >> .env -echo MIXPANEL_ENABLED=$MIXPANEL_ENABLED >> .env -echo MIXPANEL_TOKEN_PROD=$MIXPANEL_TOKEN_PROD >> .env -echo MIXPANEL_TOKEN_DEV=$MIXPANEL_TOKEN_DEV >> .env -webpack -node server.js diff --git a/server.js b/server.js deleted file mode 100644 index b56eb49ad..000000000 --- a/server.js +++ /dev/null @@ -1,16 +0,0 @@ -const express = require('express'); -const path = require('path'); - -const port = process.env.PORT || 3000; -const app = express(); - -// the __dirname is the current directory from where the script is running -app.use(express.static(path.join(__dirname, '/dist'))); - -// send the user to index html page inspite of the url -app.get('*', (req, res) => { - res.sendFile(path.resolve(__dirname, 'public/index.html')); -}); - -console.log(`Listening on port ${port}`); -app.listen(port); From ff25939b8a95a10cf78c134185748c9eaccc015f Mon Sep 17 00:00:00 2001 From: Adam Kendis Date: Tue, 30 Jun 2020 16:53:02 -0700 Subject: [PATCH 2/7] Renamed frontend env vars --- .github/workflows/Continuous_Deployment_Frontend_Dev.yml | 4 ++-- .github/workflows/Continuous_Deployment_Frontend_Prod.yml | 4 ++-- .github/workflows/Continuous_Integration_Frontend.yml | 4 ++-- Orchestration/docker-compose-example.yml | 4 ++-- bin/api-test/index.js | 2 +- bin/checkEnv.js | 7 ++++--- .example.env => src/.example.env | 4 ++-- src/components/PinMap/PinMap.jsx | 4 ++-- src/redux/sagas/comparisonData.js | 2 +- src/redux/sagas/data.js | 2 +- src/redux/sagas/metadata.js | 2 +- webpack.config.js | 4 +++- 12 files changed, 23 insertions(+), 20 deletions(-) rename .example.env => src/.example.env (61%) diff --git a/.github/workflows/Continuous_Deployment_Frontend_Dev.yml b/.github/workflows/Continuous_Deployment_Frontend_Dev.yml index 473974c17..c32a950be 100644 --- a/.github/workflows/Continuous_Deployment_Frontend_Dev.yml +++ b/.github/workflows/Continuous_Deployment_Frontend_Dev.yml @@ -19,8 +19,8 @@ jobs: run: npm install - name: Setup environment run: | - echo REACT_APP_MAPBOX_TOKEN=${{ secrets.MAPBOX_TOKEN }} > .env - echo DB_URL=${{ secrets.API_URL_DEV }} >> .env + echo MAPBOX_TOKEN=${{ secrets.MAPBOX_TOKEN }} > .env + echo API_URL=${{ secrets.API_URL_DEV }} >> .env echo MIXPANEL_ENABLED=${{ secrets.MIXPANEL_ENABLED }} >> .env echo MIXPANEL_TOKEN_PROD=${{ secrets.MIXPANEL_TOKEN_PROD }} >> .env echo MIXPANEL_TOKEN_DEV=${{ secrets.MIXPANEL_TOKEN_DEV }} >> .env diff --git a/.github/workflows/Continuous_Deployment_Frontend_Prod.yml b/.github/workflows/Continuous_Deployment_Frontend_Prod.yml index 504601344..a8e42518e 100644 --- a/.github/workflows/Continuous_Deployment_Frontend_Prod.yml +++ b/.github/workflows/Continuous_Deployment_Frontend_Prod.yml @@ -19,8 +19,8 @@ jobs: run: npm install - name: Setup environment run: | - echo REACT_APP_MAPBOX_TOKEN=${{ secrets.MAPBOX_TOKEN }} > .env - echo DB_URL=${{ secrets.API_URL_PROD }} >> .env + echo MAPBOX_TOKEN=${{ secrets.MAPBOX_TOKEN }} > .env + echo API_URL=${{ secrets.API_URL_PROD }} >> .env echo MIXPANEL_ENABLED=${{ secrets.MIXPANEL_ENABLED }} >> .env echo MIXPANEL_TOKEN_PROD=${{ secrets.MIXPANEL_TOKEN_PROD }} >> .env echo MIXPANEL_TOKEN_DEV=${{ secrets.MIXPANEL_TOKEN_DEV }} >> .env diff --git a/.github/workflows/Continuous_Integration_Frontend.yml b/.github/workflows/Continuous_Integration_Frontend.yml index 289b0463a..70e91551a 100644 --- a/.github/workflows/Continuous_Integration_Frontend.yml +++ b/.github/workflows/Continuous_Integration_Frontend.yml @@ -16,8 +16,8 @@ jobs: run: npm run lint - name: Setup environment run: | - echo REACT_APP_MAPBOX_TOKEN=${{ secrets.MAPBOX_TOKEN }} > .env - echo DB_URL=${{ secrets.API_URL_PROD }} >> .env + echo MAPBOX_TOKEN=${{ secrets.MAPBOX_TOKEN }} > .env + echo API_URL=${{ secrets.API_URL_PROD }} >> .env echo MIXPANEL_ENABLED=${{ secrets.MIXPANEL_ENABLED }} >> .env echo MIXPANEL_TOKEN_PROD=${{ secrets.MIXPANEL_TOKEN_PROD }} >> .env echo MIXPANEL_TOKEN_DEV=${{ secrets.MIXPANEL_TOKEN_DEV }} >> .env diff --git a/Orchestration/docker-compose-example.yml b/Orchestration/docker-compose-example.yml index 09d27bcf7..94e2b02ab 100644 --- a/Orchestration/docker-compose-example.yml +++ b/Orchestration/docker-compose-example.yml @@ -29,8 +29,8 @@ services: restart: always container_name: "311-frontend" environment: - REACT_APP_MAPBOX_TOKEN: REDACTED - DB_URL: http://localhost:5000 + MAPBOX_TOKEN: REDACTED + API_URL: http://localhost:5000 MIXPANEL_ENABLED: -1 MIXPANEL_TOKEN_PROD: REDACTED MIXPANEL_TOKEN_DEV: REDACTED diff --git a/bin/api-test/index.js b/bin/api-test/index.js index 1e6b27890..b0560d952 100644 --- a/bin/api-test/index.js +++ b/bin/api-test/index.js @@ -4,7 +4,7 @@ const tests = require('./tests'); ////////////////// CONFIG ///////////////////// -const API_URL = process.env.DB_URL; +const { API_URL } = process.env; const CALLS_PER_TEST = 5; ////////////////// HELPERS //////////////////// diff --git a/bin/checkEnv.js b/bin/checkEnv.js index f659a6ca1..be5fa3d6b 100644 --- a/bin/checkEnv.js +++ b/bin/checkEnv.js @@ -2,6 +2,7 @@ // verifies that the .env file contains all the keys in .example.env const fs = require('fs'); +const path = require('path'); const dotenv = require('dotenv'); function getKeys(fileName) { @@ -13,9 +14,9 @@ function getKeys(fileName) { } } -const envKeys = getKeys('.env'), - exampleKeys = getKeys('.example.env'), - missingKeys = exampleKeys.filter(key => !envKeys.includes(key)); +const envKeys = getKeys(path.resolve(__dirname, '../src/.env')), + exampleKeys = getKeys(path.resolve(__dirname, '../src/.example.env')), + missingKeys = exampleKeys.filter(key => !envKeys.includes(key)); if (missingKeys.length > 0) { console.error('You are missing these keys in your .env file:', missingKeys, '\n'); diff --git a/.example.env b/src/.example.env similarity index 61% rename from .example.env rename to src/.example.env index fc076d724..9e2cde45c 100644 --- a/.example.env +++ b/src/.example.env @@ -1,5 +1,5 @@ -REACT_APP_MAPBOX_TOKEN=REDACTED -DB_URL=REDACTED +MAPBOX_TOKEN=REDACTED +API_URL=REDACTED MIXPANEL_ENABLED=-1 MIXPANEL_TOKEN_PROD=REDACTED MIXPANEL_TOKEN_DEV=REDACTED diff --git a/src/components/PinMap/PinMap.jsx b/src/components/PinMap/PinMap.jsx index bc42cb5db..ed7546c0b 100644 --- a/src/components/PinMap/PinMap.jsx +++ b/src/components/PinMap/PinMap.jsx @@ -44,8 +44,8 @@ class PinMap extends Component { this.state = { position: [34.0094213, -118.6008506], zoom: 10, - mapUrl: `https://api.mapbox.com/v4/mapbox.streets/{z}/{x}/{y}.png?access_token=${process.env.REACT_APP_MAPBOX_TOKEN}`, - satelliteUrl: `https://api.mapbox.com/styles/v1/mapbox/satellite-streets-v11/tiles/{z}/{x}/{y}?access_token=${process.env.REACT_APP_MAPBOX_TOKEN}`, + mapUrl: `https://api.mapbox.com/v4/mapbox.streets/{z}/{x}/{y}.png?access_token=${process.env.MAPBOX_TOKEN}`, + satelliteUrl: `https://api.mapbox.com/styles/v1/mapbox/satellite-streets-v11/tiles/{z}/{x}/{y}?access_token=${process.env.MAPBOX_TOKEN}`, geoJSON: ncOverlay, bounds: null, ready: false, diff --git a/src/redux/sagas/comparisonData.js b/src/redux/sagas/comparisonData.js index 31851bce3..22f493dc1 100644 --- a/src/redux/sagas/comparisonData.js +++ b/src/redux/sagas/comparisonData.js @@ -20,7 +20,7 @@ import { /* /////////// INDIVIDUAL API CALLS /////////// */ -const BASE_URL = process.env.DB_URL; +const BASE_URL = process.env.API_URL; function* getCountsComparison(filters) { const url = `${BASE_URL}/comparison/counts`; diff --git a/src/redux/sagas/data.js b/src/redux/sagas/data.js index a044101ee..770af4a13 100644 --- a/src/redux/sagas/data.js +++ b/src/redux/sagas/data.js @@ -31,7 +31,7 @@ import { /* ////////////////// API CALLS //////////////// */ -const BASE_URL = process.env.DB_URL; +const BASE_URL = process.env.API_URL; /* //// MAP //// */ diff --git a/src/redux/sagas/metadata.js b/src/redux/sagas/metadata.js index 473d146b9..38758f9d9 100644 --- a/src/redux/sagas/metadata.js +++ b/src/redux/sagas/metadata.js @@ -12,7 +12,7 @@ import { } from '../reducers/metadata'; function* getMetadata() { - const url = `${process.env.DB_URL}/status/api`; + const url = `${process.env.API_URL}/status/api`; try { const { data } = yield call(axios.get, url); yield put(getMetadataSuccess(data)); diff --git a/webpack.config.js b/webpack.config.js index f2f27735b..b24494b64 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -72,7 +72,9 @@ module.exports = { ], }, plugins: [ - new Dotenv(), + new Dotenv({ + path: 'src/.env', + }), new HtmlWebpackPlugin({ template: './public/index.html', title: '311-Data', From 2fb31fda0ba4a8316c819f90e41cd4ac5bb84fcf Mon Sep 17 00:00:00 2001 From: Adam Kendis Date: Tue, 30 Jun 2020 17:17:18 -0700 Subject: [PATCH 3/7] Moved map tileset urls to .env --- Orchestration/docker-compose-example.yml | 2 +- src/.example.env | 4 +++- src/components/PinMap/PinMap.jsx | 12 ++++++------ src/utils/Mixpanel.js | 2 +- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/Orchestration/docker-compose-example.yml b/Orchestration/docker-compose-example.yml index 94e2b02ab..ae1219764 100644 --- a/Orchestration/docker-compose-example.yml +++ b/Orchestration/docker-compose-example.yml @@ -31,7 +31,7 @@ services: environment: MAPBOX_TOKEN: REDACTED API_URL: http://localhost:5000 - MIXPANEL_ENABLED: -1 + MIXPANEL_ENABLED: 0 MIXPANEL_TOKEN_PROD: REDACTED MIXPANEL_TOKEN_DEV: REDACTED ports: diff --git a/src/.example.env b/src/.example.env index 9e2cde45c..48471e088 100644 --- a/src/.example.env +++ b/src/.example.env @@ -1,5 +1,7 @@ MAPBOX_TOKEN=REDACTED +MAPBOX_STREETS_URL=https://api.mapbox.com/styles/v1/mapbox/streets-v11/tiles/{z}/{x}/{y} +MAPBOX_SATELLITE_URL=https://api.mapbox.com/styles/v1/mapbox/satellite-streets-v11/tiles/{z}/{x}/{y} API_URL=REDACTED -MIXPANEL_ENABLED=-1 +MIXPANEL_ENABLED=0 MIXPANEL_TOKEN_PROD=REDACTED MIXPANEL_TOKEN_DEV=REDACTED diff --git a/src/components/PinMap/PinMap.jsx b/src/components/PinMap/PinMap.jsx index ed7546c0b..f50290ee9 100644 --- a/src/components/PinMap/PinMap.jsx +++ b/src/components/PinMap/PinMap.jsx @@ -44,8 +44,8 @@ class PinMap extends Component { this.state = { position: [34.0094213, -118.6008506], zoom: 10, - mapUrl: `https://api.mapbox.com/v4/mapbox.streets/{z}/{x}/{y}.png?access_token=${process.env.MAPBOX_TOKEN}`, - satelliteUrl: `https://api.mapbox.com/styles/v1/mapbox/satellite-streets-v11/tiles/{z}/{x}/{y}?access_token=${process.env.MAPBOX_TOKEN}`, + streetsLayerUrl: `${process.env.MAPBOX_STREETS_URL}?access_token=${process.env.MAPBOX_TOKEN}`, + satelliteLayerUrl: `${process.env.MAPBOX_SATELLITE_URL}?access_token=${process.env.MAPBOX_TOKEN}`, geoJSON: ncOverlay, bounds: null, ready: false, @@ -223,8 +223,8 @@ class PinMap extends Component { const { position, zoom, - mapUrl, - satelliteUrl, + streetsLayerUrl, + satelliteLayerUrl, bounds, geoJSON, width, @@ -274,13 +274,13 @@ class PinMap extends Component { > diff --git a/src/utils/Mixpanel.js b/src/utils/Mixpanel.js index 83b8c18b7..26f8ec26c 100644 --- a/src/utils/Mixpanel.js +++ b/src/utils/Mixpanel.js @@ -5,7 +5,7 @@ const token = envCheck ? process.env.MIXPANEL_TOKEN_PROD : process.env.MIXPANEL_ // Set MIXPANEL_ENABLED env variable to: // 1 or greater to enable Mixpanel logging -// -1 to disable Mixpanel logging +// 0 to disable Mixpanel logging const mixpanelEnabled = process.env.MIXPANEL_ENABLED > 0; if (mixpanelEnabled) { From 9b8295d6ea0fd435197eef40fa04c7ccb6d4a9d7 Mon Sep 17 00:00:00 2001 From: Adam Kendis Date: Tue, 30 Jun 2020 17:35:19 -0700 Subject: [PATCH 4/7] Moved old public images to Documentation. Deleted manifest.json and old favicon --- .../Resources}/candlestick.png | Bin .../Resources}/frequency.svg | 0 {public => Documentation/Resources}/heatmap.png | Bin {public => Documentation/Resources}/pinmap.png | Bin .../Resources}/timetoclose.svg | 0 public/favicon.ico | Bin 3870 -> 0 bytes public/manifest.json | 15 --------------- 7 files changed, 15 deletions(-) rename {public => Documentation/Resources}/candlestick.png (100%) rename {public => Documentation/Resources}/frequency.svg (100%) rename {public => Documentation/Resources}/heatmap.png (100%) rename {public => Documentation/Resources}/pinmap.png (100%) rename {public => Documentation/Resources}/timetoclose.svg (100%) delete mode 100644 public/favicon.ico delete mode 100644 public/manifest.json diff --git a/public/candlestick.png b/Documentation/Resources/candlestick.png similarity index 100% rename from public/candlestick.png rename to Documentation/Resources/candlestick.png diff --git a/public/frequency.svg b/Documentation/Resources/frequency.svg similarity index 100% rename from public/frequency.svg rename to Documentation/Resources/frequency.svg diff --git a/public/heatmap.png b/Documentation/Resources/heatmap.png similarity index 100% rename from public/heatmap.png rename to Documentation/Resources/heatmap.png diff --git a/public/pinmap.png b/Documentation/Resources/pinmap.png similarity index 100% rename from public/pinmap.png rename to Documentation/Resources/pinmap.png diff --git a/public/timetoclose.svg b/Documentation/Resources/timetoclose.svg similarity index 100% rename from public/timetoclose.svg rename to Documentation/Resources/timetoclose.svg diff --git a/public/favicon.ico b/public/favicon.ico deleted file mode 100644 index a11777cc471a4344702741ab1c8a588998b1311a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 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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X?Wn*!ROX ztd54huAk&mFBemMooL33RV-*1f0Q3_(7hl$<#*|WF9P!;r;4_+X~k~uKEqdzZ$5Al zV63XN@)j$FN#cCD;ek1R#l zv%pGrhB~KWgoCj%GT?%{@@o(AJGt*PG#l3i>lhmb_twKH^EYvacVY-6bsCl5*^~L0 zonm@lk2UvvTKr2RS%}T>^~EYqdL1q4nD%0n&Xqr^cK^`J5W;lRRB^R-O8b&HENO||mo0xaD+S=I8RTlIfVgqN@SXDr2&-)we--K7w= zJVU8?Z+7k9dy;s;^gDkQa`0nz6N{T?(A&Iz)2!DEecLyRa&FI!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@ diff --git a/public/manifest.json b/public/manifest.json deleted file mode 100644 index 1f2f141fa..000000000 --- a/public/manifest.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "short_name": "React App", - "name": "Create React App Sample", - "icons": [ - { - "src": "favicon.ico", - "sizes": "64x64 32x32 24x24 16x16", - "type": "image/x-icon" - } - ], - "start_url": ".", - "display": "standalone", - "theme_color": "#000000", - "background_color": "#ffffff" -} From 1e725677a35618f47104c71b2ddd2082a584bbd5 Mon Sep 17 00:00:00 2001 From: Adam Kendis Date: Tue, 30 Jun 2020 17:35:55 -0700 Subject: [PATCH 5/7] Added favicon --- public/favicon.png | Bin 0 -> 1782 bytes public/index.html | 1 + webpack.config.js | 1 + 3 files changed, 2 insertions(+) create mode 100644 public/favicon.png diff --git a/public/favicon.png b/public/favicon.png new file mode 100644 index 0000000000000000000000000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g&pa`On)|nfYjj z(omV^^?C4ILv*3goEdkJVMM(aV552FOc$dAEQtRpn9h8nen}*>m5`e@mysV(y_<;$hwNAFdXe@1FshDgM zw9(?Dw_AwjL3*Q;kq@grSpEG#a51t7HW)&o#I{UAtr3Js5!hv!s7L zIc<3G;nfCeBTCsU(}k23(y-pkxwkR=3j^Ti1u~4uIf{kl0P+qv7K=+Av-w;U*CuNO z^>9zY6Z`xo0qu^a-HOfc>G^j0p@Oxw0MAk=+hTsXwN1b;96;jutFKLS?of`aw}O<} z7IZqvJt4xgV0ERF67Qh^ND>wnm##L`9y@8Im0F00qSgqQnrUv0<3j>qEE&nP`o`LA zNzqTs(d@*j3O-Z-JAx + 311 Data diff --git a/webpack.config.js b/webpack.config.js index b24494b64..a40252e68 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -78,6 +78,7 @@ module.exports = { new HtmlWebpackPlugin({ template: './public/index.html', title: '311-Data', + favicon: './public/favicon.png', }), new MiniCssExtractPlugin({ filename: '[name].css', From 771dcfbb839198dbd25752b9e7b658b22f6a46ec Mon Sep 17 00:00:00 2001 From: Adam Kendis Date: Tue, 30 Jun 2020 18:13:50 -0700 Subject: [PATCH 6/7] Linting --- src/components/chartExtras/ComparisonCriteria.jsx | 4 ++-- src/components/main/menu/Submit.jsx | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/chartExtras/ComparisonCriteria.jsx b/src/components/chartExtras/ComparisonCriteria.jsx index 8e62c4e89..95fa99ec7 100644 --- a/src/components/chartExtras/ComparisonCriteria.jsx +++ b/src/components/chartExtras/ComparisonCriteria.jsx @@ -112,11 +112,11 @@ ComparisonCriteria.propTypes = { sets: PropTypes.shape({ set1: PropTypes.shape({ district: PropTypes.string, - list: PropTypes.array, + list: PropTypes.arrayOf(PropTypes.string), }), set2: PropTypes.shape({ district: PropTypes.string, - list: PropTypes.array, + list: PropTypes.arrayOf(PropTypes.string), }), }).isRequired, requestTypes: PropTypes.shape({}).isRequired, diff --git a/src/components/main/menu/Submit.jsx b/src/components/main/menu/Submit.jsx index 04defec87..a88c25d46 100644 --- a/src/components/main/menu/Submit.jsx +++ b/src/components/main/menu/Submit.jsx @@ -105,7 +105,7 @@ Submit.propTypes = { filters: propTypes.shape({ startDate: propTypes.string, endDate: propTypes.string, - councils: propTypes.array, + councils: propTypes.arrayOf(propTypes.string), requestTypes: propTypes.shape({}), }).isRequired, comparisonFilters: propTypes.shape({ @@ -115,11 +115,11 @@ Submit.propTypes = { chart: propTypes.string, set1: propTypes.shape({ district: propTypes.string, - list: propTypes.array, + list: propTypes.arrayOf(propTypes.string), }), set2: propTypes.shape({ district: propTypes.string, - list: propTypes.array, + list: propTypes.arrayOf(propTypes.string), }), }), requestTypes: propTypes.shape({}), From 9e813b385781ad2a0c1a6ec001ee7228f07e9484 Mon Sep 17 00:00:00 2001 From: Adam Kendis Date: Tue, 30 Jun 2020 18:21:37 -0700 Subject: [PATCH 7/7] Updated frontend workflows with new env vars --- .github/workflows/Continuous_Deployment_Frontend_Dev.yml | 2 ++ .github/workflows/Continuous_Deployment_Frontend_Prod.yml | 2 ++ .github/workflows/Continuous_Integration_Frontend.yml | 2 ++ Orchestration/docker-compose-example.yml | 2 ++ 4 files changed, 8 insertions(+) diff --git a/.github/workflows/Continuous_Deployment_Frontend_Dev.yml b/.github/workflows/Continuous_Deployment_Frontend_Dev.yml index c32a950be..fd0ba8e08 100644 --- a/.github/workflows/Continuous_Deployment_Frontend_Dev.yml +++ b/.github/workflows/Continuous_Deployment_Frontend_Dev.yml @@ -20,6 +20,8 @@ jobs: - name: Setup environment run: | echo MAPBOX_TOKEN=${{ secrets.MAPBOX_TOKEN }} > .env + echo MAPBOX_STREETS_URL=${{ secrets.MAPBOX_STREETS_URL }} > .env + echo MAPBOX_SATELLITE_URL=${{ secrets.MAPBOX_SATELLITE_URL }} > .env echo API_URL=${{ secrets.API_URL_DEV }} >> .env echo MIXPANEL_ENABLED=${{ secrets.MIXPANEL_ENABLED }} >> .env echo MIXPANEL_TOKEN_PROD=${{ secrets.MIXPANEL_TOKEN_PROD }} >> .env diff --git a/.github/workflows/Continuous_Deployment_Frontend_Prod.yml b/.github/workflows/Continuous_Deployment_Frontend_Prod.yml index a8e42518e..9aa846a23 100644 --- a/.github/workflows/Continuous_Deployment_Frontend_Prod.yml +++ b/.github/workflows/Continuous_Deployment_Frontend_Prod.yml @@ -20,6 +20,8 @@ jobs: - name: Setup environment run: | echo MAPBOX_TOKEN=${{ secrets.MAPBOX_TOKEN }} > .env + echo MAPBOX_STREETS_URL=${{ secrets.MAPBOX_STREETS_URL }} > .env + echo MAPBOX_SATELLITE_URL=${{ secrets.MAPBOX_SATELLITE_URL }} > .env echo API_URL=${{ secrets.API_URL_PROD }} >> .env echo MIXPANEL_ENABLED=${{ secrets.MIXPANEL_ENABLED }} >> .env echo MIXPANEL_TOKEN_PROD=${{ secrets.MIXPANEL_TOKEN_PROD }} >> .env diff --git a/.github/workflows/Continuous_Integration_Frontend.yml b/.github/workflows/Continuous_Integration_Frontend.yml index 70e91551a..56118904a 100644 --- a/.github/workflows/Continuous_Integration_Frontend.yml +++ b/.github/workflows/Continuous_Integration_Frontend.yml @@ -17,6 +17,8 @@ jobs: - name: Setup environment run: | echo MAPBOX_TOKEN=${{ secrets.MAPBOX_TOKEN }} > .env + echo MAPBOX_STREETS_URL=${{ secrets.MAPBOX_STREETS_URL }} > .env + echo MAPBOX_SATELLITE_URL=${{ secrets.MAPBOX_SATELLITE_URL }} > .env echo API_URL=${{ secrets.API_URL_PROD }} >> .env echo MIXPANEL_ENABLED=${{ secrets.MIXPANEL_ENABLED }} >> .env echo MIXPANEL_TOKEN_PROD=${{ secrets.MIXPANEL_TOKEN_PROD }} >> .env diff --git a/Orchestration/docker-compose-example.yml b/Orchestration/docker-compose-example.yml index ae1219764..4bbaba58f 100644 --- a/Orchestration/docker-compose-example.yml +++ b/Orchestration/docker-compose-example.yml @@ -30,6 +30,8 @@ services: container_name: "311-frontend" environment: MAPBOX_TOKEN: REDACTED + MAPBOX_STREETS_URL: REDACTED + MAPBOX_SATELLITE_URL: REDACTED API_URL: http://localhost:5000 MIXPANEL_ENABLED: 0 MIXPANEL_TOKEN_PROD: REDACTED