Skip to content

Commit

Permalink
filtering terms timeout solved
Browse files Browse the repository at this point in the history
  • Loading branch information
GMILLA92 committed Jan 18, 2024
1 parent 6c99665 commit a3c7270
Showing 1 changed file with 35 additions and 10 deletions.
45 changes: 35 additions & 10 deletions frontend/src/components/Layout/Layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,9 @@ function Layout (props) {
setError('No filtering terms now available')
}
} catch (error) {
setError('No filtering terms now available for Individuals collection')
console.log(error)
setTimeOut(true)
}
} else if (props.collection === 'Cohorts') {
try {
Expand All @@ -208,7 +210,9 @@ function Layout (props) {
setError('No filtering terms now available')
}
} catch (error) {
setError('No filtering terms now available for Cohorts collection')
console.log(error)
setTimeOut(true)
}
} else if (props.collection === 'Variant') {
try {
Expand All @@ -223,8 +227,9 @@ function Layout (props) {
setError('No filtering terms now available')
}
} catch (error) {
setError('No filtering terms now available for Variant collection')
console.log(error)
setError('No filtering terms now available')
setTimeOut(true)
}
} else if (props.collection === 'Analyses') {
try {
Expand All @@ -239,7 +244,9 @@ function Layout (props) {
setError('No filtering terms now available')
}
} catch (error) {
setError('No filtering terms now available for Analyses collection')
console.log(error)
setTimeOut(true)
}
} else if (props.collection === 'Runs') {
try {
Expand All @@ -252,7 +259,9 @@ function Layout (props) {
setError('No filtering terms now available')
}
} catch (error) {
setError('No filtering terms now available for Runs collection')
console.log(error)
setTimeOut(true)
}
} else if (props.collection === 'Biosamples') {
try {
Expand All @@ -264,10 +273,13 @@ function Layout (props) {
setFilteringTerms(res)
setResults(null)
} else {
setTimeOut(true)
setError('No filtering terms now available')
}
} catch (error) {
setError('No filtering terms now available for Biosamples collection')
console.log(error)
setTimeOut(true)
}
}

Expand Down Expand Up @@ -516,17 +528,27 @@ function Layout (props) {
<NavLink className='NavlinkVerifier' exact to='/validator'>
BEACON VALIDATOR
</NavLink>

<div className='logos'>
{/* <a href="https://www.cineca-project.eu/" target="_blank">
<img className="cinecaLogo" src="./CINECA_logo.png" alt='cinecaLogo'></img>
</a> */}
<a href='https://elixir-europe.org/' target='_blank'>
{/* <a href='https://elixir-europe.org/' target='_blank'>
<img
className='elixirLogo'
src='./white-orange-logo.png'
alt='elixirLogo'
></img>
</a> */}
<a
href='https://impact-data.bsc.es/'
className='logoInstitution'
target='_blank'
>
<img
className='impactLogo'
src='../impactLogo.png'
alt='impactLogo'
></img>
</a>
<h1 className='version'>v0.5.0</h1>
</div>
Expand All @@ -547,7 +569,8 @@ function Layout (props) {
bottom: 0,
zIndex: 3,
backgroundColor: 'rgba(255, 255, 255, 0.75)'
}}}
}
}}
>
<button onClick={handleCloseModal3}>
<img
Expand Down Expand Up @@ -1087,7 +1110,8 @@ function Layout (props) {
bottom: 0,
zIndex: 3,
backgroundColor: 'rgba(255, 255, 255, 0.75)'
}}}
}
}}
>
<button onClick={handleCloseModal1}>
<img
Expand All @@ -1112,7 +1136,8 @@ function Layout (props) {
bottom: 0,
zIndex: 3,
backgroundColor: 'rgba(255, 255, 255, 0.75)'
}}}
}
}}
>
<button onClick={handleCloseModal2}>
<img
Expand Down Expand Up @@ -1175,7 +1200,7 @@ function Layout (props) {
/>
</div>
)}
{isSubmitted && results === 'Analyses' && triggerQuery && (
{isSubmitted && results === 'Analyses' && triggerQuery && (
<div>
<AnalysesResults
query={query}
Expand Down Expand Up @@ -1203,7 +1228,7 @@ function Layout (props) {
/>
</div>
)}
{isSubmitted && results === 'Runs' && triggerQuery && (
{isSubmitted && results === 'Runs' && triggerQuery && (
<div>
<RunsResults
query={query}
Expand Down Expand Up @@ -1362,10 +1387,10 @@ function Layout (props) {
setQuery={setQuery}
/>
)}
{timeOut === false}
{timeOut === true && error && <h5>{error}</h5>}
</div>
</div>
)
}

export default Layout
export default Layout

0 comments on commit a3c7270

Please sign in to comment.