diff options
Diffstat (limited to 'app/serializers/prometheus_metric_entity.rb')
-rw-r--r-- | app/serializers/prometheus_metric_entity.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/app/serializers/prometheus_metric_entity.rb b/app/serializers/prometheus_metric_entity.rb new file mode 100644 index 00000000000..ab63f3f401e --- /dev/null +++ b/app/serializers/prometheus_metric_entity.rb @@ -0,0 +1,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 |