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

15 lines
593 B
Ruby
Raw Normal View History

# frozen_string_literal: true
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
2019-01-30 04:26:52 -05:00
expose :version
expose :external_ip, if: -> (e, _) { e.respond_to?(:external_ip) }
2019-03-07 16:51:43 -05:00
expose :external_hostname, if: -> (e, _) { e.respond_to?(:external_hostname) }
expose :hostname, if: -> (e, _) { e.respond_to?(:hostname) }
expose :email, if: -> (e, _) { e.respond_to?(:email) }
expose :update_available?, as: :update_available, if: -> (e, _) { e.respond_to?(:update_available?) }
expose :can_uninstall?, as: :can_uninstall
2017-11-02 10:10:46 -04:00
end