summaryrefslogtreecommitdiff
path: root/app/serializers/prometheus_metric_entity.rb
blob: ab63f3f401e22fa24aafaba824fdfc5925ad1527 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# frozen_string_literal: true

class PrometheusMetricEntity < Grape::Entity
  include RequestAwareEntity

  expose :id
  expose :title

  expose :group
  expose :group_title
  expose :unit

  expose :edit_path do |prometheus_metric|
    edit_project_prometheus_metric_path(prometheus_metric.project, prometheus_metric)
  end
end