diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-10 18:09:50 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-10 18:09:50 +0300 |
commit | de2fb5b82c92c90f90ed67ced45143c04e934fb8 (patch) | |
tree | ff8e5e642580de7bb596d90dd0e7f739f44ca540 /app/models | |
parent | c6a33b298229f9e04933be43d6176c476ef03012 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/performance_monitoring/prometheus_panel.rb | 6 |
1 files changed, 5 insertions, 1 deletions
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 |