Skip to content

Commit 9890017

Browse files
committed
-> Cohort manifest exporter always defaulting to large manifest functionality
1 parent ac12079 commit 9890017

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

static/js/cohorts/export-manifest.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -93,15 +93,15 @@ require([
9393
mxseries+= window.selProjects[proj].mxseries;
9494
mxstudies+= window.selProjects[proj].mxstudies;
9595
}
96-
9796
var filterSets = new Array();
9897
for (var i=0; i< window.cartHist.length;i++) {
9998
filterSets.push(window.cartHist[i]['filter'])
10099
}
101100
update_export_modal_for_cart(partitions, filterSets);
102101
} else if (button.hasClass('cart-export-from-cp')){
103102
update_export_modal_for_cart(window.partitions, window.filtergrp_list);
104-
103+
} else if(button.hasClass('cohort-manifest-export')) {
104+
$('input[name="async_download"]').val(parseInt(button.attr('data-series-count').val()) > 65000 ? "True" : "False");
105105
}
106106
});
107107

@@ -157,7 +157,7 @@ require([
157157
$('.modal-title').text('Export Manifest');
158158
}
159159

160-
const update_export_modal_for_mini= function(button){
160+
const update_export_modal_for_mini = function(button){
161161
var title='';
162162
var filterNm='';
163163
var mini_type='';
@@ -336,7 +336,7 @@ require([
336336
window.debugArr.push(tmp);
337337
}
338338

339-
if(manifest_type == 'file-manifest' && $('input[name="async_download"]').val() !== "True") {
339+
if(manifest_type == 'file-manifest' && $('input[name="async_download"]').val().lower() !== "true") {
340340
console.debug($('#export-manifest-form').find('input[name="partitions"]').val());
341341
$('#export-manifest-form').trigger('submit');
342342
} else {
@@ -376,7 +376,6 @@ require([
376376
}
377377
});
378378
}
379-
380379
};
381380

382381
$('input.loc_type').on('change', function(){
@@ -413,7 +412,6 @@ require([
413412
}
414413

415414
var update_download_manifest_buttons = function(clicked){
416-
417415
if(clicked) {
418416
let cohort_row = clicked.parents('tr'),
419417
inactives = (cohort_row.data('inactive-versions') === "True");
@@ -452,7 +450,6 @@ require([
452450
update_download_manifest_buttons();
453451
});
454452

455-
456453
let bq_disabled_message = 'Exporting to BigQuery requires you to be logged in with a linked Google Social Account, and to save your filters as a cohort.';
457454
if((!user_is_social) && (typeof(user_id)!=="undefined")){
458455
bq_disabled_message += ' You can link your account to a Google ID from the '

templates/cohorts/cohort_list.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ <h1 class="page-header pull-left">Cohorts</h1>
128128
data-toggle="modal"
129129
data-cohort-id="{{ cohort.id }}"
130130
data-target="#export-manifest-modal"
131+
data-series-count="{{ cohort.series_count }}"
131132
aria-label="export-manifests" role="button"
132133
aria-expanded="true">
133134
<i class="fa-solid fa-clipboard"></i>

0 commit comments

Comments
 (0)