debian-mirror-gitlab/lib/gitlab/prometheus/metric.rb

17 lines
363 B
Ruby
Raw Normal View History

2017-09-10 17:25:29 +05:30
module Gitlab
module Prometheus
class Metric
include ActiveModel::Model
attr_accessor :title, :required_metrics, :weight, :y_label, :queries
validates :title, :required_metrics, :weight, :y_label, :queries, presence: true
def initialize(params = {})
super(params)
@y_label ||= 'Values'
end
end
end
end