Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-10 18:09:50 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-10 18:09:50 +0300
commitde2fb5b82c92c90f90ed67ced45143c04e934fb8 (patch)
treeff8e5e642580de7bb596d90dd0e7f739f44ca540 /app/models
parentc6a33b298229f9e04933be43d6176c476ef03012 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models')
-rw-r--r--app/models/performance_monitoring/prometheus_panel.rb6
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