From 46df05fd9dc7117800f7b5784fe3e21e5d9935be Mon Sep 17 00:00:00 2001 From: Ryan McKinley Date: Mon, 22 Jun 2020 16:36:58 -0700 Subject: [PATCH] InfluxDB: flux query editor cleanup (#25753) --- .../influxdb/components/FluxQueryEditor.tsx | 12 ++++++------ .../datasource/influxdb/partials/query.editor.html | 10 +++++++--- public/app/plugins/datasource/influxdb/query_ctrl.ts | 11 +++++++++++ 3 files changed, 24 insertions(+), 9 deletions(-) diff --git a/public/app/plugins/datasource/influxdb/components/FluxQueryEditor.tsx b/public/app/plugins/datasource/influxdb/components/FluxQueryEditor.tsx index 1a8e84e42b2..feb3c1ada9c 100644 --- a/public/app/plugins/datasource/influxdb/components/FluxQueryEditor.tsx +++ b/public/app/plugins/datasource/influxdb/components/FluxQueryEditor.tsx @@ -2,7 +2,7 @@ import React, { Component } from 'react'; import coreModule from 'app/core/core_module'; import { InfluxQuery } from '../types'; import { SelectableValue } from '@grafana/data'; -import { InlineFormLabel, LinkButton, Select, TextArea } from '@grafana/ui'; +import { InlineFormLabel, LinkButton, Segment, TextArea } from '@grafana/ui'; interface Props { target: InfluxQuery; @@ -16,7 +16,7 @@ const samples: Array> = [ label: 'Simple query', description: 'filter by measurment and field', value: `from(bucket: "db/rp") - |> range(start: v.timeRangeStart, stop:timeRangeStop) + |> range(start: v.timeRangeStart, stop:v.timeRangeStop) |> filter(fn: (r) => r._measurement == "example-measurement" and r._field == "example-field" @@ -51,7 +51,7 @@ v1.measurements(bucket: v.bucket)`, label: 'Schema Exploration: (fields)', description: 'Return every possible key in a single table', value: `from(bucket: v.bucket) - |> range(start: -30m) + |> range(start: v.timeRangeStart, stop:timeRangeStop) |> keys() |> keep(columns: ["_value"]) |> group() @@ -112,10 +112,10 @@ export class FluxQueryEditor extends Component {
- + Help -