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:
authorKamil Trzciński <ayufan@ayufan.eu>2018-08-31 19:53:50 +0300
committerKamil Trzciński <ayufan@ayufan.eu>2018-09-04 13:19:22 +0300
commit0a9d771bcba036971ebc076112c4a62f2179e372 (patch)
tree5445b484556e0946931e002147cf40a2d6c1afa0 /spec/factories/prometheus_metrics.rb
parent05ee94beb70a2969b85563a0c41bf5afe48a3699 (diff)
Import common metrics into database.
This MR backports PrometheusMetric model to CE and adds: common, identifier to figure out what kind of metric is used.
Diffstat (limited to 'spec/factories/prometheus_metrics.rb')
-rw-r--r--spec/factories/prometheus_metrics.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/factories/prometheus_metrics.rb b/spec/factories/prometheus_metrics.rb
new file mode 100644
index 00000000000..0ab237d6b3e
--- /dev/null
+++ b/spec/factories/prometheus_metrics.rb
@@ -0,0 +1,16 @@
+FactoryBot.define do
+ factory :prometheus_metric, class: PrometheusMetric do
+ title 'title'
+ query 'avg(metric)'
+ y_label 'y_label'
+ unit 'm/s'
+ group :business
+ project
+ legend 'legend'
+
+ trait :common do
+ common true
+ project nil
+ end
+ end
+end