Skip to content

Commit 6d584df

Browse files
ndg63276Mark Williams
andauthored
LIMS-1688: Downstream processing wont display if filesystem not mounted (#953)
Co-authored-by: Mark Williams <mark.williams@diamond.ac.uk>
1 parent 4b63569 commit 6d584df

File tree

2 files changed

+29
-22
lines changed

2 files changed

+29
-22
lines changed

api/src/Downstream/Type/FastEp.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ class FastEp extends DownstreamPlugin {
1010
var $has_mapmodel = array(1, 1);
1111

1212
function results() {
13-
$dat = array();
13+
$dat = array(
14+
'FOM' => 'sad.lst file not found',
15+
'CC' => 'sad.lst file not found',
16+
'ATOMS' => array(array('sad_fa.pdb file not found'))
17+
);
1418

1519
$ats = array();
1620
$pdb = $this->_get_attachments("sad_fa.pdb");

client/src/js/modules/dc/views/fastep.js

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -16,30 +16,33 @@ define(['marionette',
1616
else {
1717
this.ui.plot.width(0.47*(this.options.holderWidth-14))
1818
}
19-
20-
var data = [{ data: this.model.get('PLOTS').FOM, label: 'FOM' },
21-
{ data: this.model.get('PLOTS').CC, label: 'mapCC' }]
22-
var options = {
23-
series: {
24-
lines: { show: true }
25-
},
26-
xaxis: {
27-
ticks: function (axis) {
28-
var res = [], nticks = 6, step = (axis.max - axis.min) / nticks
29-
for (i = 0; i <= nticks; i++) {
30-
res.push(axis.min + i * step)
31-
}
32-
return res
33-
},
34-
tickFormatter: function (val, axis) {
35-
return (1.0/Math.sqrt(val)).toFixed(axis.tickDecimals)
19+
20+
var plotsData = this.model.get('PLOTS');
21+
if (plotsData && Array.isArray(plotsData.FOM) && plotsData.FOM.length > 0 && Array.isArray(plotsData.CC) && plotsData.CC.length > 0) {
22+
var data = [{ data: plotsData.FOM, label: 'FOM' },
23+
{ data: plotsData.CC, label: 'mapCC' }]
24+
var options = {
25+
series: {
26+
lines: { show: true }
3627
},
37-
tickDecimals: 2
28+
xaxis: {
29+
ticks: function (axis) {
30+
var res = [], nticks = 6, step = (axis.max - axis.min) / nticks
31+
for (i = 0; i <= nticks; i++) {
32+
res.push(axis.min + i * step)
33+
}
34+
return res
35+
},
36+
tickFormatter: function (val, axis) {
37+
return (1.0/Math.sqrt(val)).toFixed(axis.tickDecimals)
38+
},
39+
tickDecimals: 2
40+
}
3841
}
42+
var pl = $.extend({}, utils.default_plot, options)
43+
$.plot(this.ui.plot, data, pl)
3944
}
40-
var pl = $.extend({}, utils.default_plot, options)
41-
$.plot(this.ui.plot, data, pl)
4245
},
4346
})
4447

45-
})
48+
})

0 commit comments

Comments
 (0)