From 4c06c745c28055eb45c132967f1f69ee56d29269 Mon Sep 17 00:00:00 2001 From: Gemma Date: Wed, 12 Jun 2024 11:40:04 +0200 Subject: [PATCH] log in realms --- .../FilteringTerms/FilteringTerms.css | 2 +- .../Individuals/IndividualsResults.js | 4 ++ .../TableResultsIndividuals.js | 53 +++++++++++-------- .../src/components/SignIn/SignInFormNoLS.js | 2 +- 4 files changed, 38 insertions(+), 23 deletions(-) diff --git a/frontend/src/components/FilteringTerms/FilteringTerms.css b/frontend/src/components/FilteringTerms/FilteringTerms.css index 931904f..d21c068 100644 --- a/frontend/src/components/FilteringTerms/FilteringTerms.css +++ b/frontend/src/components/FilteringTerms/FilteringTerms.css @@ -200,7 +200,7 @@ tbody { width: 57%; /* height: 100%; */ /* justify-content: center; */ - + overflow-x: scroll; margin-bottom: -23px; padding-left: 30px; padding-top: 10px; diff --git a/frontend/src/components/Individuals/IndividualsResults.js b/frontend/src/components/Individuals/IndividualsResults.js index 6bba35b..482ba9d 100644 --- a/frontend/src/components/Individuals/IndividualsResults.js +++ b/frontend/src/components/Individuals/IndividualsResults.js @@ -528,6 +528,8 @@ function IndividualsResults (props) { configData.API_URL + '/individuals', jsonData1 ) + console.log(jsonData1) + console.log(res) } else { const headers = { Authorization: `Bearer ${token}` } console.log('querying with token') @@ -861,6 +863,8 @@ function IndividualsResults (props) { configData.API_URL + '/individuals', jsonData2 ) + console.log(jsonData2) + console.log(res) } else { console.log('Querying WITH token') diff --git a/frontend/src/components/Results/IndividualsResults/TableResultsIndividuals.js b/frontend/src/components/Results/IndividualsResults/TableResultsIndividuals.js index d50b1a0..30638f4 100644 --- a/frontend/src/components/Results/IndividualsResults/TableResultsIndividuals.js +++ b/frontend/src/components/Results/IndividualsResults/TableResultsIndividuals.js @@ -247,7 +247,7 @@ function TableResultsIndividuals (props) { const handleShowCrossQuery = e => { setShowCrossQuery(true) - + setParamCrossQuery(e.target.innerText) } @@ -489,6 +489,7 @@ function TableResultsIndividuals (props) { useEffect(() => { setShowDatasets(true) + }, []) return ( @@ -600,27 +601,37 @@ function TableResultsIndividuals (props) { ) })} - {props.results.length === 0 && ( - - toggleRow(beaconIndex)} - > - {result.id} - - {props.show === 'boolean' && ( - { + const totalCount = 0 + const allTrue = 'No, sorry' + + return ( + + toggleRow(index2)} > - No, sorry - - )} - {props.show === 'count' && ( - 0 results - )} - - - )} + + {beacon.id} + {expandedRows.includes(index2) ? ( + + ) : ( + + )} + + + + {props.show === 'boolean' + ? allTrue + ? 'YES' + : 'No, sorry' + : totalCount} + + + + ) + })} ) diff --git a/frontend/src/components/SignIn/SignInFormNoLS.js b/frontend/src/components/SignIn/SignInFormNoLS.js index 908887c..68d0d5d 100644 --- a/frontend/src/components/SignIn/SignInFormNoLS.js +++ b/frontend/src/components/SignIn/SignInFormNoLS.js @@ -58,7 +58,7 @@ export default function SignInFormNoLS () { const response = await fetch( configData.KEYCLOAK_URL + - '/auth/realms/Beacon/protocol/openid-connect/token', + `/auth/realms/${process.env.REACT_APP_KEYCLOAK_CLIENT_REALM}/protocol/openid-connect/token`, { method: 'POST', headers: {