diff --git a/CHANGELOG.md b/CHANGELOG.md index 9cfd981291..791a97735f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -37,6 +37,7 @@ 1. [#3402](https://github.com/influxdata/chronograf/pull/3402): Fix missing icons when using basepath 1. [#3412](https://github.com/influxdata/chronograf/pull/3412): Limit max-width of TICKScript editor. 1. [#3166](https://github.com/influxdata/chronograf/pull/3166): Fixes naming of new TICKScripts +1. [#3449](https://github.com/influxdata/chronograf/pull/3449): Fixes data explorer query error reporting regression 1. [#3453](https://github.com/influxdata/chronograf/pull/3453): Fix Kapacitor Logs fetch regression ## v1.4.4.1 [2018-04-16] diff --git a/ui/src/data_explorer/components/Table.tsx b/ui/src/data_explorer/components/Table.tsx index d49bdab994..515701ebeb 100644 --- a/ui/src/data_explorer/components/Table.tsx +++ b/ui/src/data_explorer/components/Table.tsx @@ -225,7 +225,7 @@ class ChronoTable extends PureComponent { try { const {results} = await fetchTimeSeriesAsync({ source: this.source, - query: query.text, + query, tempVars: TEMPLATES, }) diff --git a/ui/src/shared/actions/timeSeries.ts b/ui/src/shared/actions/timeSeries.ts index d9ed0ab928..7f5c852ee2 100644 --- a/ui/src/shared/actions/timeSeries.ts +++ b/ui/src/shared/actions/timeSeries.ts @@ -51,14 +51,24 @@ export const handleError = (error, query, editQueryStatus) => { }) } +interface Query { + host: string | string[] + text: string + id: string + database?: string + db?: string + rp?: string +} + interface Payload { source: string - query: string + query: Query tempVars: any[] db?: string rp?: string resolution?: number } + export const fetchTimeSeriesAsync = async ( {source, db, rp, query, tempVars, resolution}: Payload, editQueryStatus = noop @@ -69,7 +79,7 @@ export const fetchTimeSeriesAsync = async ( source, db, rp, - query, + query: query.text, tempVars, resolution, }) diff --git a/ui/src/shared/apis/query.ts b/ui/src/shared/apis/query.ts index 6d280239c5..d3540f4a2a 100644 --- a/ui/src/shared/apis/query.ts +++ b/ui/src/shared/apis/query.ts @@ -29,6 +29,7 @@ interface Query { database: string db: string rp: string + id: string } const parseSource = source => { @@ -46,7 +47,7 @@ export const fetchTimeSeries = async ( editQueryStatus: () => any ) => { const timeSeriesPromises = queries.map(query => { - const {host, database, rp, text} = query + const {host, database, rp} = query // the key `database` was used upstream in HostPage.js, and since as of this writing // the codebase has not been fully converted to TypeScript, it's not clear where else // it may be used, but this slight modification is intended to allow for the use of @@ -72,7 +73,7 @@ export const fetchTimeSeries = async ( const tempVars = removeUnselectedTemplateValues(templatesWithIntervalVals) const source = parseSource(host) - const payload = {source, db, rp, query: text, tempVars, resolution} + const payload = {source, db, rp, query, tempVars, resolution} return fetchTimeSeriesAsync(payload, editQueryStatus) }) diff --git a/ui/src/shared/components/AutoRefresh.tsx b/ui/src/shared/components/AutoRefresh.tsx index cfbb2f5a53..98b8234b7a 100644 --- a/ui/src/shared/components/AutoRefresh.tsx +++ b/ui/src/shared/components/AutoRefresh.tsx @@ -18,6 +18,7 @@ interface Query { database: string db: string rp: string + id: string } interface TemplateQuery {