Grafana dashboard: Gatling Report (navigate menu)
Description: Gatling Report (navigate menu) for quick navigate to big Gatling Report

# Demo

[http://84.201.161.113:3000/d/gatlingTrendLink](http://84.201.161.113:3000/d/gatlingTrendLink)

# Features

* Automatic select **start** and **end** time period for Gatling Test
* This Navigate Menu - small path of Gatling Report [https://grafana.com/grafana/dashboards/9935](https://grafana.com/grafana/dashboards/9935)

# Used

1. Select large time filter (1 year for example)
2. Select Simulation in Filter
3. Select RunID in Navigate Menu and Open Gatling Report: [demo Gatling Report](http://84.201.161.113:3000/d/gatling/grafana-report?orgId=1&time=1581524251000&time.window=288s&var-run=2020-02-12_19:15&var-simulation=openmodel-rampusers2&var-loadstation=All&from=1581524113211&to=1581524252498)



{
  "__inputs": [
    {
      "name": "VAR_DETAIL_REPORT_UID",
      "type": "constant",
      "label": "detail_report_uid",
      "value": "gatling",
      "description": "Default value = \"gatling\" - this is uid Gatling Report dashdoard (https://grafana.com/grafana/dashboards/9935)"
    }
  ],
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "7.0.3"
    },
    {
      "type": "datasource",
      "id": "influxdb",
      "name": "InfluxDB",
      "version": "1.0.0"
    },
    {
      "type": "panel",
      "id": "table-old",
      "name": "Table (old)",
      "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": 12508,
  "graphTooltip": 0,
  "id": null,
  "iteration": 1592734137870,
  "links": [],
  "panels": [
    {
      "columns": [],
      "datasource": "$ds",
      "fieldConfig": {
        "defaults": {
          "custom": {}
        },
        "overrides": []
      },
      "fontSize": "100%",
      "gridPos": {
        "h": 12,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 4,
      "pageSize": null,
      "showHeader": true,
      "sort": {
        "col": 0,
        "desc": true
      },
      "styles": [
        {
          "$$hashKey": "object:131",
          "alias": "",
          "align": "auto",
          "colorMode": null,
          "colors": [
            "rgba(245, 54, 54, 0.9)",
            "rgba(237, 129, 40, 0.89)",
            "rgba(50, 172, 45, 0.97)"
          ],
          "dateFormat": "YYYY-MM-DD HH:mm:ss",
          "decimals": 2,
          "link": true,
          "linkTargetBlank": true,
          "linkTooltip": "",
          "linkUrl": "/d/gatling/gatling-report?time=${__cell}&time.window=${__cell_2}s&var-run=${__cell_1}&var-simulation=${simulation}&var-loadstation=All",
          "mappingType": 1,
          "pattern": "Time",
          "thresholds": [],
          "type": "string",
          "unit": "short"
        }
      ],
      "targets": [
        {
          "groupBy": [
            {
              "params": [
                "$__interval"
              ],
              "type": "time"
            },
            {
              "params": [
                "null"
              ],
              "type": "fill"
            }
          ],
          "orderByTime": "ASC",
          "policy": "default",
          "query": "SELECT \n    (last(\"duration\")*2+10) as \"Duration\" \nFROM\n    (SELECT \n         cumulative_sum(elapsed(last(\"count\"), 1s)) as \"duration\" \n     FROM \"$archive\".\"gatling\" \n     WHERE \n         (\"simulation\" =~ /^${simulation:regex}$/) AND \n          $timeFilter \n     GROUP BY time(1s),  \"run\"\n) \nGROUP BY \"run\"",
          "rawQuery": true,
          "refId": "A",
          "resultFormat": "table",
          "select": [
            [
              {
                "params": [
                  "value"
                ],
                "type": "field"
              },
              {
                "params": [],
                "type": "mean"
              }
            ]
          ],
          "tags": []
        }
      ],
      "timeFrom": null,
      "timeShift": null,
      "title": "Navigate Menu",
      "transform": "table",
      "type": "table-old"
    }
  ],
  "schemaVersion": 25,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": [
      {
        "current": {
          "selected": false,
          "text": "Gatling_TCP",
          "value": "Gatling_TCP"
        },
        "hide": 0,
        "includeAll": false,
        "label": "data source",
        "multi": false,
        "name": "ds",
        "options": [],
        "query": "influxdb",
        "refresh": 1,
        "regex": "/.*Gatling.*/i",
        "skipUrlSync": false,
        "type": "datasource"
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "$ds",
        "definition": "SHOW RETENTION POLICIES",
        "hide": 2,
        "includeAll": false,
        "label": "Retention policy (archive)",
        "multi": false,
        "name": "archive",
        "options": [],
        "query": "SHOW RETENTION POLICIES",
        "refresh": 1,
        "regex": "/^autogen$/",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "$ds",
        "definition": "SHOW RETENTION POLICIES",
        "hide": 2,
        "includeAll": false,
        "label": "Retention policy (new)",
        "multi": false,
        "name": "new",
        "options": [],
        "query": "SHOW RETENTION POLICIES",
        "refresh": 1,
        "regex": "/^(?!$archive$).*$/",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "allValue": null,
        "current": {},
        "datasource": "$ds",
        "definition": "SELECT DISTINCT(\"simulation\") FROM \n  (SELECT last(\"mean\") FROM \"$new\".\"gatling\" GROUP BY \"simulation\"),\n  (SELECT last(\"mean\") FROM \"$archive\".\"gatling\" GROUP BY \"simulation\")\nWHERE $timeFilter",
        "hide": 0,
        "includeAll": false,
        "label": "Simulation",
        "multi": false,
        "name": "simulation",
        "options": [],
        "query": "SELECT DISTINCT(\"simulation\") FROM \n  (SELECT last(\"mean\") FROM \"$new\".\"gatling\" GROUP BY \"simulation\"),\n  (SELECT last(\"mean\") FROM \"$archive\".\"gatling\" GROUP BY \"simulation\")\nWHERE $timeFilter",
        "refresh": 2,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "tagValuesQuery": "",
        "tags": [],
        "tagsQuery": "",
        "type": "query",
        "useTags": false
      },
      {
        "current": {
          "value": "${VAR_DETAIL_REPORT_UID}",
          "text": "${VAR_DETAIL_REPORT_UID}"
        },
        "hide": 2,
        "label": "detail_report_uid",
        "name": "detail_report_uid",
        "options": [
          {
            "value": "${VAR_DETAIL_REPORT_UID}",
            "text": "${VAR_DETAIL_REPORT_UID}"
          }
        ],
        "query": "${VAR_DETAIL_REPORT_UID}",
        "skipUrlSync": false,
        "type": "constant"
      }
    ]
  },
  "time": {
    "from": "now-1y",
    "to": "now"
  },
  "timepicker": {
    "refresh_intervals": [
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ]
  },
  "timezone": "",
  "title": "Gatling Report (navigate menu)",
  "uid": "gatlingTrendWithLink",
  "version": 5,
  "description": "Gatling Report (navigate menu) for quick navigate to big Gatling Report"
}