mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Included rows JSON and TODO headers
This commit is contained in:
parent
4c1b6f3059
commit
f54615ed46
@ -16,11 +16,11 @@ To view the JSON of a dashboard, follow the steps mentioned below:
|
||||
2. Click on `Manage dashboard` menu on the top navigation bar
|
||||
3. Select `View JSON` from the dropdown menu
|
||||
|
||||
## Basic fields
|
||||
## JSON fields
|
||||
|
||||
When a user creates a new dashboard, a new dashboard JSON object is initialized with the following fields:
|
||||
|
||||
> Note: In the following JSON, id is shown as null which is the default value assigned to it until the dashboard is not saved. Once saved, an integer value is assigned to the `id` field.
|
||||
> Note: In the following JSON, id is shown as null which is the default value assigned to it until a dashboard is saved. Once a dashboard is saved, an integer value is assigned to the `id` field.
|
||||
|
||||
```
|
||||
{
|
||||
@ -33,43 +33,14 @@ When a user creates a new dashboard, a new dashboard JSON object is initialized
|
||||
"editable": true,
|
||||
"hideControls": false,
|
||||
"sharedCrosshair": false,
|
||||
"rows": [
|
||||
{
|
||||
"height": "250px",
|
||||
"panels": [],
|
||||
"title": "Row",
|
||||
"collapse": false,
|
||||
"editable": true
|
||||
}
|
||||
],
|
||||
"rows": [],
|
||||
"time": {
|
||||
"from": "now-6h",
|
||||
"to": "now"
|
||||
},
|
||||
"timepicker": {
|
||||
"time_options": [
|
||||
"5m",
|
||||
"15m",
|
||||
"1h",
|
||||
"6h",
|
||||
"12h",
|
||||
"24h",
|
||||
"2d",
|
||||
"7d",
|
||||
"30d"
|
||||
],
|
||||
"refresh_intervals": [
|
||||
"5s",
|
||||
"10s",
|
||||
"30s",
|
||||
"1m",
|
||||
"5m",
|
||||
"15m",
|
||||
"30m",
|
||||
"1h",
|
||||
"2h",
|
||||
"1d"
|
||||
]
|
||||
"time_options": [],
|
||||
"refresh_intervals": []
|
||||
},
|
||||
"templating": {
|
||||
"list": []
|
||||
@ -89,17 +60,66 @@ Each field in the dashboard JSON is explained below with its usage:
|
||||
| **id** | unique dashboard id, an integer |
|
||||
| **title** | current title of dashboard |
|
||||
| **originalTitle** | title of dashboard when saved for the first time |
|
||||
| **tags** | an array of strings storing tags associated with dashboard |
|
||||
| **style** | theme of dashboard, i.e. dark or light |
|
||||
| **timezone** | timezone of dashboard, i.e. utc or browser |
|
||||
| **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 |
|
||||
| **sharedCrosshair** | TODO |
|
||||
| **rows** | row metadata, see rows section for details |
|
||||
| **time** | time range of dashboard, i.e. last 6 hours, last 7 days, etc |
|
||||
| **timepicker** | timepicker metadata, see timepicker section for details |
|
||||
| **templating** | templating metadata, see templating section for details |
|
||||
| **annotations** | annotations metadata, see annotations section for details |
|
||||
| **rows** | row metadata, see [rows section](/dashboard/#rows) for details |
|
||||
| **time** | time range for dashboard, i.e. last 6 hours, last 7 days, etc |
|
||||
| **timepicker** | timepicker metadata, see [timepicker section](/dashboard/#timepicker) for details |
|
||||
| **templating** | templating metadata, see [templating section](/dashboard/#templating) for details |
|
||||
| **annotations** | annotations metadata, see [annotations section](/dashboard/#annotations) for details |
|
||||
| **schemaVersion** | TODO |
|
||||
| **version** | TODO |
|
||||
| **links** | TODO |
|
||||
|
||||
### rows
|
||||
|
||||
`rows` field represents an array of JSON object representing each row in a dashboard, such as shown below:
|
||||
|
||||
```
|
||||
"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](/dashboard/#panels) for details |
|
||||
| **title** | title of row |
|
||||
|
||||
#### panels
|
||||
|
||||
TODO
|
||||
|
||||
### timepicker
|
||||
|
||||
TODO
|
||||
|
||||
### templating
|
||||
|
||||
TODO
|
||||
|
||||
### annotations
|
||||
|
||||
TODO
|
||||
|
Loading…
Reference in New Issue
Block a user