forked from legumeinfo/jekyll-legumeinfo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Chen Prom
committed
Dec 12, 2024
1 parent
9beab2a
commit 42a6633
Showing
10 changed files
with
477 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
services: | ||
mongo: | ||
image: docker.io/library/mongo | ||
ports: | ||
- '27017:27017' | ||
volumes: | ||
- ./docker-entrypoint-initdb.d:/docker-entrypoint-initdb.d | ||
- /data/db | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
gzip -dc /docker/entrypoint-initdb.d/observations-Glycine.json.gz | mongoimport -c observations --jsonArray |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,109 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<link rel="stylesheet" type="text/css" href="../../include/sb_styles.css"> | ||
<link rel="stylesheet" type="text/css" href="styles.css"> | ||
<script type="text/javascript" src="scripts.js"></script> | ||
<title>GRIN Data Explorer - Results</title> | ||
</head> | ||
<body id="bdyBody"> | ||
<div class="sb_middle2"> | ||
<div class="sb_main2"> | ||
<div id="divGrin"> | ||
<div id="divMainFormContainer"> | ||
<form action="results_download.php" method="post" id="frmGrin" name="frmGrin"> | ||
<input type="hidden" name="inpCultivarsRadio" id="inpCultivarsRadio" value=""> | ||
<input type="hidden" name="tareaCultivarsList" id="tareaCultivarsList" value=""> | ||
|
||
<script> | ||
// Dynamic content rendering based on JavaScript data | ||
const arrRequestSpecifics = [ | ||
// Example of request specifics data | ||
{ descriptor_category: 'category1', selected: 'yes', id: 1, descriptor_distincts: '', selected_option: 'Option1', selected_min: 10, selected_max: 20 }, | ||
{ descriptor_category: 'category2', selected: 'no', id: 2, descriptor_distincts: '', selected_option: '', selected_min: '', selected_max: '' } | ||
]; | ||
|
||
arrRequestSpecifics.forEach((item) => { | ||
if (item.selected === 'yes') { | ||
const hiddenInput = document.createElement('input'); | ||
hiddenInput.type = 'hidden'; | ||
hiddenInput.name = `inpDescriptorCheckbox_${item.descriptor_category}_${item.id}`; | ||
hiddenInput.value = 'yes'; | ||
document.getElementById('frmGrin').appendChild(hiddenInput); | ||
|
||
if (item.descriptor_distincts) { | ||
const optionInput = document.createElement('input'); | ||
optionInput.type = 'hidden'; | ||
optionInput.name = `selDescriptorValue_${item.id}`; | ||
optionInput.value = item.selected_option; | ||
document.getElementById('frmGrin').appendChild(optionInput); | ||
} else { | ||
const minInput = document.createElement('input'); | ||
minInput.type = 'hidden'; | ||
minInput.name = `inpDescriptorValueMin_${item.id}`; | ||
minInput.value = item.selected_min; | ||
document.getElementById('frmGrin').appendChild(minInput); | ||
|
||
const maxInput = document.createElement('input'); | ||
maxInput.type = 'hidden'; | ||
maxInput.name = `inpDescriptorValueMax_${item.id}`; | ||
maxInput.value = item.selected_max; | ||
document.getElementById('frmGrin').appendChild(maxInput); | ||
} | ||
} | ||
}); | ||
</script> | ||
|
||
<div id="divTitleText" class="top_bar"> | ||
GRIN Data Explorer - Results | ||
</div> | ||
|
||
<div id="divHelpContainer"> | ||
<script> | ||
const resultsFound = 10; // Replace with actual results count | ||
const missingCultivars = ''; | ||
|
||
if (resultsFound === 0) { | ||
document.write("<p class='clsHelpText'>Sorry, we could not find any results that match your request. Please, <a href='javascript:window.history.back();'>go back</a> and try a different search.</p>"); | ||
} else { | ||
document.write(`<p class='clsHelpText'>We found <strong>${resultsFound}</strong> result(s) that match your request.</p>`); | ||
|
||
if (missingCultivars) { | ||
document.write(`<p class='clsHelpText'>Sorry, the following cultivars you submitted were not found in our database: ${missingCultivars}</p>`); | ||
} | ||
|
||
document.write(`<p class='clsHelpText'>Please note, some traits may contain multiple values.</p>`); | ||
document.write(`<div id='divTopButtonsContainer'><button id='btnTopSubmitMainForm' class='clsButton' type='submit'>Download All Results</button></div>`); | ||
|
||
// Generate the results table dynamically | ||
const table = `<table id='tblGRINResults'> | ||
<thead> | ||
<tr> | ||
<th>GRIN Accession</th> | ||
<th>Descriptor</th> | ||
<th>Value</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
${Array(resultsFound).fill().map((_, i) => `<tr><td>Accession ${i + 1}</td><td>Descriptor ${i + 1}</td><td>Value ${i + 1}</td></tr>`).join('')} | ||
</tbody> | ||
</table>`; | ||
|
||
document.write(table); | ||
document.write(`<div id='divMainButtonsContainer'><button id='btnSubmitMainForm' class='clsButton' type='submit'>Download All Results</button></div>`); | ||
} | ||
</script> | ||
</div> | ||
</form> | ||
</div> | ||
</div> | ||
|
||
<div class="sb_bottom" style="position:relative;bottom:0;left:0;z-index:-10000;padding-top:5em;"> | ||
<!-- Footer content --> | ||
</div> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |
Oops, something went wrong.