diff options
Diffstat (limited to 'spec/fixtures/lib/gitlab/metrics')
7 files changed, 64 insertions, 1 deletions
diff --git a/spec/fixtures/lib/gitlab/metrics/dashboard/sample_dashboard.yml b/spec/fixtures/lib/gitlab/metrics/dashboard/sample_dashboard.yml index b460a031486..5177de66fcf 100644 --- a/spec/fixtures/lib/gitlab/metrics/dashboard/sample_dashboard.yml +++ b/spec/fixtures/lib/gitlab/metrics/dashboard/sample_dashboard.yml @@ -1,5 +1,18 @@ 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 diff --git a/spec/fixtures/lib/gitlab/metrics/dashboard/schemas/dashboard.json b/spec/fixtures/lib/gitlab/metrics/dashboard/schemas/dashboard.json index 5d779a323c2..259c41bf091 100644 --- a/spec/fixtures/lib/gitlab/metrics/dashboard/schemas/dashboard.json +++ b/spec/fixtures/lib/gitlab/metrics/dashboard/schemas/dashboard.json @@ -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 } diff --git a/spec/fixtures/lib/gitlab/metrics/dashboard/schemas/links.json b/spec/fixtures/lib/gitlab/metrics/dashboard/schemas/links.json new file mode 100644 index 00000000000..be180114052 --- /dev/null +++ b/spec/fixtures/lib/gitlab/metrics/dashboard/schemas/links.json @@ -0,0 +1,9 @@ +{ + "type": "array", + "required": ["url"], + "properties": { + "url": { "type": "string" }, + "title": { "type": "string" } + }, + "additionalProperties": false +} diff --git a/spec/fixtures/lib/gitlab/metrics/dashboard/schemas/templating.json b/spec/fixtures/lib/gitlab/metrics/dashboard/schemas/templating.json new file mode 100644 index 00000000000..c82d2fcb02c --- /dev/null +++ b/spec/fixtures/lib/gitlab/metrics/dashboard/schemas/templating.json @@ -0,0 +1,8 @@ +{ + "type": "object", + "required": ["variables"], + "properties": { + "variables": { "$ref": "variables.json" } + }, + "additionalProperties": false +} diff --git a/spec/fixtures/lib/gitlab/metrics/dashboard/schemas/text_variable_full_syntax.json b/spec/fixtures/lib/gitlab/metrics/dashboard/schemas/text_variable_full_syntax.json new file mode 100644 index 00000000000..f5090dc8c88 --- /dev/null +++ b/spec/fixtures/lib/gitlab/metrics/dashboard/schemas/text_variable_full_syntax.json @@ -0,0 +1,12 @@ +{ + "type": "object", + "required": [ + "type", "options" + ], + "properties": { + "type": { "type": "string" }, + "label": { "type": "string" }, + "options": { "$ref": "text_variable_options.json" } + }, + "additionalProperties": false +} diff --git a/spec/fixtures/lib/gitlab/metrics/dashboard/schemas/text_variable_options.json b/spec/fixtures/lib/gitlab/metrics/dashboard/schemas/text_variable_options.json new file mode 100644 index 00000000000..ccb2e168fd1 --- /dev/null +++ b/spec/fixtures/lib/gitlab/metrics/dashboard/schemas/text_variable_options.json @@ -0,0 +1,7 @@ +{ + "type": "object", + "properties": { + "default_value": { "type": "string" } + }, + "additionalProperties": false +} diff --git a/spec/fixtures/lib/gitlab/metrics/dashboard/schemas/variables.json b/spec/fixtures/lib/gitlab/metrics/dashboard/schemas/variables.json new file mode 100644 index 00000000000..f3e0dd555a6 --- /dev/null +++ b/spec/fixtures/lib/gitlab/metrics/dashboard/schemas/variables.json @@ -0,0 +1,12 @@ +{ + "type": "object", + "patternProperties": { + "^[a-zA-Z0-9_]*$": { + "anyOf": [ + { "$ref": "text_variable_full_syntax.json" }, + { "type": "string" } + ] + } + }, + "additionalProperties": false +} |