2018-07-19 14:43:13 -04:00
|
|
|
# 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
|
2020-07-09 02:09:37 -04:00
|
|
|
expose :version, if: -> (e, _) { e.respond_to?(:version) }
|
2018-02-11 22:22:15 -05:00
|
|
|
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) }
|
2018-05-16 05:01:13 -04:00
|
|
|
expose :hostname, if: -> (e, _) { e.respond_to?(:hostname) }
|
2018-12-07 11:10:03 -05:00
|
|
|
expose :email, if: -> (e, _) { e.respond_to?(:email) }
|
2019-11-17 22:06:28 -05:00
|
|
|
expose :stack, if: -> (e, _) { e.respond_to?(:stack) }
|
2020-01-07 07:07:55 -05:00
|
|
|
expose :modsecurity_enabled, if: -> (e, _) { e.respond_to?(:modsecurity_enabled) }
|
2019-02-07 16:40:55 -05:00
|
|
|
expose :update_available?, as: :update_available, if: -> (e, _) { e.respond_to?(:update_available?) }
|
2019-04-12 01:42:48 -04:00
|
|
|
expose :can_uninstall?, as: :can_uninstall
|
2020-02-27 10:09:24 -05:00
|
|
|
expose :available_domains, using: Serverless::DomainEntity, if: -> (e, _) { e.respond_to?(:available_domains) }
|
|
|
|
expose :pages_domain, using: Serverless::DomainEntity, if: -> (e, _) { e.respond_to?(:pages_domain) }
|
2020-03-19 05:09:27 -04:00
|
|
|
expose :modsecurity_mode, if: -> (e, _) { e.respond_to?(:modsecurity_mode) }
|
2020-04-15 20:09:22 -04:00
|
|
|
expose :host, if: -> (e, _) { e.respond_to?(:host) }
|
|
|
|
expose :port, if: -> (e, _) { e.respond_to?(:port) }
|
|
|
|
expose :protocol, if: -> (e, _) { e.respond_to?(:protocol) }
|
2020-04-22 20:09:41 -04:00
|
|
|
expose :waf_log_enabled, if: -> (e, _) { e.respond_to?(:waf_log_enabled) }
|
|
|
|
expose :cilium_log_enabled, if: -> (e, _) { e.respond_to?(:cilium_log_enabled) }
|
2017-11-02 10:10:46 -04:00
|
|
|
end
|