debian-mirror-gitlab/app/serializers/cluster_serializer.rb

26 lines
488 B
Ruby
Raw Normal View History

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,
2020-06-23 00:09:42 +05:30
:provider_type,
2020-05-24 23:13:21 +05:30
:status
]
})
end
2018-03-17 18:26:18 +05:30
def represent_status(resource)
represent(resource, { only: [:status, :status_reason, :applications] })
end
end