From 3829314818915e4b1f233b8bb736d8ccc0c89751 Mon Sep 17 00:00:00 2001 From: Bill Murrin Date: Fri, 5 Jan 2018 20:25:15 -1000 Subject: [PATCH] create search URL properly for undefined stream_id --- src/web/components/QuickValuesPlusVisualization.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/web/components/QuickValuesPlusVisualization.jsx b/src/web/components/QuickValuesPlusVisualization.jsx index de57cb1..b8a23cf 100644 --- a/src/web/components/QuickValuesPlusVisualization.jsx +++ b/src/web/components/QuickValuesPlusVisualization.jsx @@ -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} ${d.term}`; }