debian-mirror-gitlab/app/serializers/cluster_entity.rb

20 lines
468 B
Ruby
Raw Normal View History

2018-11-18 11:00:15 +05:30
# frozen_string_literal: true
2018-03-17 18:26:18 +05:30
class ClusterEntity < Grape::Entity
include RequestAwareEntity
2020-05-24 23:13:21 +05:30
expose :cluster_type
expose :enabled
expose :environment_scope
expose :name
expose :nodes
2020-06-23 00:09:42 +05:30
expose :provider_type
2018-03-17 18:26:18 +05:30
expose :status_name, as: :status
expose :status_reason
expose :applications, using: ClusterApplicationEntity
2020-05-24 23:13:21 +05:30
expose :path do |cluster|
Clusters::ClusterPresenter.new(cluster).show_path # rubocop: disable CodeReuse/Presenter
end
2018-03-17 18:26:18 +05:30
end