Skip to content

Commit

Permalink
config json updated
Browse files Browse the repository at this point in the history
  • Loading branch information
Gemma committed Jun 20, 2024
1 parent ec521c4 commit 7a43165
Show file tree
Hide file tree
Showing 17 changed files with 852 additions and 650 deletions.
43 changes: 34 additions & 9 deletions frontend/src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -1796,6 +1796,40 @@ h5 {
text-underline-offset: 1px;
}

.IdForm{
font-size: 12px;
}
.selectedOperator {
background: white;
border: 1px solid rgb(143 147 196 / 61%);
/* border: 1px solid rgba(12, 16, 64, 0.606); */
font-size: 12px;
border-radius: 4px;
width: 33px;
height: 27px;
/* margin-right: 20px; */
box-shadow: 1px 2px 2px #cecece;
}
.ValueForm{
font-size: 12px;
}
#operator {
display: flex;
flex-direction: column;
align-content: center;
justify-content: center;
align-items: center;
/* margin-top: -40px; */
width: 46px;
}

.buttonsDiv {
margin-top: 7px;
display: flex;
flex-direction: column;
justify-content: space-around;
height: 151px;
}
.crossQueriesTittle {
margin-bottom: 12px;
font-size: 12px;
Expand Down Expand Up @@ -2120,15 +2154,6 @@ h5 {
}
}

