gitlab-org--gitlab-foss/app/serializers/cluster_application_entity.rb

8 lines
257 B
Ruby
Raw Normal View History

2017-11-06 11:02:28 -05:00
class ClusterApplicationEntity < Grape::Entity
2017-11-02 10:10:46 -04:00
expose :name
expose :status_name, as: :status
expose :status_reason
expose :external_ip, if: -> (e, _) { e.respond_to?(:external_ip) }
expose :hostname, if: -> (e, _) { e.respond_to?(:hostname) }
2017-11-02 10:10:46 -04:00
end