Skip to content

Commit

Permalink
Merge pull request #39 from billmurrin/34-wrong-stream-urls
Browse files Browse the repository at this point in the history
create search URL properly for undefined stream_id
  • Loading branch information
billmurrin authored Jan 6, 2018
2 parents f6718a9 + 3829314 commit 1ecb01b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/web/components/QuickValuesPlusVisualization.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,8 @@ const QuickValuesPlusVisualization = React.createClass({
//Properly format strings containing spaces, backslashes and colons.
let escTerm = this.escape(`${d.term}`);
let appendQuery = (this.props.config.query == "") ? this.props.config.field + ":" + escTerm : this.props.config.query + " AND " + this.props.config.field + ":" + escTerm;
let replayURL = Routes.stream_search(this.props.config.stream_id, appendQuery, this._getTimeRange(), this.props.config.interval);
let replayURL = (this.props.config.stream_id == undefined) ? Routes.search(appendQuery, this._getTimeRange(), this.props.config.interval) : Routes.stream_search(this.props.config.stream_id, appendQuery, this._getTimeRange(), this.props.config.interval);

return `${colourBadge} <a href="${replayURL}">${d.term}</a>`;

}
Expand Down

0 comments on commit 1ecb01b

Please sign in to comment.