|
9351 | 9351 | "$ref": "#/components/schemas/DashboardPanelQuery" |
9352 | 9352 | }, |
9353 | 9353 | "maxItems": 26, |
9354 | | - "description": "Queries in the panel. `time_series` accepts 1–26, `text` and `incident_list` accept none, every other kind accepts exactly one." |
| 9354 | + "description": "Queries in the panel. `time_series` accepts 1–26, `text` accepts none, every other kind accepts exactly one." |
9355 | 9355 | }, |
9356 | 9356 | "viz_config": { |
9357 | 9357 | "$ref": "#/components/schemas/DashboardVizConfig" |
|
9493 | 9493 | "name": { |
9494 | 9494 | "type": "string", |
9495 | 9495 | "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$", |
9496 | | - "description": "Variable name used in `{{ }}` templates, at most 64 characters." |
| 9496 | + "description": "Variable name used in `{{ }}` templates, at most 64 characters. Names starting with `__` are reserved for built-in time variables." |
9497 | 9497 | }, |
9498 | 9498 | "label": { |
9499 | 9499 | "type": "string", |
|
9541 | 9541 | "name": { |
9542 | 9542 | "type": "string", |
9543 | 9543 | "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$", |
9544 | | - "description": "Variable name used in `{{ }}` templates, at most 64 characters." |
| 9544 | + "description": "Variable name used in `{{ }}` templates, at most 64 characters. Names starting with `__` are reserved for built-in time variables." |
9545 | 9545 | }, |
9546 | 9546 | "label": { |
9547 | 9547 | "type": "string", |
|
9585 | 9585 | "name": { |
9586 | 9586 | "type": "string", |
9587 | 9587 | "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$", |
9588 | | - "description": "Variable name used in `{{ }}` templates, at most 64 characters." |
| 9588 | + "description": "Variable name used in `{{ }}` templates, at most 64 characters. Names starting with `__` are reserved for built-in time variables." |
9589 | 9589 | }, |
9590 | 9590 | "label": { |
9591 | 9591 | "type": "string", |
|
9831 | 9831 | }, |
9832 | 9832 | "expr": { |
9833 | 9833 | "type": "string", |
9834 | | - "description": "Logs query expression; may reference other variables through `{{ }}`." |
| 9834 | + "description": "Logs query expression; may reference other variables through `{{ }}`. May be empty for a Loki datasource, which then lists the field's values across all streams." |
9835 | 9835 | }, |
9836 | 9836 | "args": { |
9837 | 9837 | "type": "object", |
9838 | 9838 | "additionalProperties": { |
9839 | 9839 | "type": "string" |
9840 | 9840 | }, |
9841 | | - "description": "Named query arguments; defaults to an empty object." |
| 9841 | + "description": "Named query arguments; defaults to an empty object. Must be empty for a Loki datasource." |
9842 | 9842 | }, |
9843 | 9843 | "field": { |
9844 | 9844 | "type": "string", |
9845 | 9845 | "minLength": 1, |
9846 | | - "description": "Log field whose values become candidates." |
| 9846 | + "description": "Log field whose values become candidates. For a Loki datasource it must be a bare stream label name (letters, digits and underscores)." |
9847 | 9847 | } |
9848 | 9848 | }, |
9849 | 9849 | "required": [ |
|
9876 | 9876 | }, |
9877 | 9877 | { |
9878 | 9878 | "$ref": "#/components/schemas/DashboardTextViz" |
9879 | | - }, |
9880 | | - { |
9881 | | - "$ref": "#/components/schemas/DashboardIncidentListViz" |
9882 | 9879 | } |
9883 | 9880 | ], |
9884 | 9881 | "discriminator": { |
|
9890 | 9887 | "bar": "#/components/schemas/DashboardBarViz", |
9891 | 9888 | "gauge": "#/components/schemas/DashboardGaugeViz", |
9892 | 9889 | "logs": "#/components/schemas/DashboardLogsViz", |
9893 | | - "text": "#/components/schemas/DashboardTextViz", |
9894 | | - "incident_list": "#/components/schemas/DashboardIncidentListViz" |
| 9890 | + "text": "#/components/schemas/DashboardTextViz" |
9895 | 9891 | } |
9896 | 9892 | } |
9897 | 9893 | }, |
|
10263 | 10259 | "markdown" |
10264 | 10260 | ] |
10265 | 10261 | }, |
10266 | | - "DashboardIncidentListViz": { |
10267 | | - "type": "object", |
10268 | | - "description": "Incident-list panel. The rows are filled by the client from the Flashduty incident API, so the panel runs no queries and needs no datasource.", |
10269 | | - "properties": { |
10270 | | - "kind": { |
10271 | | - "type": "string", |
10272 | | - "enum": [ |
10273 | | - "incident_list" |
10274 | | - ], |
10275 | | - "description": "Visualization kind discriminator; always `incident_list`." |
10276 | | - }, |
10277 | | - "options": { |
10278 | | - "type": "object", |
10279 | | - "additionalProperties": true, |
10280 | | - "description": "Open options object for the chosen visualization kind; the only part of the definition that round-trips losslessly. Missing or null normalizes to `{}`." |
10281 | | - } |
10282 | | - }, |
10283 | | - "required": [ |
10284 | | - "kind", |
10285 | | - "options" |
10286 | | - ] |
10287 | | - }, |
10288 | 10262 | "DashboardThreshold": { |
10289 | 10263 | "type": "object", |
10290 | 10264 | "description": "Colour threshold for a numeric value. At least one of `warning`/`critical` is required, and with both set the pair must be ordered according to `mode`.", |
|
11108 | 11082 | "bar", |
11109 | 11083 | "gauge", |
11110 | 11084 | "logs", |
11111 | | - "text", |
11112 | | - "incident_list" |
| 11085 | + "text" |
11113 | 11086 | ], |
11114 | | - "description": "Visualization kind: `time_series` = time series; `table` = table; `stat` = single value; `bar` = bar chart; `gauge` = gauge; `logs` = log stream; `text` = Markdown text; `incident_list` = incident list." |
| 11087 | + "description": "Visualization kind: `time_series` = time series; `table` = table; `stat` = single value; `bar` = bar chart; `gauge` = gauge; `logs` = log stream; `text` = Markdown text." |
11115 | 11088 | } |
11116 | 11089 | }, |
11117 | 11090 | "required": [ |
|
11730 | 11703 | "$ref": "#/components/schemas/DashboardSelection" |
11731 | 11704 | }, |
11732 | 11705 | "description": "Selections keyed by variable name, at most 20 entries." |
| 11706 | + }, |
| 11707 | + "max_data_points": { |
| 11708 | + "type": [ |
| 11709 | + "integer", |
| 11710 | + "null" |
| 11711 | + ], |
| 11712 | + "minimum": 2, |
| 11713 | + "maximum": 5000, |
| 11714 | + "description": "Downsampling target used to compute the step and render the built-in time variables, 2–5000 points; omit or send null for the server default of 100." |
| 11715 | + }, |
| 11716 | + "preserve_builtin_variables": { |
| 11717 | + "type": "boolean", |
| 11718 | + "description": "Keep built-in time variables verbatim in the resolved expressions so a caller with its own execution window can render them; user variables are still resolved." |
11733 | 11719 | } |
11734 | 11720 | }, |
11735 | 11721 | "required": [ |
|
0 commit comments