Loki: Add step parameter to Loki query (#69558)

pull/69564/head
Ivana Huckova 2 years ago committed by GitHub
parent 3227d0b5fd
commit 49c940de23
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      docs/sources/developers/kinds/composable/loki/dataquery/schema-reference.md
  2. 4
      packages/grafana-schema/src/raw/composable/loki/dataquery/x/LokiDataQuery_types.gen.ts
  3. 3
      pkg/tsdb/loki/kinds/dataquery/types_dataquery_gen.go
  4. 2
      public/app/plugins/datasource/loki/dataquery.cue
  5. 4
      public/app/plugins/datasource/loki/dataquery.gen.ts

@ -26,5 +26,6 @@ title: LokiDataQuery kind
| `queryType` | string | No | | Specify the query flavor<br/>TODO make this required and give it a default |
| `range` | boolean | No | | @deprecated, now use queryType. |
| `resolution` | integer | No | | Used to scale the interval value. |
| `step` | string | No | | Used to set step value for range queries. |

@ -59,4 +59,8 @@ export interface LokiDataQuery extends common.DataQuery {
* Used to scale the interval value.
*/
resolution?: number;
/**
* Used to set step value for range queries.
*/
step?: string;
}

@ -105,6 +105,9 @@ type LokiDataQuery struct {
// Used to scale the interval value.
Resolution *int64 `json:"resolution,omitempty"`
// Used to set step value for range queries.
Step *string `json:"step,omitempty"`
}
// LokiQueryDirection defines model for LokiQueryDirection.

@ -44,6 +44,8 @@ composableKinds: DataQuery: {
range?: bool
// @deprecated, now use queryType.
instant?: bool
// Used to set step value for range queries.
step?: string
#QueryEditorMode: "code" | "builder" @cuetsy(kind="enum")

@ -60,4 +60,8 @@ export interface Loki extends common.DataQuery {
* Used to scale the interval value.
*/
resolution?: number;
/**
* Used to set step value for range queries.
*/
step?: string;
}

Loading…
Cancel
Save