Update template variables from TV Query Builder to new :var: syntax

pull/10616/head
Jared Scheib 2017-04-26 19:21:53 -07:00
parent 0175860f61
commit 402c1f4c30
2 changed files with 7 additions and 7 deletions

View File

@ -65,8 +65,8 @@ export const TEMPLATE_VARIABLE_TYPES = {
export const TEMPLATE_VARIABLE_QUERIES = {
databases: 'SHOW DATABASES',
measurements: 'SHOW MEASUREMENTS ON $database',
fieldKeys: 'SHOW FIELD KEYS ON $database FROM $measurement',
tagKeys: 'SHOW TAG KEYS ON $database FROM $measurement',
tagValues: 'SHOW TAG VALUES ON $database FROM $measurement WITH KEY=$tagKey',
measurements: 'SHOW MEASUREMENTS ON :database:',
fieldKeys: 'SHOW FIELD KEYS ON :database: FROM :measurement:',
tagKeys: 'SHOW TAG KEYS ON :database: FROM :measurement:',
tagValues: 'SHOW TAG VALUES ON :database: FROM :measurement: WITH KEY=:tagKey:',
}

View File

@ -13,7 +13,7 @@ const q = ({
if (database) {
tempVars.push({
tempVar: '$database',
tempVar: ':database:',
values: [
{
type: 'database',
@ -24,7 +24,7 @@ const q = ({
}
if (measurement) {
tempVars.push({
tempVar: '$measurement',
tempVar: ':measurement:',
values: [
{
type: 'measurement',
@ -35,7 +35,7 @@ const q = ({
}
if (tagKey) {
tempVars.push({
tempVar: '$tagKey',
tempVar: ':tagKey:',
values: [
{
type: 'tagKey',