Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cluster_serializer.rb « serializers « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 700a46040e36f84be5359b787e78744b9de16c63 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# frozen_string_literal: true

class ClusterSerializer < BaseSerializer
  include WithPagination
  entity ClusterEntity

  def represent_list(resource)
    represent(resource, {
      only: [
        :cluster_type,
        :enabled,
        :environment_scope,
        :gitlab_managed_apps_logs_path,
        :enable_advanced_logs_querying,
        :kubernetes_errors,
        :name,
        :nodes,
        :path,
        :provider_type,
        :status
      ]
    })
  end

  def represent_status(resource)
    represent(resource, { only: [:status, :status_reason, :applications] })
  end
end