2018-11-18 11:00:15 +05:30
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-03-17 18:26:18 +05:30
|
|
|
class ClusterSerializer < BaseSerializer
|
2020-05-24 23:13:21 +05:30
|
|
|
include WithPagination
|
2018-03-17 18:26:18 +05:30
|
|
|
entity ClusterEntity
|
|
|
|
|
2020-05-24 23:13:21 +05:30
|
|
|
def represent_list(resource)
|
|
|
|
represent(resource, {
|
|
|
|
only: [
|
|
|
|
:cluster_type,
|
|
|
|
:enabled,
|
|
|
|
:environment_scope,
|
|
|
|
:name,
|
|
|
|
:nodes,
|
|
|
|
:path,
|
|
|
|
:status
|
|
|
|
]
|
|
|
|
})
|
|
|
|
end
|
|
|
|
|
2018-03-17 18:26:18 +05:30
|
|
|
def represent_status(resource)
|
|
|
|
represent(resource, { only: [:status, :status_reason, :applications] })
|
|
|
|
end
|
|
|
|
end
|