From de2fb5b82c92c90f90ed67ced45143c04e934fb8 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Fri, 10 Apr 2020 15:09:50 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- app/models/performance_monitoring/prometheus_panel.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'app/models') diff --git a/app/models/performance_monitoring/prometheus_panel.rb b/app/models/performance_monitoring/prometheus_panel.rb index c03218b4219..0381c5cff10 100644 --- a/app/models/performance_monitoring/prometheus_panel.rb +++ b/app/models/performance_monitoring/prometheus_panel.rb @@ -4,7 +4,7 @@ module PerformanceMonitoring class PrometheusPanel include ActiveModel::Model - attr_accessor :type, :title, :y_label, :weight, :metrics + attr_accessor :type, :title, :y_label, :weight, :metrics, :y_axis validates :title, presence: true validates :metrics, presence: true @@ -20,5 +20,9 @@ module PerformanceMonitoring panel.tap(&:validate!) end + + def id(group_title) + Digest::SHA2.hexdigest([group_title, type, title].join) + end end end -- cgit v1.2.3