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

29 lines
596 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,
2020-07-28 23:09:34 +05:30
:gitlab_managed_apps_logs_path,
2020-11-24 15:15:51 +05:30
:enable_advanced_logs_querying,
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