2017-06-06 10:07:33 -04:00
|
|
|
module Gitlab
|
|
|
|
module Prometheus
|
|
|
|
class Metric
|
2017-06-16 08:23:33 -04:00
|
|
|
include ActiveModel::Model
|
2017-06-06 10:07:33 -04:00
|
|
|
|
2017-06-16 08:23:33 -04:00
|
|
|
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'
|
2017-06-06 10:07:33 -04:00
|
|
|
end
|
2017-05-10 05:25:30 -04:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|