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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

28 lines
529 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,
2021-01-03 14:25:43 +05:30
:id,
2020-10-24 23:57:45 +05:30
:kubernetes_errors,
2020-05-24 23:13:21 +05:30
: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