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

28 lines
556 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2017-10-03 17:21:54 -04:00
class ClusterSerializer < BaseSerializer
include WithPagination
2017-10-03 17:21:54 -04:00
entity ClusterEntity
def represent_list(resource)
represent(resource, {
only: [
:cluster_type,
:enabled,
:environment_scope,
:gitlab_managed_apps_logs_path,
:kubernetes_errors,
:name,
:nodes,
:path,
:provider_type,
:status
]
})
end
2017-10-03 17:21:54 -04:00
def represent_status(resource)
2017-10-31 06:29:56 -04:00
represent(resource, { only: [:status, :status_reason, :applications] })
2017-10-03 17:21:54 -04:00
end
end