Skip to content

Commit

Permalink
docs: adds uid to dashboard.json reference docs
Browse files Browse the repository at this point in the history
  • Loading branch information
bergquist committed Feb 8, 2018
1 parent 76dc793 commit 4eec4bf
Showing 1 changed file with 5 additions and 49 deletions.
54 changes: 5 additions & 49 deletions docs/sources/reference/dashboard.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ weight = 100

# Dashboard JSON

A dashboard in Grafana is represented by a JSON object, which stores metadata of its dashboard. Dashboard metadata includes dashboard properties, metadata from rows, panels, template variables, panel queries, etc.
A dashboard in Grafana is represented by a JSON object, which stores metadata of its dashboard. Dashboard metadata includes dashboard properties, metadata from panels, template variables, panel queries, etc.

To view the JSON of a dashboard, follow the steps mentioned below:

Expand All @@ -27,14 +27,15 @@ When a user creates a new dashboard, a new dashboard JSON object is initialized
```json
{
"id": null,
"uid": "cLV5GDCkz",
"title": "New dashboard",
"tags": [],
"style": "dark",
"timezone": "browser",
"editable": true,
"hideControls": false,
"graphTooltip": 1,
"rows": [],
"panels": [],
"time": {
"from": "now-6h",
"to": "now"
Expand All @@ -58,15 +59,15 @@ Each field in the dashboard JSON is explained below with its usage:

| Name | Usage |
| ---- | ----- |
| **id** | unique dashboard id, an integer |
| **id** | unique numeric identifier for the dashboard. (generated by the db) |
| **uid** | unique dashboard identifier that can be generated by anyone. string (8-40) |
| **title** | current title of dashboard |
| **tags** | tags associated with dashboard, an array of strings |
| **style** | theme of dashboard, i.e. `dark` or `light` |
| **timezone** | timezone of dashboard, i.e. `utc` or `browser` |
| **editable** | whether a dashboard is editable or not |
| **hideControls** | whether row controls on the left in green are hidden or not |
| **graphTooltip** | 0 for no shared crosshair or tooltip (default), 1 for shared crosshair, 2 for shared crosshair AND shared tooltip |
| **rows** | row metadata, see [rows section](#rows) for details |
| **time** | time range for dashboard, i.e. last 6 hours, last 7 days, etc |
| **timepicker** | timepicker metadata, see [timepicker section](#timepicker) for details |
| **templating** | templating metadata, see [templating section](#templating) for details |
Expand All @@ -75,39 +76,6 @@ Each field in the dashboard JSON is explained below with its usage:
| **version** | version of the dashboard (integer), incremented each time the dashboard is updated |
| **links** | TODO |

### rows

`rows` field consists of an array of JSON object representing each row in a dashboard, such as shown below:

```json
"rows": [
{
"collapse": false,
"editable": true,
"height": "200px",
"panels": [],
"title": "New row"
},
{
"collapse": true,
"editable": true,
"height": "300px",
"panels": [],
"title": "New row"
}
]
```

Usage of the fields is explained below:

| Name | Usage |
| ---- | ----- |
| **collapse** | whether row is collapsed or not |
| **editable** | whether a row is editable or not |
| **height** | height of the row in pixels |
| **panels** | panels metadata, see [panels section](#panels) for details |
| **title** | title of row |

#### panels

Panels are the building blocks a dashboard. It consists of datasource queries, type of graphs, aliases, etc. Panel JSON consists of an array of JSON objects, each representing a different panel in a row. Most of the fields are common for all panels but some fields depends on the panel type. Following is an example of panel JSON representing a `graph` panel type:
Expand Down Expand Up @@ -266,16 +234,8 @@ Panels are the building blocks a dashboard. It consists of datasource queries, t
},
```

Usage of each field is explained below:

| Name | Usage |
| ---- | ----- |
| TODO | TODO |

### timepicker

Description: TODO

```json
"timepicker": {
"collapse": false,
Expand Down Expand Up @@ -416,7 +376,3 @@ Usage of the above mentioned fields in the templating section is explained below
| **refresh** | TODO |
| **regex** | TODO |
| **type** | type of variable, i.e. `custom`, `query` or `interval` |

### annotations

TODO

0 comments on commit 4eec4bf

Please sign in to comment.