// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`transformSceneToSaveModel Annotations should transform annotations to save model 1`] = `
[
  {
    "builtIn": 1,
    "datasource": {
      "type": "datasource",
      "uid": "grafana",
    },
    "enable": true,
    "hide": false,
    "iconColor": "rgba(0, 211, 255, 1)",
    "name": "Annotations & Alerts",
    "type": "dashboard",
  },
  {
    "datasource": {
      "type": "testdata",
      "uid": "gdev-testdata",
    },
    "enable": true,
    "hide": false,
    "iconColor": "red",
    "name": "Enabled",
    "target": {
      "lines": 4,
      "refId": "Anno",
      "scenarioId": "annotations",
    },
  },
  {
    "datasource": {
      "type": "testdata",
      "uid": "gdev-testdata",
    },
    "enable": false,
    "hide": false,
    "iconColor": "yellow",
    "name": "Disabled",
    "target": {
      "lines": 5,
      "refId": "Anno",
      "scenarioId": "annotations",
    },
  },
  {
    "datasource": {
      "type": "testdata",
      "uid": "gdev-testdata",
    },
    "enable": true,
    "hide": true,
    "iconColor": "dark-purple",
    "name": "Hidden",
    "target": {
      "lines": 6,
      "refId": "Anno",
      "scenarioId": "annotations",
    },
  },
]
`;

exports[`transformSceneToSaveModel Given a scene with rows Should transform back to persisted model 1`] = `
{
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": {
          "type": "grafana",
          "uid": "-- Grafana --",
        },
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard",
      },
    ],
  },
  "editable": true,
  "fiscalYearStartMonth": 0,
  "graphTooltip": 0,
  "links": [],
  "panels": [
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 0,
      },
      "id": 20,
      "panels": [],
      "title": "Row at the top - not repeated - saved expanded",
      "type": "row",
    },
    {
      "fieldConfig": {
        "defaults": {},
        "overrides": [],
      },
      "gridPos": {
        "h": 2,
        "w": 24,
        "x": 0,
        "y": 1,
      },
      "id": 15,
      "options": {
        "code": {
          "language": "plaintext",
          "showLineNumbers": false,
          "showMiniMap": false,
        },
        "content": "<div class="center-vh">
  Repeated row below. The row has 
  a panel that is also repeated horizontally based
  on values in the $pod variable. 
</div>",
        "mode": "markdown",
      },
      "targets": [
        {
          "refId": "A",
        },
      ],
      "title": "",
      "transformations": [],
      "transparent": false,
      "type": "text",
    },
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 3,
      },
      "id": 16,
      "panels": [],
      "repeat": "server",
      "title": "Row for server $server",
      "type": "row",
    },
    {
      "collapsed": true,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 25,
      },
      "id": 25,
      "panels": [
        {
          "fieldConfig": {
            "defaults": {},
            "overrides": [],
          },
          "gridPos": {
            "h": 2,
            "w": 24,
            "x": 0,
            "y": 26,
          },
          "id": 30,
          "options": {
            "code": {
              "language": "plaintext",
              "showLineNumbers": false,
              "showMiniMap": false,
            },
            "content": "<div class="center-vh">
  Just a panel
</div>",
            "mode": "markdown",
          },
          "transformations": [],
          "transparent": false,
          "type": "text",
        },
      ],
      "title": "Row at the bottom - not repeated - saved collapsed ",
      "type": "row",
    },
  ],
  "schemaVersion": 36,
  "tags": [],
  "templating": {
    "list": [
      {
        "current": {
          "text": [
            "A",
            "B",
          ],
          "value": [
            "A",
            "B",
          ],
        },
        "includeAll": true,
        "multi": true,
        "name": "server",
        "options": [],
        "query": "A,B,C,D,E,F,E,G,H,I,J,K,L",
        "type": "custom",
      },
      {
        "current": {
          "text": [
            "1",
            "2",
          ],
          "value": [
            "1",
            "2",
          ],
        },
        "includeAll": true,
        "multi": true,
        "name": "pod",
        "options": [],
        "query": "Bob : 1, Rob : 2,Sod : 3, Hod : 4, Cod : 5",
        "type": "custom",
      },
    ],
  },
  "time": {
    "from": "now-6h",
    "to": "now",
  },
  "timezone": "",
  "title": "Repeating rows",
  "uid": "Repeating-rows-uid",
  "weekStart": "",
}
`;

exports[`transformSceneToSaveModel Given a simple scene with variables Should transform back to persisted model 1`] = `
{
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": {
          "type": "datasource",
          "uid": "grafana",
        },
        "enable": true,
        "hide": false,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "type": "dashboard",
      },
      {
        "datasource": {
          "type": "testdata",
          "uid": "gdev-testdata",
        },
        "enable": true,
        "hide": false,
        "iconColor": "red",
        "name": "Enabled",
        "target": {
          "lines": 4,
          "refId": "Anno",
          "scenarioId": "annotations",
        },
      },
      {
        "datasource": {
          "type": "testdata",
          "uid": "gdev-testdata",
        },
        "enable": false,
        "hide": false,
        "iconColor": "yellow",
        "name": "Disabled",
        "target": {
          "lines": 5,
          "refId": "Anno",
          "scenarioId": "annotations",
        },
      },
      {
        "datasource": {
          "type": "testdata",
          "uid": "gdev-testdata",
        },
        "enable": true,
        "hide": true,
        "iconColor": "dark-purple",
        "name": "Hidden",
        "target": {
          "lines": 6,
          "refId": "Anno",
          "scenarioId": "annotations",
        },
      },
    ],
  },
  "editable": true,
  "fiscalYearStartMonth": 1,
  "graphTooltip": 0,
  "id": 1351,
  "links": [],
  "panels": [
    {
      "datasource": {
        "type": "testdata",
        "uid": "PD8C576611E62080A",
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic",
          },
          "custom": {
            "fillOpacity": 0,
            "gradientMode": "none",
            "lineWidth": 2,
          },
        },
        "overrides": [],
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 12,
        "y": 0,
      },
      "id": 28,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom",
          "showLegend": true,
        },
        "tooltip": {
          "mode": "single",
          "sort": "none",
        },
      },
      "targets": [
        {
          "alias": "series",
          "datasource": {
            "type": "testdata",
            "uid": "PD8C576611E62080A",
          },
          "refId": "A",
          "scenarioId": "random_walk",
          "seriesCount": 1,
        },
      ],
      "title": "Simple time series graph ",
      "transformations": [],
      "transparent": false,
      "type": "timeseries",
    },
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 8,
      },
      "id": 5,
      "panels": [],
      "title": "Row title",
      "type": "row",
    },
    {
      "datasource": {
        "type": "testdata",
        "uid": "PD8C576611E62080A",
      },
      "fieldConfig": {
        "defaults": {},
        "overrides": [],
      },
      "gridPos": {
        "h": 10,
        "w": 12,
        "x": 0,
        "y": 9,
      },
      "id": 29,
      "options": {},
      "targets": [
        {
          "alias": "series",
          "datasource": {
            "type": "testdata",
            "uid": "PD8C576611E62080A",
          },
          "refId": "A",
          "scenarioId": "random_walk",
          "seriesCount": 1,
        },
      ],
      "title": "panel inside row",
      "transformations": [],
      "transparent": false,
      "type": "timeseries",
    },
    {
      "fieldConfig": {
        "defaults": {},
        "overrides": [],
      },
      "gridPos": {
        "h": 10,
        "w": 11,
        "x": 12,
        "y": 9,
      },
      "id": 25,
      "options": {
        "code": {
          "language": "plaintext",
          "showLineNumbers": false,
          "showMiniMap": false,
        },
        "content": "content",
        "mode": "markdown",
      },
      "targets": [
        {
          "refId": "A",
        },
      ],
      "title": "Transparent text panel",
      "transformations": [],
      "transparent": true,
      "type": "text",
    },
  ],
  "schemaVersion": 36,
  "tags": [],
  "templating": {
    "list": [
      {
        "auto": true,
        "auto_count": 30,
        "auto_min": "10s",
        "current": {
          "text": "1m",
          "value": "1m",
        },
        "hide": 2,
        "name": "intervalVar",
        "query": "1m,10m,30m,1h,6h,12h,1d,7d,14d,30d",
        "refresh": 2,
        "type": "interval",
      },
      {
        "current": {
          "text": [
            "a",
          ],
          "value": [
            "a",
          ],
        },
        "includeAll": true,
        "multi": true,
        "name": "customVar",
        "options": [],
        "query": "a, b, c",
        "type": "custom",
      },
      {
        "current": {
          "text": "gdev-testdata",
          "value": "PD8C576611E62080A",
        },
        "includeAll": false,
        "name": "dsVar",
        "options": [],
        "query": "grafana-testdata-datasource",
        "refresh": 1,
        "regex": "",
        "type": "datasource",
      },
      {
        "current": {
          "text": "A",
          "value": "A",
        },
        "includeAll": false,
        "name": "query0",
        "options": [],
        "query": {
          "query": "*",
          "refId": "StandardVariableQuery",
        },
        "refresh": 1,
        "regex": "",
        "type": "query",
      },
      {
        "current": {
          "text": "test",
          "value": "test",
        },
        "hide": 2,
        "name": "constant",
        "query": "test",
        "skipUrlSync": true,
        "type": "constant",
      },
      {
        "datasource": {
          "type": "prometheus",
          "uid": "wc2AL7L7k",
        },
        "name": "Filters",
        "type": "adhoc",
      },
    ],
  },
  "time": {
    "from": "now-5m",
    "to": "now",
  },
  "timezone": "America/New_York",
  "title": "Dashboard to load1",
  "uid": "nP8rcffGkasd",
  "weekStart": "saturday",
}
`;
