diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-07 12:09:34 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-07 12:09:34 +0000 |
commit | 903ccf7c93eb9490c76857bffe744249cc07de09 (patch) | |
tree | 603a3162e91999160e4efc74f351f9405f422d61 /app/serializers | |
parent | 41cb558299b483b44b45351730ee4c0e9fe4ca2c (diff) | |
download | gitlab-ce-903ccf7c93eb9490c76857bffe744249cc07de09.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/serializers')
-rw-r--r-- | app/serializers/container_repository_entity.rb | 2 | ||||
-rw-r--r-- | app/serializers/prometheus_metric_entity.rb | 16 | ||||
-rw-r--r-- | app/serializers/prometheus_metric_serializer.rb | 5 |
3 files changed, 22 insertions, 1 deletions
diff --git a/app/serializers/container_repository_entity.rb b/app/serializers/container_repository_entity.rb index db9cf1c7835..46aa0adc5a0 100644 --- a/app/serializers/container_repository_entity.rb +++ b/app/serializers/container_repository_entity.rb @@ -3,7 +3,7 @@ class ContainerRepositoryEntity < Grape::Entity include RequestAwareEntity - expose :id, :name, :path, :location, :created_at + expose :id, :name, :path, :location, :created_at, :status expose :tags_path do |repository| project_registry_repository_tags_path(project, repository, format: :json) 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 diff --git a/app/serializers/prometheus_metric_serializer.rb b/app/serializers/prometheus_metric_serializer.rb new file mode 100644 index 00000000000..886a6ba852f --- /dev/null +++ b/app/serializers/prometheus_metric_serializer.rb @@ -0,0 +1,5 @@ +# frozen_string_literal: true + +class PrometheusMetricSerializer < BaseSerializer + entity PrometheusMetricEntity +end |