@media (max-width: 700px) {
.buttonsDiv {
display: flex;
flex-direction: column;
justify-content: space-around;
margin-top: 5px;
height: 101px;
}
}
@media (max-width: 460px) {
.containerForm {
margin-left: 0px;
Expand Down
20 changes: 16 additions & 4 deletions frontend/src/components/Biosamples/BiosamplesResults.js
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,8 @@ function BiosamplesResults (props) {
queryArray[index].push('!')
} else {
queryArray[index] = term.split('%')

queryArray[index][1] = '%' + queryArray[index][1] + '%'
console.log(queryArray[index])
queryArray[index].push('=')
}
Expand All @@ -330,7 +332,7 @@ function BiosamplesResults (props) {
if (queryArray[index][0].toLowerCase() === 'individual') {
alphanumericFilter = {
id: element.id,
scope: ['individual']
scope: ['individuals']
}
} else if (
queryArray[index][0].toLowerCase() === 'genomicvariation'
Expand Down Expand Up @@ -466,17 +468,18 @@ function BiosamplesResults (props) {
datasetList.push(res2.data.response.collections)
}

if (updatedArrayFilterVar.length === 0) {
if (updatedArrayFilterVar.length === 0 && props.isNetwork === true) {
res.data.responses.forEach(element => {
beaconsList.push(element)
})
} else if (updatedArrayFilterVar.length === 0 && props.isNetwork === false){
beaconsList.push(res.data.response)
}

let variablePause = false

if (props.query === null || props.query === '') {
// show all individuals

let jsonData1 = {}

if (arrayRequestParameters.length > 0) {
Expand Down Expand Up @@ -531,7 +534,10 @@ function BiosamplesResults (props) {
configData.API_URL + '/biosamples',
jsonData1
)
console.log(jsonData1)
console.log(res)
} else {

const headers = { Authorization: `Bearer ${token}` }
console.log('querying with token')
res = await axios.post(
Expand Down Expand Up @@ -722,6 +728,7 @@ function BiosamplesResults (props) {
}
setTriggerSubmit(true)
} else {

let jsonData2 = {}
variablePause = false

Expand Down Expand Up @@ -859,21 +866,26 @@ function BiosamplesResults (props) {
token = auth.userData.access_token
}
if (token === null) {
console.log(jsonData2)
console.log('Querying without token')
res = await axios.post(
configData.API_URL + '/biosamples',
jsonData2
)

console.log(res)
} else {
console.log('Querying WITH token')

const headers = { Authorization: `Bearer ${token}` }

res = await axios.post(
configData.API_URL + '/biosamples',
jsonData2,
{ headers: headers }
)
console.log(jsonData2)
console.log(res)
}

setTimeOut(true)
Expand Down
15 changes: 14 additions & 1 deletion frontend/src/components/Dataset/BeaconInfo.css
Original file line number Diff line number Diff line change
Expand Up @@ -375,10 +375,23 @@ p a:hover {
}

h5 {
margin-top: 0px !important;
margin-bottom: 0px !important;
}

h5 {
color: rgb(209, 66, 66);
font-weight: bold;
width: -moz-fit-content;
width: fit-content;
/* width: 150%; */
margin-top: 26px;
margin-left: 40vw;
display: flex;
/* align-items: center; */
justify-content: center;
font-size: 14px;
}

.resultsRecord {
display: flex;
flex-direction: row;
Expand Down
220 changes: 112 additions & 108 deletions frontend/src/components/Dataset/BeaconInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -147,118 +147,122 @@ function BeaconInfo (props) {
<div className='resultsRecord'>
{resp.map(result => {
return (
<div className='datasetCard'>
<div className='tittle'>
<div className='tittle2'>
{result.response.organization.logoUrl !== '' &&
result.response.name !== 'NAGENpediatrics Beacon' && (
<img
className='logoBeacon'
src={result.response.organization.logoUrl}
alt={result.meta.beaconId}
/>
)}
{result.response.name === 'NAGENpediatrics Beacon' && (
<img
className='logoBeaconNasertic'
src={result.response.organization.logoUrl}
alt={result.meta.beaconId}
<>
{result.response && (
<div className='datasetCard'>
<div className='tittle'>
<div className='tittle2'>
{result.response.organization.logoUrl !== '' &&
result.response.name !== 'NAGENpediatrics Beacon' && (
<img
className='logoBeacon'
src={result.response.organization.logoUrl}
alt={result.meta.beaconId}
/>
)}
{result.response.name === 'NAGENpediatrics Beacon' && (
<img
className='logoBeaconNasertic'
src={result.response.organization.logoUrl}
alt={result.meta.beaconId}
/>
)}
<h1>{result.response.name}</h1>
</div>
<h2>{result.response.organization.name}</h2>
</div>
<hr className='line'></hr>
{!result.response.description.includes('<a href') && (
<p>{result.response.description}</p>
)}
{result.response.description.includes('<a href') && (
<p
dangerouslySetInnerHTML={{
__html: result.response.description
}}
/>
)}
<h1>{result.response.name}</h1>
<div className='linksBeacons'>
{result.meta.beaconId ===
'org.ega-archive.ga4gh-approval-beacon-test' && (
<a
href='https://beacon-apis-demo.ega-archive.org/api'
target='_blank'
rel='noreferrer'
>
Beacon API
</a>
)}
{result.meta.beaconId === 'es.elixir.bsc.beacon' && (
<a
href='https://beacons.bsc.es/beacon/v2.0.0/'
target='_blank'
rel='noreferrer'
>
Beacon API
</a>
)}
{result.meta.beaconId === 'org.progenetix' && (
<a
href='https://beaconplus.progenetix.org/'
target='_blank'
rel='noreferrer'
>
Beacon API
</a>
)}
{result.meta.beaconId !== 'es.elixir.bsc.beacon' &&
result.meta.beaconId !== 'org.progenetix' &&
result.meta.beaconId !==
'org.ega-archive.ga4gh-approval-beacon-test' && (
<a
href={result.response.alternativeUrl}
target='_blank'
rel='noreferrer'
>
Beacon API
</a>
)}
{result.meta.beaconId === 'es.elixir.bsc.beacon' && (
<a
href='https://www.bsc.es/'
target='_blank'
rel='noreferrer'
>
Visit us
</a>
)}
{result.meta.beaconId !== 'es.elixir.bsc.beacon' && (
<a
href={result.response.organization.welcomeUrl}
target='_blank'
rel='noreferrer'
>
Visit us
</a>
)}
{result.meta.beaconId !== 'es.elixir.bsc.beacon' && (
<a
href={result.response.organization.contactUrl}
target='_blank'
rel='noreferrer'
>
Contact us
</a>
)}
{result.meta.beaconId === 'es.elixir.bsc.beacon' && (
<a
href='mailto:[email protected]'
target='_blank'
rel='noreferrer'
>
Contact us
</a>
)}
</div>
</div>
<h2>{result.response.organization.name}</h2>
</div>
<hr className='line'></hr>
{!result.response.description.includes('<a href') && (
<p>{result.response.description}</p>
)}
{result.response.description.includes('<a href') && (
<p
dangerouslySetInnerHTML={{
__html: result.response.description
}}
/>
)}
<div className='linksBeacons'>
{result.meta.beaconId ===
'org.ega-archive.ga4gh-approval-beacon-test' && (
<a
href='https://beacon-apis-demo.ega-archive.org/api'
target='_blank'
rel='noreferrer'
>
Beacon API
</a>
)}
{result.meta.beaconId === 'es.elixir.bsc.beacon' && (
<a
href='https://beacons.bsc.es/beacon/v2.0.0/'
target='_blank'
rel='noreferrer'
>
Beacon API
</a>
)}
{result.meta.beaconId === 'org.progenetix' && (
<a
href='https://beaconplus.progenetix.org/'
target='_blank'
rel='noreferrer'
>
Beacon API
</a>
)}
{result.meta.beaconId !== 'es.elixir.bsc.beacon' &&
result.meta.beaconId !== 'org.progenetix' &&
result.meta.beaconId !==
'org.ega-archive.ga4gh-approval-beacon-test' && (
<a
href={result.response.alternativeUrl}
target='_blank'
rel='noreferrer'
>
Beacon API
</a>
)}
{result.meta.beaconId === 'es.elixir.bsc.beacon' && (
<a
href='https://www.bsc.es/'
target='_blank'
rel='noreferrer'
>
Visit us
</a>
)}
{result.meta.beaconId !== 'es.elixir.bsc.beacon' && (
<a
href={result.response.organization.welcomeUrl}
target='_blank'
rel='noreferrer'
>
Visit us
</a>
)}
{result.meta.beaconId !== 'es.elixir.bsc.beacon' && (
<a
href={result.response.organization.contactUrl}
target='_blank'
rel='noreferrer'
>
Contact us
</a>
)}
{result.meta.beaconId === 'es.elixir.bsc.beacon' && (
<a
href='mailto:[email protected]'
target='_blank'
rel='noreferrer'
>
Contact us
</a>
)}
</div>
</div>
</>
)
})}
</div>
Expand Down
Loading

0 comments on commit 7a43165

Please sign in to comment.