Merge pull request #1182 from influxdata/hotfix/979-no-rp
Update schema exploration to support non-default rppull/1186/head
commit
59281e2c1c
|
@ -12,6 +12,7 @@
|
|||
1. [#1164](https://github.com/influxdata/chronograf/pull/1164): Restore ability to save raw queries to a Dashboard Cell
|
||||
1. [#1115](https://github.com/influxdata/chronograf/pull/1115): Fix Basepath issue where content would fail to render under certain circumstances
|
||||
1. [#1173](https://github.com/influxdata/chronograf/pull/1173): Fix saving email in Kapacitor alerts
|
||||
1. [#979](https://github.com/influxdata/chronograf/issues/979): Fix empty tags for non-default retention policies
|
||||
1. [#1179](https://github.com/influxdata/chronograf/pull/1179): Admin Databases Page will render a database without retention policies
|
||||
|
||||
### Features
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import AJAX from 'utils/ajax'
|
||||
import _ from 'lodash'
|
||||
import {buildInfluxUrl, proxy} from 'utils/queryUrlGenerator'
|
||||
|
||||
export const showDatabases = async (source) => {
|
||||
|
@ -36,14 +37,15 @@ export function showMeasurements(source, db) {
|
|||
}
|
||||
|
||||
export function showTagKeys({source, database, retentionPolicy, measurement}) {
|
||||
const query = `SHOW TAG KEYS FROM "${measurement}"`
|
||||
|
||||
const rp = _.toString(retentionPolicy)
|
||||
const query = `SHOW TAG KEYS FROM "${rp}"."${measurement}"`
|
||||
return proxy({source, db: database, rp: retentionPolicy, query})
|
||||
}
|
||||
|
||||
export function showTagValues({source, database, retentionPolicy, measurement, tagKeys}) {
|
||||
const keys = tagKeys.sort().map((k) => `"${k}"`).join(', ')
|
||||
const query = `SHOW TAG VALUES FROM "${measurement}" WITH KEY IN (${keys})`
|
||||
const rp = _.toString(retentionPolicy)
|
||||
const query = `SHOW TAG VALUES FROM "${rp}"."${measurement}" WITH KEY IN (${keys})`
|
||||
|
||||
return proxy({source, db: database, rp: retentionPolicy, query})
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue