Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/release_18.05' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
dannon committed Jun 20, 2018
2 parents 1c7387c + bcf105c commit f9ba72f
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 59 deletions.
33 changes: 12 additions & 21 deletions client/galaxy/scripts/layout/modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,28 +68,19 @@ $.extend(Modal.prototype, {
this.$body.html(body);
},
show: function(options, callback) {
if (!this.$dialog.is(":visible")) {
if (options.backdrop) {
this.$backdrop.addClass("in");
} else {
this.$backdrop.removeClass("in");
}
this.$overlay.show();
this.$dialog.show();
this.$overlay.addClass("in");
// Fix min-width so that modal cannot shrink considerably if new content is loaded.
this.$body.css("min-width", this.$body.width());
// Set max-height so that modal does not exceed window size and is in middle of page.
// TODO: this could perhaps be handled better using CSS.
this.$body.css(
"max-height",
$(window).height() -
this.$footer.outerHeight() -
this.$header.outerHeight() -
parseInt(this.$dialog.css("padding-top"), 10) -
parseInt(this.$dialog.css("padding-bottom"), 10)
);
if (options.backdrop) {
this.$backdrop.addClass("in");
} else {
this.$backdrop.removeClass("in");
}
this.$overlay.show();
this.$dialog.show();
this.$overlay.addClass("in");
// Fix min-width so that modal cannot shrink considerably if new content is loaded.
this.$body.css("min-width", this.$body.width());
// Set max-height so that modal does not exceed window size and is in middle of page.
// TODO: this could perhaps be handled better using CSS.
this.$body.css("max-height", $(window).height() / 1.5);
// Callback on init
if (callback) {
callback();
Expand Down
4 changes: 3 additions & 1 deletion config/plugins/visualizations/msa/config/msa.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
<data_source>
<model_class>HistoryDatasetAssociation</model_class>
<test test_attr="ext" result_type="datatype">txt</test>
<test test_attr="ext" result_type="datatype">fasta</test>
<test test_attr="ext" result_type="datatype">phylip</test>
<to_param param_attr="id">dataset_id</to_param>
</data_source>
</data_sources>
Expand Down Expand Up @@ -36,4 +38,4 @@
<value>true</value>
</input>
</settings>
</visualization>
</visualization>
89 changes: 52 additions & 37 deletions scripts/grt/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,16 +228,20 @@ def annotate(label, human_label=None):
if job[2] in blacklisted_tools:
continue

handle_job.write(str(job[0])) # id
handle_job.write('\t')
handle_job.write(job[2]) # tool_id
handle_job.write('\t')
handle_job.write(job[3]) # tool_version
handle_job.write('\t')
handle_job.write(job[4]) # state
handle_job.write('\t')
handle_job.write(str(job[5])) # create_time
handle_job.write('\n')
try:
handle_job.write(str(job[0])) # id
handle_job.write('\t')
handle_job.write(job[2]) # tool_id
handle_job.write('\t')
handle_job.write(job[3]) # tool_version
handle_job.write('\t')
handle_job.write(job[4]) # state
handle_job.write('\t')
handle_job.write(str(job[5])) # create_time
handle_job.write('\n')
except Exception:
logging.warning("Unable to write out a 'handle_job' row. Ignoring the row.", exc_info=True)
continue
# meta counts
job_state_data[job[4]] += 1
active_users[job[1]] += 1
Expand Down Expand Up @@ -310,19 +314,22 @@ def annotate(label, human_label=None):
if dataset_id is None:
continue

handle_datasets.write(str(job[0]))
handle_datasets.write('\t')
handle_datasets.write(str(hda_id))
handle_datasets.write('\t')
handle_datasets.write(str(hdas[hda_id][1]))
handle_datasets.write('\t')
handle_datasets.write(str(datasets[dataset_id][0]))
handle_datasets.write('\t')
handle_datasets.write(str(job[2]))
handle_datasets.write('\t')
handle_datasets.write(str(filetype))
handle_datasets.write('\n')

try:
handle_datasets.write(str(job[0]))
handle_datasets.write('\t')
handle_datasets.write(str(hda_id))
handle_datasets.write('\t')
handle_datasets.write(str(hdas[hda_id][1]))
handle_datasets.write('\t')
handle_datasets.write(str(datasets[dataset_id][0]))
handle_datasets.write('\t')
handle_datasets.write(str(job[2]))
handle_datasets.write('\t')
handle_datasets.write(str(filetype))
handle_datasets.write('\n')
except Exception:
logging.warning("Unable to write out a 'handle_datasets' row. Ignoring the row.", exc_info=True)
continue
handle_datasets.close()
annotate('export_datasets_end')

Expand All @@ -342,14 +349,18 @@ def annotate(label, human_label=None):
if job_tool_map[metric[0]] in blacklisted_tools:
continue

handle_metric_num.write(str(metric[0]))
handle_metric_num.write('\t')
handle_metric_num.write(metric[1])
handle_metric_num.write('\t')
handle_metric_num.write(metric[2])
handle_metric_num.write('\t')
handle_metric_num.write(str(metric[3]))
handle_metric_num.write('\n')
try:
handle_metric_num.write(str(metric[0]))
handle_metric_num.write('\t')
handle_metric_num.write(metric[1])
handle_metric_num.write('\t')
handle_metric_num.write(metric[2])
handle_metric_num.write('\t')
handle_metric_num.write(str(metric[3]))
handle_metric_num.write('\n')
except Exception:
logging.warning("Unable to write out a 'handle_metric_num' row. Ignoring the row.", exc_info=True)
continue
handle_metric_num.close()
annotate('export_metric_num_end')

Expand All @@ -371,12 +382,16 @@ def annotate(label, human_label=None):

sanitized = san.sanitize_data(job_tool_map[param[0]], param[1], param[2])

handle_params.write(str(param[0]))
handle_params.write('\t')
handle_params.write(param[1])
handle_params.write('\t')
handle_params.write(json.dumps(sanitized))
handle_params.write('\n')
try:
handle_params.write(str(param[0]))
handle_params.write('\t')
handle_params.write(param[1])
handle_params.write('\t')
handle_params.write(json.dumps(sanitized))
handle_params.write('\n')
except Exception:
logging.warning("Unable to write out a 'handle_params' row. Ignoring the row.", exc_info=True)
continue
handle_params.close()
annotate('export_params_end')

Expand Down

0 comments on commit f9ba72f

Please sign in to comment.