From 268a49cb3828e4e3b734788f66cd804f689664c7 Mon Sep 17 00:00:00 2001 From: Ryan McKinley Date: Fri, 30 Sep 2022 12:47:23 -0700 Subject: [PATCH] Devenv: add dashboard showing timeseries out of range points (#56130) --- .../timeseries-out-of-rage.json | 513 ++++++++++++++++++ .../object/testdata/dash_labels.jsonc | 11 +- .../searchV2/object/testdata/dash_raw.jsonc | 6 +- .../object/testdata/dash_references.jsonc | 10 +- .../object/testdata/dash_summary.jsonc | 5 +- 5 files changed, 541 insertions(+), 4 deletions(-) create mode 100644 devenv/dev-dashboards/panel-timeseries/timeseries-out-of-rage.json diff --git a/devenv/dev-dashboards/panel-timeseries/timeseries-out-of-rage.json b/devenv/dev-dashboards/panel-timeseries/timeseries-out-of-rage.json new file mode 100644 index 00000000000..1ca036ac71e --- /dev/null +++ b/devenv/dev-dashboards/panel-timeseries/timeseries-out-of-rage.json @@ -0,0 +1,513 @@ +{ + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": 1435, + "links": [], + "liveNow": false, + "panels": [ + { + "datasource": { + "type": "testdata", + "uid": "PD8C576611E62080A" + }, + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "blue", + "mode": "fixed" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 10, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 8, + "x": 0, + "y": 0 + }, + "id": 3, + "maxDataPoints": 6, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "9.3.0-pre", + "targets": [ + { + "csvContent": "Time,Value,Name\n2022-09-01T05:00:00Z,100,Before\n2022-09-01T06:00:00Z,100,Middle", + "datasource": { + "type": "testdata", + "uid": "PD8C576611E62080A" + }, + "refId": "B", + "scenarioId": "csv_content" + } + ], + "title": "Before + Middle", + "type": "timeseries" + }, + { + "datasource": { + "type": "testdata", + "uid": "PD8C576611E62080A" + }, + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "blue", + "mode": "fixed" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 10, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 8, + "x": 8, + "y": 0 + }, + "id": 2, + "maxDataPoints": 6, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "9.3.0-pre", + "targets": [ + { + "csvContent": "Time,Value,Name\n2022-09-01T05:00:00Z,100,Before\n2022-09-01T07:00:00Z,100,After\n", + "datasource": { + "type": "testdata", + "uid": "PD8C576611E62080A" + }, + "refId": "B", + "scenarioId": "csv_content" + } + ], + "title": "Before + After", + "type": "timeseries" + }, + { + "datasource": { + "type": "testdata", + "uid": "PD8C576611E62080A" + }, + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "blue", + "mode": "fixed" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 10, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 8, + "x": 16, + "y": 0 + }, + "id": 4, + "maxDataPoints": 6, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "9.3.0-pre", + "targets": [ + { + "csvContent": "Time,Value,Name\n2022-09-01T06:00:00Z,100,Middle\n2022-09-01T07:00:00Z,100,After\n", + "datasource": { + "type": "testdata", + "uid": "PD8C576611E62080A" + }, + "refId": "B", + "scenarioId": "csv_content" + } + ], + "title": "Middle + After", + "type": "timeseries" + }, + { + "datasource": { + "type": "testdata", + "uid": "PD8C576611E62080A" + }, + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "blue", + "mode": "fixed" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 10, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 9 + }, + "id": 5, + "maxDataPoints": 6, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "9.3.0-pre", + "targets": [ + { + "csvContent": "Time,Value,Name\n2022-09-01T04:00:00Z,100,Before1\n2022-09-01T05:00:00Z,100,Before2\n", + "datasource": { + "type": "testdata", + "uid": "PD8C576611E62080A" + }, + "refId": "B", + "scenarioId": "csv_content" + } + ], + "title": "Two points before (show zoom button)", + "type": "timeseries" + }, + { + "datasource": { + "type": "testdata", + "uid": "PD8C576611E62080A" + }, + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "blue", + "mode": "fixed" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 10, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green" + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 9 + }, + "id": 6, + "maxDataPoints": 6, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "9.3.0-pre", + "targets": [ + { + "csvContent": "Time,Value,Name\n2022-09-01T07:00:00Z,100,After1\n2022-09-01T08:00:00Z,100,After2\n", + "datasource": { + "type": "testdata", + "uid": "PD8C576611E62080A" + }, + "refId": "B", + "scenarioId": "csv_content" + } + ], + "title": "Two points after (show zoom button)", + "type": "timeseries" + } + ], + "refresh": false, + "schemaVersion": 37, + "style": "dark", + "tags": [ + "gdev", + "panel-tests", + "graph-ng" + ], + "templating": { + "list": [] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "Panel Tests - Timeseries - Out of range", + "uid": "pqnrfd4Vz", + "version": 1, + "weekStart": "" + } diff --git a/pkg/services/searchV2/object/testdata/dash_labels.jsonc b/pkg/services/searchV2/object/testdata/dash_labels.jsonc index dd1bae4ae22..c72589ce917 100644 --- a/pkg/services/searchV2/object/testdata/dash_labels.jsonc +++ b/pkg/services/searchV2/object/testdata/dash_labels.jsonc @@ -2,7 +2,7 @@ // // Frame[0] // Name: labels -// Dimensions: 3 Fields by 209 Rows +// Dimensions: 3 Fields by 212 Rows // +-----------------------------------------------------+-----------------+----------------+ // | Name: uid | Name: key | Name: value | // | Labels: | Labels: | Labels: | @@ -250,6 +250,9 @@ "panel-timeline/timeline-modes.json", "panel-timeline/timeline-modes.json", "panel-timeline/timeline-modes.json", + "panel-timeseries/timeseries-out-of-rage.json", + "panel-timeseries/timeseries-out-of-rage.json", + "panel-timeseries/timeseries-out-of-rage.json", "scenarios/time_zone_support.json", "scenarios/time_zone_support.json", "scenarios/time_zone_support.json", @@ -462,6 +465,9 @@ "graph-ng", "panel-tests", "gdev", + "graph-ng", + "panel-tests", + "gdev", "graph", "panel-tests", "table", @@ -684,6 +690,9 @@ "", "", "", + "", + "", + "", "" ] ] diff --git a/pkg/services/searchV2/object/testdata/dash_raw.jsonc b/pkg/services/searchV2/object/testdata/dash_raw.jsonc index 3223a3f73c6..4a8616193d1 100644 --- a/pkg/services/searchV2/object/testdata/dash_raw.jsonc +++ b/pkg/services/searchV2/object/testdata/dash_raw.jsonc @@ -2,7 +2,7 @@ // // Frame[0] // Name: raw -// Dimensions: 4 Fields by 96 Rows +// Dimensions: 4 Fields by 97 Rows // +---------------------------------------------------------+----------------+---------------+----------------------------------+ // | Name: uid | Name: kind | Name: size | Name: etag | // | Labels: | Labels: | Labels: | Labels: | @@ -150,6 +150,7 @@ "panel-text/text-options.json", "panel-timeline/timeline-demo.json", "panel-timeline/timeline-modes.json", + "panel-timeseries/timeseries-out-of-rage.json", "scenarios/slow_queries_and_annotations.json", "scenarios/time_zone_support.json", "transforms/config-from-query.json", @@ -254,6 +255,7 @@ "", "", "", + "", "" ], [ @@ -346,6 +348,7 @@ 7122, 10777, 8674, + 13368, 24166, 15128, 13876, @@ -444,6 +447,7 @@ "f6ea799109bb78d2f2954947a188d7b6", "dfcd599be6b6df94aef3b6da9d8ac3fb", "21dd0f87426cf7afc030d688d5516178", + "45294c2260bda5bba87039a18a98576d", "727c2c46deddeb164cd9ce36a0ec1567", "f517e61f40152e16f3291e72c27f606d", "c1cbaf503457216461032844f47ac065", diff --git a/pkg/services/searchV2/object/testdata/dash_references.jsonc b/pkg/services/searchV2/object/testdata/dash_references.jsonc index 80213368d6b..bc5076cdf13 100644 --- a/pkg/services/searchV2/object/testdata/dash_references.jsonc +++ b/pkg/services/searchV2/object/testdata/dash_references.jsonc @@ -2,7 +2,7 @@ // // Frame[0] // Name: references -// Dimensions: 4 Fields by 291 Rows +// Dimensions: 4 Fields by 293 Rows // +-------------------------------+----------------+----------------+----------------+ // | Name: uid | Name: kind | Name: type | Name: uid | // | Labels: | Labels: | Labels: | Labels: | @@ -328,6 +328,8 @@ "panel-timeline/timeline-modes.json", "panel-timeline/timeline-modes.json", "panel-timeline/timeline-modes.json", + "panel-timeseries/timeseries-out-of-rage.json", + "panel-timeseries/timeseries-out-of-rage.json", "scenarios/slow_queries_and_annotations.json", "scenarios/slow_queries_and_annotations.json", "scenarios/time_zone_support.json", @@ -627,6 +629,8 @@ "panel", "ds", "panel", + "ds", + "panel", "panel", "panel", "ds", @@ -915,6 +919,8 @@ "state-timeline", "status-history", "default.type", + "timeseries", + "default.type", "graph", "default.type", "graph", @@ -1213,6 +1219,8 @@ "", "default.uid", "", + "default.uid", + "", "", "", "default.uid", diff --git a/pkg/services/searchV2/object/testdata/dash_summary.jsonc b/pkg/services/searchV2/object/testdata/dash_summary.jsonc index a90c22afdd9..ebc30dbb6dc 100644 --- a/pkg/services/searchV2/object/testdata/dash_summary.jsonc +++ b/pkg/services/searchV2/object/testdata/dash_summary.jsonc @@ -2,7 +2,7 @@ // // Frame[0] // Name: summary -// Dimensions: 3 Fields by 96 Rows +// Dimensions: 3 Fields by 97 Rows // +---------------------------------------------------------+----------------------------------------------+--------------------------+ // | Name: uid | Name: name | Name: fields | // | Labels: | Labels: | Labels: | @@ -143,6 +143,7 @@ "panel-text/text-options.json", "panel-timeline/timeline-demo.json", "panel-timeline/timeline-modes.json", + "panel-timeseries/timeseries-out-of-rage.json", "scenarios/slow_queries_and_annotations.json", "scenarios/time_zone_support.json", "transforms/config-from-query.json", @@ -241,6 +242,7 @@ "Text options", "Timeline Demo", "Timeline Modes", + "Panel Tests - Timeseries - Out of range", "Panel tests - Slow Queries \u0026 Annotations", "Panel Tests - Time zone support", "Transforms - Config from query", @@ -409,6 +411,7 @@ {}, {}, {}, + {}, {} ] ]