Skip to content

Commit e1b0ec5

Browse files
authored
Merge pull request #471 from ImagingDataCommons/user/mt/multi-part-manifest
Add limit to 10 files for manifest download
2 parents c1081fa + fe2cd58 commit e1b0ec5

File tree

3 files changed

+22
-1
lines changed

3 files changed

+22
-1
lines changed

static/css/style.css

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

static/js/image_search.js

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1756,13 +1756,27 @@ require([
17561756
if (data.file_parts_count > 1)
17571757
{
17581758
select_box_div.show();
1759-
for (let i = 0; i < data.file_parts_count; ++i)
1759+
for (let i = 0; i < data.display_file_parts_count; ++i)
17601760
{
17611761
select_box.append($('<option/>', {
17621762
value: i,
17631763
text : "File Part " + (i + 1)
17641764
}));
17651765
}
1766+
1767+
var file_limit_message = $('#file-part-limit-reached-message');
1768+
if (data.display_file_parts_count < data.file_parts_count)
1769+
{
1770+
file_limit_message.show();
1771+
file_limit_message.html(
1772+
'<span>* This cohort\'s manifest has reached the limit of ' +
1773+
data.display_file_parts_count + ' file parts.' +
1774+
' Please use the BigQuery option to access all ' + data.file_parts_count + ' parts.</span>');
1775+
}
1776+
else
1777+
{
1778+
file_limit_message.hide();
1779+
}
17661780
}
17671781
else
17681782
{

templates/cohorts/export-manifest-modal.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,9 @@ <h4 class="modal-title" id="exportManifestModal">Export Cohort Manifest</h4>
133133
<select class="form-control">
134134
</select>
135135
<br>
136+
<div id="file-part-limit-reached-message">
137+
</div>
138+
<br>
136139
</div>
137140

138141
<span><input id="include-header-checkbox" type="checkbox" checked> Include header fields (CSV and TSV only)</span>

0 commit comments

Comments
 (0)