Skip to content

Commit

Permalink
console.logs delated
Browse files Browse the repository at this point in the history
  • Loading branch information
Gemma committed Dec 14, 2023
1 parent b885b13 commit 7ef37f5
Show file tree
Hide file tree
Showing 24 changed files with 373 additions and 474 deletions.
2 changes: 1 addition & 1 deletion frontend/src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ hr {
.example {
display: flex;
align-items: center;
margin-right: -106px;
margin-right: -117px;
margin-top: 22px;
margin-bottom: 22px;
flex-direction: row-reverse;
Expand Down
15 changes: 2 additions & 13 deletions frontend/src/components/Biosamples/BiosamplesResults.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function BiosamplesResults (props) {
if (props.query !== null) {
if (props.query.includes(',')) {
queryStringTerm = props.query.split(',')
console.log(queryStringTerm)

queryStringTerm.forEach((element, index) => {
element = element.trim()
if (
Expand All @@ -84,7 +84,6 @@ function BiosamplesResults (props) {
queryArray[index].push('%')
}

console.log(queryArray)
const alphaNumFilter = {
id: queryArray[index][0],
operator: queryArray[index][2],
Expand Down Expand Up @@ -167,15 +166,14 @@ function BiosamplesResults (props) {
}
}
jsonData1 = JSON.stringify(jsonData1)
console.log(jsonData1)

let token = null
if (auth.userData === null) {
token = getStoredToken()
} else {
token = auth.userData.access_token
}
console.log(token)

if (token === null) {
res = await axios.post(
configData.API_URL + '/biosamples',
Expand All @@ -191,7 +189,6 @@ function BiosamplesResults (props) {
)
}

console.log(res)
setTimeOut(true)

if (res.data.responseSummary.numTotalResults < 1) {
Expand All @@ -201,7 +198,6 @@ function BiosamplesResults (props) {
} else {
res.data.response.resultSets.forEach((element, index) => {
if (res.data.response.resultSets[index].resultsCount > 0) {
console.log(res.data.response.resultSets[index].results.length)
res.data.response.resultSets[index].results.forEach(
(element2, index2) => {
let arrayResult = [
Expand Down Expand Up @@ -234,7 +230,6 @@ function BiosamplesResults (props) {
}
}
jsonData2 = JSON.stringify(jsonData2)
console.log(jsonData2)

let token = null
if (auth.userData === null) {
Expand All @@ -259,7 +254,6 @@ function BiosamplesResults (props) {
{ headers: headers }
)
}
console.log(res)
setTimeOut(true)

if (
Expand All @@ -270,25 +264,20 @@ function BiosamplesResults (props) {
setNumberResults(0)
setBoolean(false)
} else {
console.log(res.data.responseSummary.numTotalResults)
setNumberResults(res.data.responseSummary.numTotalResults)
setBoolean(res.data.responseSummary.exists)

res.data.response.resultSets.forEach((element, index) => {
if (res.data.response.resultSets[index].resultsCount > 0) {
console.log(res.data.response.resultSets[index].results.length)
res.data.response.resultSets[index].results.forEach(
(element2, index2) => {
let arrayResult = [
res.data.response.resultSets[index].beaconId,
res.data.response.resultSets[index].results[index2]
]
results.push(arrayResult)
console.log(arrayResult)
}
)

console.log(results)
}
})
}
Expand Down
28 changes: 5 additions & 23 deletions frontend/src/components/Cohorts/Cohorts.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,12 @@ function Cohorts (props) {

const handleSelectedValue = e => {
setSelectedValue(e.target.value)
console.log(e.target.value)
}

useEffect(() => {
const fetchDataCohorts = async () => {
try {
let res = await axios.get(configData.API_URL + '/cohorts/')
console.log(res)
res.data.response.collections.forEach(element => {
if (cohortsIds.includes(element.id)) {
if (element.cohortName !== undefined) {
Expand Down Expand Up @@ -143,9 +141,6 @@ function Cohorts (props) {
values = Object.values(response)
labels = Object.keys(response)
}
console.log(values)
console.log(labels)

if (values.length > 0 && labels.length > 0) {
var options = {
chart: {
Expand Down Expand Up @@ -201,9 +196,6 @@ function Cohorts (props) {
series: values,
labels: labels
}

console.log(options)

if (selectedFilter === 'dis_eth') {
var chartFiltered = new ApexCharts(
document.querySelector('#chartFilteredDisease'),
Expand Down Expand Up @@ -235,8 +227,6 @@ function Cohorts (props) {
}, [response])

const submitFilters = e => {
console.log('hola')

if (selectedFilter === 'dis_eth') {
setShowDis2(false)
setShowEth2(false)
Expand Down Expand Up @@ -281,7 +271,6 @@ function Cohorts (props) {
setShowDis(false)
setShowEth2(false)
setShowEth(true)
console.log(eth_dis)
if (
eth_dis[valueToFilter] !== null &&
eth_dis[valueToFilter] !== undefined
Expand All @@ -294,23 +283,19 @@ function Cohorts (props) {
}

useEffect(() => {
console.log(showGraphs)

console.log(selectedCohorts)

const apiCall = () => {
arrayCohorts.forEach(element => {
selectedCohorts.forEach(element2 => {
console.log(element2[0].value)

if (
element.name === element2[0].value ||
element.cohortName === element2[0].value
) {
if (element.collectionEvents !== undefined) {
console.log(element.collectionEvents.length)

element.collectionEvents.forEach(element2 => {
if (Object.keys(element2).length !== 0) {
console.log(element2)

let sexs = ''
let ethnicities = ''
let geoData = ''
Expand All @@ -332,7 +317,7 @@ function Cohorts (props) {
// for (var i = 0; i < res.data.response.collections.length; i++) {
if (element2.eventGenders !== undefined) {
sexs = element2.eventGenders.distribution.genders
console.log(sexs)

setDataAvailable(true)
}
if (element2.eventEthnicities !== undefined) {
Expand Down Expand Up @@ -378,8 +363,6 @@ function Cohorts (props) {
setNameCohort(element.name)

if (sexs !== '') {
console.log(sexs)
console.log(valuesSex)
valuesSex = Object.values(sexs)
labelsSex = Object.keys(sexs)
}
Expand Down Expand Up @@ -576,7 +559,6 @@ function Cohorts (props) {
}
setTimeOut(true)
} else {
console.log('hola')
setTimeOut(true)
setDataAvailable(false)
}
Expand Down Expand Up @@ -629,7 +611,7 @@ function Cohorts (props) {
{trigger && (
<>
{nameCohort !== '' && <h3>{nameCohort}</h3>}
{showGraphs === true && (
{showGraphs === true && (
<div className='chartModule'>
<div id='chartSex'></div>
<div id='chartGeo'></div>
Expand Down
1 change: 0 additions & 1 deletion frontend/src/components/Cohorts/CohortsModule.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ function CohortsModule (props) {
props.setShowGraphs(true)
}
const handleChangeCohorts = selectedOption => {
console.log(selectedOption)
setSelectedCohortsAux([])
selectedCohortsAux.push(selectedOption)
props.setSelectedCohorts(selectedCohortsAux)
Expand Down
5 changes: 1 addition & 4 deletions frontend/src/components/CrossQueries/CrossQueries.css
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,7 @@ h5 {
h5:hover {
color: rgb(118, 151, 228);
font-weight: bold;
width: 100%;
display: flex;
align-items: center;
justify-content: center;

}

.preCrossQueries {
Expand Down
23 changes: 13 additions & 10 deletions frontend/src/components/CrossQueries/CrossQueries.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function CrossQueries () {
const [arrayResults, setArrayResults] = useState([])

const [showSubmit, setShowSubmit] = useState(true)
const [trigger, setTrigger]= useState(true)
const [trigger, setTrigger] = useState(true)

const handleChangeInitial = e => {
setValueInitial(e.target.value)
Expand Down Expand Up @@ -51,7 +51,6 @@ function CrossQueries () {
let res = await axios.get(
configData.API_URL + `/${valueInitial}/${IdValue}/${valueFinal}`
)
console.log(res)
res.data.response.resultSets.forEach((element, index) => {
if (res.data.response.resultSets[index].results.length > 0) {
setResults(res.data.response.resultSets[index].results)
Expand All @@ -61,8 +60,6 @@ function CrossQueries () {
JSON.stringify(element, null, 2).replace('[', '').replace(']', '')
)
})
console.log(results)
console.log(arrayResults)
} else {
setResults(null)
}
Expand All @@ -74,8 +71,6 @@ function CrossQueries () {
}

useEffect(() => {
console.log(scope)
console.log(scope2)
setTrigger(true)
}, [scope2])

Expand All @@ -86,11 +81,19 @@ function CrossQueries () {
Pick the "origin" collection:
<select value={valueInitial} onChange={handleChangeInitial}>
{scope2 === 'allScopes' && <option value='select'>Select</option>}
{scope2 === 'allScopes' && <option value='g_variants'>Variant</option>}
{scope2 === 'allScopes' && <option value='individuals'>Individuals</option>}
{scope2 === 'allScopes' && <option value='biosamples'>Biosamples</option>}
{scope2 === 'allScopes' && (
<option value='g_variants'>Variant</option>
)}
{scope2 === 'allScopes' && (
<option value='individuals'>Individuals</option>
)}
{scope2 === 'allScopes' && (
<option value='biosamples'>Biosamples</option>
)}
{scope2 === 'allScopes' && <option value='runs'>Runs</option>}
{scope2 === 'allScopes' && <option value='analyses'>Analyses</option>}
{scope2 === 'allScopes' && (
<option value='analyses'>Analyses</option>
)}

{scope2 === 'variants' && (
<option value='g_variants' selected>
Expand Down
1 change: 0 additions & 1 deletion frontend/src/components/Datasets/ResultsDatasets.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ function ResultsDatasets(props) {

try {
let res = await axios.get(configData.API_URL +'/info')
console.log(res.data.responses)
res.data.responses.forEach(element => {
resp.push(element)
});
Expand Down
Loading

0 comments on commit 7ef37f5

Please sign in to comment.