2019-02-13 22:33:31 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-09-10 17:25:29 +05:30
|
|
|
module Gitlab
|
|
|
|
module Prometheus
|
|
|
|
class Metric
|
|
|
|
include ActiveModel::Model
|
|
|
|
|
2018-11-18 11:00:15 +05:30
|
|
|
attr_accessor :id, :title, :required_metrics, :weight, :y_label, :queries
|
2017-09-10 17:25:29 +05:30
|
|
|
|
|
|
|
validates :title, :required_metrics, :weight, :y_label, :queries, presence: true
|
|
|
|
|
|
|
|
def initialize(params = {})
|
|
|
|
super(params)
|
|
|
|
@y_label ||= 'Values'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|