cluster_entity.rb 429 Bytes
Newer Older
1 2
# frozen_string_literal: true

3 4 5
class ClusterEntity < Grape::Entity
  include RequestAwareEntity

Emily Ring's avatar
Emily Ring committed
6 7 8 9
  expose :cluster_type
  expose :enabled
  expose :environment_scope
  expose :name
10
  expose :status_name, as: :status
11
  expose :status_reason
Emily Ring's avatar
Emily Ring committed
12 13 14 15 16

  expose :path do |cluster|
    Clusters::ClusterPresenter.new(cluster).show_path # rubocop: disable CodeReuse/Presenter
  end

17
  expose :applications, using: ClusterApplicationEntity
18
end