Skip to content

Fix 2230 #2372

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Oct 23, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 26 additions & 2 deletions qiita_pet/templates/sitebase.html
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,12 @@
});
});

$('#qiita_download_accept').click(function(e){
e.preventDefault();
$('.qiita_pet_download_confirm').modal('hide');
window.location.href = '{% raw qiita_config.portal_dir %}/release/download/public';
});

// Based on http://codepen.io/willvincent/pen/LbeKKW
// and https://datatables.net/examples/api/row_details.html

Expand Down Expand Up @@ -555,11 +561,11 @@ <h6>
<a href="#" data-toggle="dropdown" class="dropdown-toggle">Downloads<b class="caret"></b></a>
<ul class="dropdown-menu">
<li>
<a href="{% raw qiita_config.portal_dir %}/release/download/public">
<a type="button" data-toggle="modal" data-target=".qiita_pet_download_confirm">
Public BIOM and metadata files
<small>
<br/><b>MD5:</b> {{public_md5}}
<br/><b>Last update:</b>{{public_timestamp}}
<br/><b>Last update:</b> {{public_timestamp}}
</small>
</a>
</li>
Expand All @@ -570,6 +576,24 @@ <h6>
</div>
</div> <!--/.main nav-bar -->

<div class="modal fade qiita_pet_download_confirm" tabindex="-1" role="dialog" aria-labelledby="Confirm download">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title">File really big.</h4>
</div>
<div class="modal-body">
<p>The file you're trying to download is really big. Would you like to proceed?</p>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-danger" data-dismiss="modal">No</button>
<button type="button" class="btn btn-success" id="qiita_download_accept">Yes</button>
</div>
</div>
</div>
</div>


{% if message != '' %}
{% if level not in {'danger', 'success', 'info', 'warning'} %}
Expand Down
15 changes: 0 additions & 15 deletions qiita_pet/test/test_download.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,21 +161,6 @@ def test_download_study(self):
response = self.get('/download_study_bioms/1')
self.assertEqual(response.code, 200)
exp = (
'- 1256812 /protected/processed_data/1_study_1001_closed_'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why has this being deleted? I'd to fix this recently by adding this, so I'm surprised now that it needs to be removed.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Those lines had a conflict between the master and dev branches, which I fixed by deleting them. BTW the tests are passing.

'reference_otu_table.biom processed_data/1_study_1001_closed_'
'reference_otu_table.biom\n'
'- 36615 /protected/templates/1_prep_1_qiime_[0-9]*-'
'[0-9]*.txt mapping_files/4_mapping_file.txt\n'
'- 1256812 /protected/processed_data/'
'1_study_1001_closed_reference_otu_table.biom processed_data/'
'1_study_1001_closed_reference_otu_table.biom\n'
'- 36615 /protected/templates/1_prep_1_qiime_[0-9]*-'
'[0-9]*.txt mapping_files/5_mapping_file.txt\n'
'- 1256812 /protected/processed_data/'
'1_study_1001_closed_reference_otu_table_Silva.biom processed_data'
'/1_study_1001_closed_reference_otu_table_Silva.biom\n'
'- 36615 /protected/templates/1_prep_1_qiime_[0-9]*-'
'[0-9]*.txt mapping_files/6_mapping_file.txt\n'
'- [0-9]* /protected/BIOM/{0}/otu_table.biom '
'BIOM/{0}/otu_table.biom\n'
'- 1 /protected/BIOM/{0}/sortmerna_picked_otus/seqs_otus.log '
Expand Down