Commit b08a7581 authored by Mayra Cabrera's avatar Mayra Cabrera

Merge branch 'rp-fix-prometheus-dashboard-model' into 'master'

Add templating key to PrometheusDashboard model accessors

See merge request gitlab-org/gitlab!32349
parents 95cc0be7 6c962600
...@@ -4,7 +4,7 @@ module PerformanceMonitoring ...@@ -4,7 +4,7 @@ module PerformanceMonitoring
class PrometheusDashboard class PrometheusDashboard
include ActiveModel::Model include ActiveModel::Model
attr_accessor :dashboard, :panel_groups, :path, :environment, :priority attr_accessor :dashboard, :panel_groups, :path, :environment, :priority, :templating
validates :dashboard, presence: true validates :dashboard, presence: true
validates :panel_groups, presence: true validates :panel_groups, presence: true
......
...@@ -6,6 +6,11 @@ describe PerformanceMonitoring::PrometheusDashboard do ...@@ -6,6 +6,11 @@ describe PerformanceMonitoring::PrometheusDashboard do
let(:json_content) do let(:json_content) do
{ {
"dashboard" => "Dashboard Title", "dashboard" => "Dashboard Title",
"templating" => {
"variables" => {
"variable1" => %w(value1 value2 value3)
}
},
"panel_groups" => [{ "panel_groups" => [{
"group" => "Group Title", "group" => "Group Title",
"panels" => [{ "panels" => [{
......
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