2018-07-19 18:43:13 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-10-03 21:21:54 +00:00
|
|
|
class ClusterSerializer < BaseSerializer
|
2020-04-30 21:09:47 +00:00
|
|
|
include WithPagination
|
2017-10-03 21:21:54 +00:00
|
|
|
entity ClusterEntity
|
|
|
|
|
2020-04-30 21:09:47 +00:00
|
|
|
def represent_list(resource)
|
|
|
|
represent(resource, {
|
|
|
|
only: [
|
|
|
|
:cluster_type,
|
|
|
|
:enabled,
|
|
|
|
:environment_scope,
|
|
|
|
:name,
|
2020-05-14 21:07:52 +00:00
|
|
|
:nodes,
|
2020-04-30 21:09:47 +00:00
|
|
|
:path,
|
|
|
|
:status
|
|
|
|
]
|
|
|
|
})
|
|
|
|
end
|
|
|
|
|
2017-10-03 21:21:54 +00:00
|
|
|
def represent_status(resource)
|
2017-10-31 10:29:56 +00:00
|
|
|
represent(resource, { only: [:status, :status_reason, :applications] })
|
2017-10-03 21:21:54 +00:00
|
|
|
end
|
|
|
|
end
|