/
githubmirror
/
grafana
Обзор
Документация
Войти
/
githubmirror
/
grafana
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
pkg/expr/query.types.json
453 строки
13 KB
Ryan McKinley
Chore: Update plugin-sdk to v0.292.0 (#123204)
22 апр 2026, 21:03
Не верифицирован
22 апр 2026, 21:03
72aa4e3
Код
Авторство
О чём код?
{ "kind": "QueryTypeDefinitionList", "apiVersion": "datasource.grafana.app/v0alpha1", "metadata": { "resourceVersion": "1709168280033" }, "items": [ { "metadata": { "name": "math", "resourceVersion": "1709915973363", "creationTimestamp": "2024-02-21T22:09:26Z" }, "spec": { "discriminators": [ { "field": "type", "value": "math" } ], "schema": { "$schema": "https://json-schema.org/draft-04/schema", "additionalProperties": false, "properties": { "expression": { "description": "General math expression", "examples": [ "$A + 1", "$A/$B" ], "minLength": 1, "type": "string" } }, "required": [ "expression" ], "type": "object" } } }, { "metadata": { "name": "reduce", "resourceVersion": "1722250145266", "creationTimestamp": "2024-02-21T22:09:26Z" }, "spec": { "discriminators": [ { "field": "type", "value": "reduce" } ], "schema": { "$schema": "https://json-schema.org/draft-04/schema", "additionalProperties": false, "properties": { "expression": { "description": "Reference to single query result", "examples": [ "$A" ], "minLength": 1, "type": "string" }, "reducer": { "description": "The reducer\n\n\nPossible enum values:\n - `\"sum\"` \n - `\"mean\"` \n - `\"min\"` \n - `\"max\"` \n - `\"count\"` \n - `\"last\"` \n - `\"median\"` ", "enum": [ "sum", "mean", "min", "max", "count", "last", "median" ], "type": "string", "x-enum-description": {} }, "settings": { "additionalProperties": false, "description": "Reducer Options", "properties": { "mode": { "description": "Non-number reduce behavior\n\n\nPossible enum values:\n - `\"dropNN\"` Drop non-numbers\n - `\"replaceNN\"` Replace non-numbers", "enum": [ "dropNN", "replaceNN" ], "type": "string", "x-enum-description": { "dropNN": "Drop non-numbers", "replaceNN": "Replace non-numbers" } }, "replaceWithValue": { "description": "Only valid when mode is replace", "type": "number" } }, "required": [ "mode" ], "type": "object" } }, "required": [ "expression", "reducer" ], "type": "object" } } }, { "metadata": { "name": "resample", "resourceVersion": "1722250145266", "creationTimestamp": "2024-02-21T22:09:26Z" }, "spec": { "discriminators": [ { "field": "type", "value": "resample" } ], "schema": { "$schema": "https://json-schema.org/draft-04/schema", "additionalProperties": false, "description": "QueryType = resample", "properties": { "downsampler": { "description": "The downsample function\n\n\nPossible enum values:\n - `\"sum\"` \n - `\"mean\"` \n - `\"min\"` \n - `\"max\"` \n - `\"count\"` \n - `\"last\"` \n - `\"median\"` ", "enum": [ "sum", "mean", "min", "max", "count", "last", "median" ], "type": "string", "x-enum-description": {} }, "expression": { "description": "The math expression", "examples": [ "$A + 1", "$A" ], "minLength": 1, "type": "string" }, "upsampler": { "description": "The upsample function\n\n\nPossible enum values:\n - `\"pad\"` Use the last seen value\n - `\"backfilling\"` backfill\n - `\"fillna\"` Do not fill values (nill)", "enum": [ "pad", "backfilling", "fillna" ], "type": "string", "x-enum-description": { "backfilling": "backfill", "fillna": "Do not fill values (nill)", "pad": "Use the last seen value" } }, "window": { "description": "The time duration", "examples": [ "1d", "10m" ], "minLength": 1, "type": "string" } }, "required": [ "expression", "window", "downsampler", "upsampler" ], "type": "object" } } }, { "metadata": { "name": "classic_conditions", "resourceVersion": "1723675389127", "creationTimestamp": "2024-02-21T22:09:26Z" }, "spec": { "discriminators": [ { "field": "type", "value": "classic_conditions" } ], "schema": { "$schema": "https://json-schema.org/draft-04/schema", "additionalProperties": false, "properties": { "conditions": { "items": { "additionalProperties": false, "description": "ConditionJSON is the JSON model for a single condition in ConditionsCmd.", "properties": { "evaluator": { "additionalProperties": false, "properties": { "params": { "items": { "type": "number" }, "type": "array" }, "type": { "description": "e.g. \"gt\"", "type": "string" } }, "required": [ "params", "type" ], "type": "object" }, "operator": { "additionalProperties": false, "properties": { "type": { "enum": [ "and", "or", "logic-or" ], "type": "string", "x-enum-description": {} } }, "required": [ "type" ], "type": "object" }, "query": { "additionalProperties": false, "properties": { "params": { "items": { "type": "string" }, "type": "array" } }, "required": [ "params" ], "type": "object" }, "reducer": { "additionalProperties": false, "properties": { "type": { "type": "string" } }, "required": [ "type" ], "type": "object" } }, "required": [ "evaluator", "operator", "query", "reducer" ], "type": "object" }, "type": "array" } }, "required": [ "conditions" ], "type": "object" } } }, { "metadata": { "name": "threshold", "resourceVersion": "1709915973363", "creationTimestamp": "2024-02-21T22:09:26Z" }, "spec": { "discriminators": [ { "field": "type", "value": "threshold" } ], "schema": { "$schema": "https://json-schema.org/draft-04/schema", "additionalProperties": false, "properties": { "conditions": { "description": "Threshold Conditions", "items": { "additionalProperties": false, "properties": { "evaluator": { "additionalProperties": false, "properties": { "params": { "items": { "type": "number" }, "type": "array" }, "type": { "description": "e.g. \"gt\"", "enum": [ "gt", "lt", "eq", "ne", "gte", "lte", "within_range", "outside_range", "within_range_included", "outside_range_included" ], "type": "string", "x-enum-description": {} } }, "required": [ "params", "type" ], "type": "object" }, "loadedDimensions": { "additionalProperties": true, "type": "object", "x-grafana-type": "data.DataFrame" }, "unloadEvaluator": { "additionalProperties": false, "properties": { "params": { "items": { "type": "number" }, "type": "array" }, "type": { "description": "e.g. \"gt\"", "enum": [ "gt", "lt", "eq", "ne", "gte", "lte", "within_range", "outside_range", "within_range_included", "outside_range_included" ], "type": "string", "x-enum-description": {} } }, "required": [ "params", "type" ], "type": "object" } }, "required": [ "evaluator" ], "type": "object" }, "type": "array" }, "expression": { "description": "Reference to single query result", "examples": [ "$A" ], "minLength": 1, "type": "string" } }, "required": [ "expression", "conditions" ], "type": "object" } } }, { "metadata": { "name": "sql", "resourceVersion": "1743431268321", "creationTimestamp": "2024-02-29T00:58:00Z" }, "spec": { "discriminators": [ { "field": "type", "value": "sql" } ], "schema": { "$schema": "https://json-schema.org/draft-04/schema", "additionalProperties": false, "description": "SQLQuery requires the sqlExpression feature flag", "properties": { "expression": { "examples": [ "SELECT * FROM A LIMIT 1" ], "minLength": 1, "type": "string" }, "format": { "type": "string" } }, "required": [ "expression", "format" ], "type": "object" } } } ] }