Skip to content

Commit 9cb94d2

Browse files
committed
Merge branch 'master' of https://github.com/ImagingDataCommons/IDC-WebApp into idc-test-sp
2 parents 943e7df + 4f98eb0 commit 9cb94d2

File tree

4 files changed

+24
-50
lines changed

4 files changed

+24
-50
lines changed

static/js/cohorts/cohort-details.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,16 +55,6 @@ require([
5555
], function($, jqueryui, base, tippy, bootstrap) {
5656
A11y.Core();
5757

58-
tippy('.manifest-size-warning',{
59-
content: 'Your cohort is too large to be downloaded in its entirety, and will be truncated at 65,000 records ' +
60-
'ordered by PatientID, CollectionID, StudyInstanceUID, SeriesInstanceUID, SOPInstanceUID, SourceDOI, ' +
61-
'CRDCInstanceUUID, and GCS_URL.',
62-
theme: 'light',
63-
placement: 'left',
64-
arrow: false,
65-
maxWidth: 400
66-
});
67-
6858
var enable_buttons = function() {
6959
$('#download-csv').removeAttr('disabled');
7060
$('#download-tsv').removeAttr('disabled');

static/js/image_search.js

Lines changed: 18 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1745,43 +1745,27 @@ require([
17451745
success: function (data) {
17461746
var isFiltered = Boolean($('#search_def p').length>0);
17471747
if (is_cohort) {
1748-
if(data.total > 65000) {
1749-
$('.manifest-size-warning').show();
1748+
if (data.file_parts_count > data.display_file_parts_count) {
1749+
$('#file-export-option').prop('title', 'Your cohort exceeds the maximum for download.');
1750+
$('#file-manifest-max-exceeded').show();
1751+
$('#file-export-option input').prop('disabled', 'disabled');
1752+
$('#file-export-option input').prop('checked', false);
1753+
$('#bq-export-option input').prop('checked', true).trigger("click");
17501754
} else {
1751-
$('.manifest-size-warning').hide();
1752-
}
1753-
1754-
var select_box_div = $('#file-part-select-box');
1755-
var select_box = select_box_div.find('select');
1756-
if (data.file_parts_count > 1)
1757-
{
1758-
select_box_div.show();
1759-
for (let i = 0; i < data.display_file_parts_count; ++i)
1760-
{
1761-
select_box.append($('<option/>', {
1762-
value: i,
1763-
text : "File Part " + (i + 1)
1764-
}));
1765-
}
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();
1755+
var select_box_div = $('#file-part-select-box');
1756+
var select_box = select_box_div.find('select');
1757+
if (data.file_parts_count > 1) {
1758+
select_box_div.show();
1759+
for (let i = 0; i < data.display_file_parts_count; ++i) {
1760+
select_box.append($('<option/>', {
1761+
value: i,
1762+
text : "File Part " + (i + 1)
1763+
}));
1764+
}
1765+
} else {
1766+
select_box_div.hide();
17791767
}
17801768
}
1781-
else
1782-
{
1783-
select_box_div.hide();
1784-
}
17851769
} else {
17861770
if (isFiltered && data.total > 0){
17871771
$('#save-cohort-btn').prop('disabled','');

templates/cohorts/cohort_details.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ <h3 class="pull-left" role="heading" aria-level="1">Cohort Name: {{ cohort.name
4242
</div>
4343
<div class="col-lg-4 col-md-4 col-sm-4 col-xs-4">
4444
<div class="cohort-manifest pull-right">
45-
<div class="manifest-size-warning"><i class="fa fa-warning"></i></div>
4645
<button id="export-manifest" class="btn btn-special pull-right" data-toggle="modal"
4746
data-target="#export-manifest-modal"> Export Cohort Manifest
4847
</button>

templates/cohorts/export-manifest-modal.html

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ <h4 class="modal-title" id="exportManifestModal">Export Cohort Manifest</h4>
1818
<button type="button" class="close" data-hide="alert"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
1919
At least one column needs to be selected to export manifest file.
2020
</div>
21+
<div id="file-manifest-max-exceeded" class="alert alert-warning alert-dismissable" style="display: none;">
22+
<button type="button" class="close" data-hide="alert"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
23+
Your manifest is too large to be downloaded. Please use our BigQuery export option. (This requires a Google Account login.)
24+
</div>
2125
</div>
2226
</div>
2327

@@ -116,8 +120,8 @@ <h4 class="modal-title" id="exportManifestModal">Export Cohort Manifest</h4>
116120

117121
<!-- Export Option -->
118122
<div class="export-option">
119-
<span class="value"><input type="radio" name="manifest-type" value="file-manifest" checked> Files</span>
120-
<span style="margin-left:10px" class="value" {% if not is_social %}title="Export to BigQuery is only available with a Google Account."{% endif %}>
123+
<span id="file-export-option" title="" class="value"><input type="radio" name="manifest-type" value="file-manifest" checked> Files</span>
124+
<span id="bq-export-option" style="margin-left:10px" class="value" {% if not is_social %}title="Export to BigQuery is only available with a Google Account."{% endif %}>
121125
<input type="radio" name="manifest-type" value="bq-manifest" {% if not is_social %}disabled{% endif %}> BigQuery</span>
122126
</div>
123127
<br>
@@ -133,9 +137,6 @@ <h4 class="modal-title" id="exportManifestModal">Export Cohort Manifest</h4>
133137
<select class="form-control">
134138
</select>
135139
<br>
136-
<div id="file-part-limit-reached-message">
137-
</div>
138-
<br>
139140
</div>
140141

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

0 commit comments

Comments
 (0)