sequenceserver 1.1.0.beta3 → 1.1.0.beta4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sequenceserver/api_errors.rb +2 -0
- data/lib/sequenceserver/blast/formatter.rb +8 -11
- data/lib/sequenceserver/blast/job.rb +10 -2
- data/lib/sequenceserver/blast/report.rb +3 -22
- data/lib/sequenceserver/job.rb +23 -17
- data/lib/sequenceserver/job_remover.rb +1 -1
- data/lib/sequenceserver/routes.rb +26 -7
- data/lib/sequenceserver/version.rb +1 -1
- data/public/css/sequenceserver.css +2 -1
- data/public/css/sequenceserver.min.css +3 -3
- data/public/js/errormodal.js +22 -10
- data/public/js/search.js +7 -5
- data/public/sequenceserver-report.min.js +1 -1
- data/public/sequenceserver-search.min.js +2 -2
- data/views/layout.erb +3 -5
- data/views/report.erb +1 -1
- data/views/search.erb +1 -1
- metadata +2 -2
data/public/js/errormodal.js
CHANGED
@@ -1,11 +1,21 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
|
3
|
+
/**
|
4
|
+
* Takes errorData object with title, message, and more_info keys as props. The
|
5
|
+
* component displays a bootstrap modal when mounted. errorData.title is used
|
6
|
+
* to set modal title. errorData.message is inserted as HTML text in modal
|
7
|
+
* body. And errorData.more_info is shown using a pre tag in modal body.
|
8
|
+
*
|
9
|
+
* The component is stateless. The displayed modal dialog cannot be dismissed.
|
10
|
+
* The user must close the tab or press back button to go back to search form.
|
11
|
+
*/
|
3
12
|
class ErrorModal extends React.Component {
|
4
13
|
|
5
14
|
constructor(props) {
|
6
15
|
super(props);
|
7
16
|
}
|
8
17
|
|
18
|
+
// HTML for Bootstrap modal.
|
9
19
|
render() {
|
10
20
|
return (
|
11
21
|
<div
|
@@ -37,19 +47,21 @@ class ErrorModal extends React.Component {
|
|
37
47
|
);
|
38
48
|
}
|
39
49
|
|
50
|
+
// Show the modal once the component is mounted.
|
40
51
|
componentDidMount() {
|
41
|
-
|
52
|
+
// Caller can specify an amount of time to wait for before showing the
|
53
|
+
// modal. This is helpful if the caller wants to finish some work
|
54
|
+
// before showing error modal.
|
55
|
+
setTimeout(function () {
|
56
|
+
$(React.findDOMNode(this.refs.errorModal)).modal('show');
|
57
|
+
}.bind(this), this.props.beforeShow || 0);
|
42
58
|
}
|
43
59
|
}
|
44
60
|
|
61
|
+
/**
|
62
|
+
* Renders ErrorModal.
|
63
|
+
*/
|
45
64
|
export default function showErrorModal (errorData, beforeShow) {
|
46
|
-
|
47
|
-
beforeShow
|
48
|
-
}
|
49
|
-
|
50
|
-
setTimeout(function () {
|
51
|
-
beforeShow();
|
52
|
-
React.render(<ErrorModal errorData={errorData}/>,
|
53
|
-
document.getElementById('view'));
|
54
|
-
}, 500);
|
65
|
+
React.render(<ErrorModal errorData={errorData}
|
66
|
+
beforeShow={beforeShow}/>, document.getElementById('view'));
|
55
67
|
}
|
data/public/js/search.js
CHANGED
@@ -366,11 +366,13 @@ var Query = React.createClass({
|
|
366
366
|
<div
|
367
367
|
className="sequence">
|
368
368
|
<textarea
|
369
|
-
|
370
|
-
|
371
|
-
name="sequence"
|
372
|
-
|
373
|
-
|
369
|
+
id="sequence" ref="textarea"
|
370
|
+
className="form-control text-monospace"
|
371
|
+
name="sequence" value={this.state.value}
|
372
|
+
placeholder="Paste query sequence(s) or drag file
|
373
|
+
containing query sequence(s) in FASTA format here ..."
|
374
|
+
spellCheck="false" autoFocus="true"
|
375
|
+
onChange={this.handleInput}>
|
374
376
|
</textarea>
|
375
377
|
</div>
|
376
378
|
<div
|