gitlab-org--gitlab-foss/lib/gitlab/prometheus/metric.rb

19 lines
399 B
Ruby
Raw Normal View History

# frozen_string_literal: true
module Gitlab
module Prometheus
class Metric
include ActiveModel::Model
2018-07-25 04:31:50 -04:00
attr_accessor :id, :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