From 7daf981ac1a7b5212e50e2a9a30a32eba7bbe40d Mon Sep 17 00:00:00 2001 From: wickathou Date: Wed, 22 May 2024 11:51:19 +0300 Subject: [PATCH 1/4] Added configuration for plausible --- backend/misc/config.js | 6 +- frontend/public/index.html | 131 ++++++++++++++++++++++--------------- 2 files changed, 80 insertions(+), 57 deletions(-) diff --git a/backend/misc/config.js b/backend/misc/config.js index b7ee7deba..123bf9314 100644 --- a/backend/misc/config.js +++ b/backend/misc/config.js @@ -115,7 +115,7 @@ const settings = { }, REDIS_PASSWORD: { required: false, - value: process.env.REDIS_PASSWORD || 'NOPE' + value: process.env.REDIS_PASSWORD || 'NOPE', }, } @@ -127,7 +127,7 @@ const buildConfig = () => { config[key] = obj.default } else { throw new Error( - `Invalid configuration: ${key} must be provided a value from .env, or a default value. See config.js` + `Invalid configuration: ${key} must be provided a value from .env, or a default value. See config.js`, ) } } else { @@ -142,7 +142,7 @@ const config = buildConfig() logger.info({ message: 'Running app with config', - data: config, + // data: config, }) global.gConfig = config diff --git a/frontend/public/index.html b/frontend/public/index.html index 254d9d3df..5de95e8d6 100755 --- a/frontend/public/index.html +++ b/frontend/public/index.html @@ -1,26 +1,50 @@ - - - - - - - - - - - - - - + + + + + + + + - + - - - - %REACT_APP_PAGE_TITLE% - - - + + %REACT_APP_PAGE_TITLE% - + html, + body { + height: 100%; + } - + body { + position: absolute; + left: -17px; + right: -17px; + padding-top: 0; + padding-right: 17px !important; + padding-left: 17px; + padding-bottom: 0px; + overflow-x: hidden; + overflow-y: auto !important; //Remove the !important if you want the scroll bar to disappear + } + + - - -
- - - - - \ No newline at end of file + --> + From 1ba2bb17c321405ccaf7e997c302ccea79c03aa7 Mon Sep 17 00:00:00 2001 From: wickathou Date: Wed, 22 May 2024 13:20:22 +0300 Subject: [PATCH 2/4] Fixed typo on env variable added debug message for alerts --- frontend/src/constants/config.js | 7 ++++--- frontend/src/graphql/client.js | 2 +- frontend/src/pages/_dashboard/renderDashboard/index.js | 4 +++- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/frontend/src/constants/config.js b/frontend/src/constants/config.js index 0a49e5cdf..7190e238d 100644 --- a/frontend/src/constants/config.js +++ b/frontend/src/constants/config.js @@ -13,9 +13,9 @@ const settings = { required: true, value: process.env.REACT_APP_BASE_URL, }, - WEB_SOCET_URL: { + WEB_SOCKET_URL: { required: false, - value: process.env.REACT_APP_WEB_SOCET_URL, + value: process.env.REACT_APP_WEB_SOCKET_URL, }, CALENDAR_URL: { required: false, @@ -38,7 +38,8 @@ const settings = { ID_TOKEN_NAMESPACE: { required: true, value: - process.env.REACT_APP_ID_TOKEN_NAMESPACE || 'https://eu.junctionplatform.com/', + process.env.REACT_APP_ID_TOKEN_NAMESPACE || + 'https://eu.junctionplatform.com/', }, IS_DEBUG: { default: process.env.REACT_APP_IS_DEBUG === 'true', diff --git a/frontend/src/graphql/client.js b/frontend/src/graphql/client.js index 9722f22ad..f151249c2 100644 --- a/frontend/src/graphql/client.js +++ b/frontend/src/graphql/client.js @@ -30,7 +30,7 @@ const errorLink = onError(({ graphQLErrors, networkError }) => { export default idToken => { const wsLink = new GraphQLWsLink( createClient({ - url: config.WEB_SOCET_URL,//TODO: is this causing renew loop problem? + url: config.WEB_SOCET_URL, //TODO: is this causing renew loop problem? connectionParams: { authToken: idToken }, }), ) diff --git a/frontend/src/pages/_dashboard/renderDashboard/index.js b/frontend/src/pages/_dashboard/renderDashboard/index.js index 3a7b6bcbc..ea7be432f 100644 --- a/frontend/src/pages/_dashboard/renderDashboard/index.js +++ b/frontend/src/pages/_dashboard/renderDashboard/index.js @@ -22,6 +22,7 @@ import { useActiveEvents, usePastEvents, } from 'graphql/queries/events' +import { debugGroup } from 'utils/debuggingTools' // import { Chat } from 'components/messaging/chat' export default role => { @@ -81,6 +82,7 @@ export default role => { // Must use lazy query because event is fetched asynchnronously const [getAlerts, { loading: alertsLoading, data: alertsData }] = useLazyQuery(ALERTS_QUERY) + useEffect(() => { if (event) { getAlerts({ variables: { eventId: event._id } }) @@ -129,7 +131,7 @@ export default role => { return newArray }) } - // eslint-disable-next-line react-hooks/exhaustive-deps + debugGroup('alertsData', [alertsData]) }, [alertsData, setAlerts, newAlert, setAlertCount]) /** Update project when team changes */ From 7c83c0145339e908bebd54a71325f67b49e65c04 Mon Sep 17 00:00:00 2001 From: wickathou Date: Wed, 22 May 2024 13:22:17 +0300 Subject: [PATCH 3/4] modified STAG pipeline --- azure-pipelines.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 7ddfac9d5..71bba2007 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -27,16 +27,16 @@ stages: - task: DownloadSecureFile@1 displayName: 'download STAG frontend' inputs: - secureFile: 'FRONTEND_ENV_FILE_STAG' # string. Required. Secure File. + secureFile: 'FRONTEND_ENV_FILE_STAG_UPDATED' # string. Required. Secure File. - task: CopyFiles@2 displayName: 'copy STAG frontend' inputs: SourceFolder: '$(Agent.TempDirectory)' - Contents: FRONTEND_ENV_FILE_STAG + Contents: FRONTEND_ENV_FILE_STAG_UPDATED TargetFolder: './frontend' - - script: mv ./frontend/FRONTEND_ENV_FILE_STAG ./frontend/.env + - script: mv ./frontend/FRONTEND_ENV_FILE_STAG_UPDATED ./frontend/.env displayName: 'rename STAG .env' - script: ls -a ./frontend From 4147095870ba89d71e14b245918787e905431e7f Mon Sep 17 00:00:00 2001 From: wickathou Date: Wed, 22 May 2024 13:25:43 +0300 Subject: [PATCH 4/4] Fixed typo on config variable for graphQL --- frontend/src/graphql/client.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/graphql/client.js b/frontend/src/graphql/client.js index f151249c2..062792f11 100644 --- a/frontend/src/graphql/client.js +++ b/frontend/src/graphql/client.js @@ -30,7 +30,7 @@ const errorLink = onError(({ graphQLErrors, networkError }) => { export default idToken => { const wsLink = new GraphQLWsLink( createClient({ - url: config.WEB_SOCET_URL, //TODO: is this causing renew loop problem? + url: config.WEB_SOCKET_URL, //TODO: is this causing renew loop problem? connectionParams: { authToken: idToken }, }), )