Display user defined functions

pull/10616/head
Andrew Watkins 2018-05-15 14:35:20 -07:00
parent a7c7945042
commit 5e35865888
2 changed files with 3 additions and 3 deletions

View File

@ -39,7 +39,7 @@ export default class VariableName extends PureComponent<Props, State> {
const {name} = this.props
const split = name.split('=')
const varName = split[0].substring(0, split[0].length - 1)
const varValue = split[1].substring(1)
const varValue = this.props.name.replace(/^[^=]+=/, '')
const valueIsString = varValue.endsWith('"')

View File

@ -40,8 +40,8 @@ export class IFQLPage extends PureComponent<Props, State> {
ast: null,
data: 'Hit "Get Data!" or Ctrl + Enter to run your script',
suggestions: [],
script: `tele = from(db: "telegraf")
tele |> sum()`,
script: `fil = (r) => r._measurement == "cpu"
tele = from(db: "telegraf") |> filter(fn: fil) |> range(start: -1m) |> sum()`,
}
}