Skip to content
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
2 changes: 1 addition & 1 deletion api/src/Downstream/DownstreamProcessing.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ function _get_attachments(
}

$rows = $this->db->pq(
"SELECT appa.filename, appa.filepath, appa.filetype, CONCAT(appa.filepath, '/', appa.filename) as file
"SELECT appa.autoprocprogramattachmentid, appa.filename, appa.filepath, appa.filetype, CONCAT(appa.filepath, '/', appa.filename) as file
FROM autoprocprogramattachment appa
WHERE appa.autoprocprogramid = :1 $where
ORDER BY appa.importancerank,appa.filename",
Expand Down
9 changes: 9 additions & 0 deletions api/src/Downstream/Type/Dimple.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ function results() {
}

$dat['ANODE_PEAKS'] = $this->_get_anode_peaks($this->process['PARAMETERS']['scaling_id']);
$dat['ANODE_MODEL'] = $this->_get_anode_model();

$results = new DownstreamResult($this);
$results->data = $dat;
Expand Down Expand Up @@ -199,4 +200,12 @@ function _get_anode_peaks($scaling_id) {
}
return array('TABLE' => $peaks, 'PLOT' => $plot);
}

function _get_anode_model() {
$model = $this->_get_attachments('anode.html');
if ($model) {
return $model['AUTOPROCPROGRAMATTACHMENTID'];
}
return;
}
}
16 changes: 12 additions & 4 deletions client/src/js/modules/dc/views/dimple.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ define([
rstats_div: '.rstats_div',
blob: '.blobs img',
blobs: '.blobs',
viewer: '.viewer',
},

showBlob: function() {
Expand All @@ -31,6 +32,12 @@ define([

this.ui.blob.hide()

if (this.model.get('ANODE_MODEL')) {
this.ui.viewer.attr('href', app.apiurl+'/download/ap/attachments/' + this.model.get('ANODE_MODEL') + '/dl/2');
} else {
this.ui.viewer.hide()
}

if (this.model.get('BLOBS') > 0) {
this.blob = new XHRImage()
this.blob.onload = this.showBlob.bind(this)
Expand All @@ -44,10 +51,10 @@ define([
this.ui.rstats.width(0.25*(this.options.holderWidth-14))
this.ui.plot.width(0.42*(this.options.holderWidth-14))
this.ui.plot.height(this.ui.plot.width()*0.41-80)
this.ui.rstats_div.height(this.ui.plot.width()*0.41-80)
this.ui.rstats_div.height(this.ui.plot.height())
}

this.ui.blobs.css('min-height', this.ui.plot.width()*0.41-80)
this.ui.blobs.css('min-height', this.ui.plot.height())

var data = [{ data: this.model.get('PLOTS').FVC, label: 'Rfree vs. Cycle' },
{ data: this.model.get('PLOTS').RVC, label: 'R vs. Cycle' }]
Expand All @@ -56,8 +63,9 @@ define([

const anodePeaks = this.model.get('ANODE_PEAKS');
if (anodePeaks && anodePeaks.TABLE && anodePeaks.TABLE.length > 0) {
this.ui.plot_anode.width(0.42 * (this.options.holderWidth - 14))
this.ui.plot_anode.height(this.ui.plot.width() * 0.41 - 80)
this.ui.plot_anode.width(this.ui.plot.width())
this.ui.plot_anode.height(this.ui.plot.height())
this.ui.blobs.css('min-height', this.ui.plot.height() + this.ui.plot_anode.height())

var anode_data = [{ data: anodePeaks.PLOT, label: 'Peak Height (sig)' }]
var anode_pl = $.extend({}, utils.default_plot, { series: { lines: { show: true }}});
Expand Down
2 changes: 1 addition & 1 deletion client/src/js/templates/dc/dc_dimple.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<div>
<% if (ANODE_PEAKS && ANODE_PEAKS.TABLE && ANODE_PEAKS.TABLE.length) { %>
<div class="plot_anode r"></div>
<div class="larger">Top 10 Anode Peaks</div>
<div><span class="larger">Top 10 Anode Peaks</span> &nbsp; <a class="viewer dll button" href="#"><i class="fa fa-search"></i> Interactive Viewer</a></div>
<table class="rstats align_center">
<tr>
<td>X</td>
Expand Down
Loading