grafana/k6-cloud-grafana-datasource

View on GitHub
src/dashboards/test-runs-list.json

Summary

Maintainability
Test Coverage
{
  "__inputs": [
    {
      "name": "datasource",
      "label": "k6 Cloud",
      "description": "",
      "type": "datasource",
      "pluginId": "grafana-k6cloud-datasource",
      "pluginName": "k6 Cloud"
    }
  ],
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "7.0.0"
    },
    {
      "type": "datasource",
      "id": "grafana-k6cloud-datasource",
      "name": "k6 Cloud",
      "version": "1.0.0"
    },
    {
      "type": "panel",
      "id": "graph",
      "name": "Graph",
      "version": ""
    },
    {
      "type": "panel",
      "id": "table",
      "name": "Table",
      "version": ""
    }
  ],
  "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": "$datasource",
      "description": "List of k6 Cloud test runs.",
      "fieldConfig": {
        "defaults": {
          "custom": {
            "align": null,
            "displayMode": "color-text"
          },
          "links": [],
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 1
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "Test Run ID"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 88
              },
              {
                "id": "links",
                "value": [
                  {
                    "title": "Click to view results",
                    "url": "/d/k6-cloud-test-run/test-run?orgId=$__org&refresh=1m&var-datasource=$datasource&var-organization=$organization&var-project=$project&var-test=$test&var-testrun=${__data.fields[0]}&from=${__data.fields[9]}&to=${__data.fields[10]}"
                  }
                ]
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Started Epoch"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 1
              },
              {
                "id": "custom.displayMode",
                "value": "auto"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Ended Epoch"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 1
              },
              {
                "id": "custom.displayMode",
                "value": "auto"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Result Status"
            },
            "properties": [
              {
                "id": "mappings",
                "value": [
                  {
                    "from": "",
                    "id": 0,
                    "text": "failed",
                    "to": "",
                    "type": 1,
                    "value": "1"
                  },
                  {
                    "from": "",
                    "id": 1,
                    "text": "passed",
                    "to": "",
                    "type": 1,
                    "value": "0"
                  }
                ]
              },
              {
                "id": "custom.displayMode",
                "value": "color-text"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "VUs"
            },
            "properties": [
              {
                "id": "custom.displayMode",
                "value": "auto"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Duration"
            },
            "properties": [
              {
                "id": "custom.displayMode",
                "value": "auto"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Response time"
            },
            "properties": [
              {
                "id": "custom.displayMode",
                "value": "auto"
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 25,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 2,
      "options": {
        "showHeader": true,
        "sortBy": [
          {
            "desc": true,
            "displayName": "Created"
          }
        ]
      },
      "pluginVersion": "7.1.5",
      "targets": [
        {
          "projectId": "$project",
          "qtype": 0,
          "refId": "A",
          "testId": "$test",
          "testRunId": ""
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "k6 Cloud Test Runs",
      "transformations": [
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "Organization ID": true,
              "Test Created": true,
              "Test ID": true
            },
            "indexByName": {
              "Test Run Created": 1,
              "Test Run Duration": 7,
              "Test Run Ended": 3,
              "Test Run Ended Epoch": 10,
              "Test Run ID": 0,
              "Test Run Load Time": 8,
              "Test Run Result Status": 5,
              "Test Run Started": 2,
              "Test Run Started Epoch": 9,
              "Test Run Status": 4,
              "Test Run VUs": 6
            },
            "renameByName": {
              "Test Run Created": "Created",
              "Test Run Duration": "Duration",
              "Test Run Ended": "Ended",
              "Test Run Ended Epoch": "Ended Epoch",
              "Test Run Load Time": "Response time",
              "Test Run Result Status": "Result Status",
              "Test Run Started": "Started",
              "Test Run Started Epoch": "Started Epoch",
              "Test Run Status": "Status",
              "Test Run VUs": "VUs"
            }
          }
        }
      ],
      "type": "table"
    }
  ],
  "refresh": "1m",
  "schemaVersion": 25,
  "style": "dark",
  "tags": [
    "k6-cloud"
  ],
  "templating": {
    "list": [
      {
        "current": {},
        "hide": 0,
        "includeAll": false,
        "label": "Datasource",
        "multi": false,
        "name": "datasource",
        "options": [],
        "query": "grafana-k6cloud-datasource",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "type": "datasource"
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "$datasource",
        "definition": "list of organizations",
        "hide": 0,
        "includeAll": false,
        "label": "Organization",
        "multi": false,
        "name": "organization",
        "options": [],
        "query": {
          "qtype": 0
        },
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "$datasource",
        "definition": "list of projects",
        "hide": 0,
        "includeAll": false,
        "label": "Project",
        "multi": false,
        "name": "project",
        "options": [],
        "query": {
          "qtype": 1,
          "query": "$organization"
        },
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "$datasource",
        "definition": "list of tests",
        "hide": 0,
        "includeAll": false,
        "label": "Test",
        "multi": false,
        "name": "test",
        "options": [],
        "query": {
          "qtype": 2,
          "query": "$organization.$project"
        },
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      }
    ]
  },
  "time": {
    "from": "now-5m",
    "to": "now"
  },
  "timepicker": {
    "refresh_intervals": [
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ]
  },
  "timezone": "",
  "title": "k6 Cloud Test Runs List",
  "uid": "k6-cloud-test-runs",
  "version": 1
}