From 86729f37c8251c7aff6109ab45929c0a31a8819a Mon Sep 17 00:00:00 2001 From: Ryan McKinley Date: Thu, 2 May 2019 21:57:30 -0700 Subject: [PATCH] TestData: Add dashboards to testdata (#16855) --- .../testdata/dashboards/streaming.json | 114 ++++++++++++++++++ .../plugins/datasource/testdata/plugin.json | 10 +- 2 files changed, 123 insertions(+), 1 deletion(-) create mode 100644 public/app/plugins/datasource/testdata/dashboards/streaming.json diff --git a/public/app/plugins/datasource/testdata/dashboards/streaming.json b/public/app/plugins/datasource/testdata/dashboards/streaming.json new file mode 100644 index 00000000000..b2f2e9ecb6b --- /dev/null +++ b/public/app/plugins/datasource/testdata/dashboards/streaming.json @@ -0,0 +1,114 @@ +{ + "__inputs": [ + { + "name": "DS_TESTDATA_DB", + "label": "TestData DB", + "description": "", + "type": "datasource", + "pluginId": "testdata", + "pluginName": "TestData DB" + } + ], + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "6.2.0-pre" + }, + { + "type": "panel", + "id": "graph2", + "name": "React Graph", + "version": "" + }, + { + "type": "datasource", + "id": "testdata", + "name": "TestData DB", + "version": "1.0.0" + } + ], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": "-- Grafana --", + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 0, + "id": null, + "links": [], + "panels": [ + { + "datasource": "${DS_TESTDATA_DB}", + "description": "", + "gridPos": { + "h": 6, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 2, + "links": [], + "options": { + "graph": { + "showBars": false, + "showLines": true, + "showPoints": false + }, + "legend": { + "asTable": true, + "decimals": 2, + "isVisible": true, + "placement": "right", + "stats": ["last"] + }, + "series": {} + }, + "targets": [ + { + "refId": "A", + "scenarioId": "streaming_client", + "stream": { + "noise": 10, + "speed": 100, + "spread": 20, + "type": "signal" + }, + "stringInput": "" + } + ], + "timeFrom": null, + "timeShift": null, + "title": "Simple dummy streaming example", + "type": "graph2" + } + ], + "schemaVersion": 18, + "style": "dark", + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-1m", + "to": "now" + }, + "timepicker": { + "refresh_intervals": ["5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d"], + "time_options": ["5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d"] + }, + "timezone": "", + "title": "Simple Streaming Example", + "uid": "TXSTREZ", + "version": 2 +} diff --git a/public/app/plugins/datasource/testdata/plugin.json b/public/app/plugins/datasource/testdata/plugin.json index 3108fb44a19..63a9b261de7 100644 --- a/public/app/plugins/datasource/testdata/plugin.json +++ b/public/app/plugins/datasource/testdata/plugin.json @@ -20,5 +20,13 @@ "small": "../../../../img/grafana_icon.svg", "large": "../../../../img/grafana_icon.svg" } - } + }, + + "includes": [ + { + "type": "dashboard", + "name": "Streaming Example", + "path": "dashboards/streaming.json" + } + ] }