summaryrefslogtreecommitdiff
path: root/app/serializers/cluster_serializer.rb
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2017-10-03 23:21:54 +0200
committerKamil Trzcinski <ayufan@ayufan.eu>2017-10-03 23:21:54 +0200
commit2507652084b7ca397574878538384edcbad68c73 (patch)
treef40972615b18d8eafc41bc8367865dd2a05ac005 /app/serializers/cluster_serializer.rb
parent65b4627d3eda27844b093c981d05499a86e7235a (diff)
downloadgitlab-ce-2507652084b7ca397574878538384edcbad68c73.tar.gz
Introduce serializer for ClusterEntity
Diffstat (limited to 'app/serializers/cluster_serializer.rb')
-rw-r--r--app/serializers/cluster_serializer.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/serializers/cluster_serializer.rb b/app/serializers/cluster_serializer.rb
new file mode 100644
index 00000000000..2c87202a105
--- /dev/null
+++ b/app/serializers/cluster_serializer.rb
@@ -0,0 +1,7 @@
+class ClusterSerializer < BaseSerializer
+ entity ClusterEntity
+
+ def represent_status(resource)
+ represent(resource, { only: [:status, :status_reason] })
+ end
+end