Commit 4655a15a authored by Oswaldo Ferreira's avatar Oswaldo Ferreira

Merge branch '219501-add-new-keys-to-dashboard-templates' into 'master'

Add templating and links keys to dashboard json schema

Closes #219501

See merge request gitlab-org/gitlab!33791
parents 13da0d7f cfc97c0d
......@@ -385,7 +385,7 @@ The following tables outline the details of expected properties.
| 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).
......
dashboard: 'Test Dashboard'
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:
- group: Group A
priority: 1
......
......@@ -11,7 +11,9 @@
"panel_groups": {
"type": "array",
"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
}
{
"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