Commit cfc97c0d authored by Kirstie Cook's avatar Kirstie Cook Committed by Oswaldo Ferreira

Add templating and links keys to json schema

Add templating and links keys to dashboard fixture
parent 46f5d7e4
...@@ -385,7 +385,7 @@ The following tables outline the details of expected properties. ...@@ -385,7 +385,7 @@ The following tables outline the details of expected properties.
| Property | Type | Required | Description | | Property | Type | Required | Description |
| -------- | ---- | -------- | ----------- | | -------- | ---- | -------- | ----------- |
| `variables` | hash | no | Variables can be defined here. | | `variables` | hash | yes | Variables can be defined here. |
Read the documentation on [templating](#templating-variables-for-metrics-dashboards). Read the documentation on [templating](#templating-variables-for-metrics-dashboards).
......
dashboard: 'Test Dashboard' dashboard: 'Test Dashboard'
priority: 1 priority: 1
links:
- title: Link 1
url: https://gitlab.com
- title: Link 2
url: https://docs.gitlab.com
templating:
variables:
text_variable_full_syntax:
label: 'Variable 1'
type: text
options:
default_value: 'default'
text_variable_simple_syntax: 'default value'
panel_groups: panel_groups:
- group: Group A - group: Group A
priority: 1 priority: 1
......
...@@ -11,7 +11,9 @@ ...@@ -11,7 +11,9 @@
"panel_groups": { "panel_groups": {
"type": "array", "type": "array",
"items": { "$ref": "spec/fixtures/lib/gitlab/metrics/dashboard/schemas/panel_groups.json" } "items": { "$ref": "spec/fixtures/lib/gitlab/metrics/dashboard/schemas/panel_groups.json" }
} },
"templating": { "$ref": "spec/fixtures/lib/gitlab/metrics/dashboard/schemas/templating.json" },
"links": { "$ref": "spec/fixtures/lib/gitlab/metrics/dashboard/schemas/links.json" }
}, },
"additionalProperties": false "additionalProperties": false
} }
{
"type": "array",
"required": ["url"],
"properties": {
"url": { "type": "string" },
"title": { "type": "string" }
},
"additionalProperties": false
}
{
"type": "object",
"required": ["variables"],
"properties": {
"variables": { "$ref": "variables.json" }
},
"additionalProperties": false
}
{
"type": "object",
"required": [
"type", "options"
],
"properties": {
"type": { "type": "string" },
"label": { "type": "string" },
"options": { "$ref": "text_variable_options.json" }
},
"additionalProperties": false
}
{
"type": "object",
"properties": {
"default_value": { "type": "string" }
},
"additionalProperties": false
}
{
"type": "object",
"patternProperties": {
"^[a-zA-Z0-9_]*$": {
"anyOf": [
{ "$ref": "text_variable_full_syntax.json" },
{ "type": "string" }
]
}
},
"additionalProperties": false
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment