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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2017-11-02 17:10:46 +0300
committerKamil Trzcinski <ayufan@ayufan.eu>2017-11-02 17:10:46 +0300
commit64be8d70ae20928df351e495a3442bb6036bc3e7 (patch)
tree6eb01452391ccfa45d1dbaeae261d118d323bcc1 /app/serializers
parent461c385ebca7ecb52d0b385fd61c856eb395481a (diff)
Improve backend structure of data
Diffstat (limited to 'app/serializers')
-rw-r--r--app/serializers/cluster_app_entity.rb5
-rw-r--r--app/serializers/cluster_entity.rb13
2 files changed, 6 insertions, 12 deletions
diff --git a/app/serializers/cluster_app_entity.rb b/app/serializers/cluster_app_entity.rb
new file mode 100644
index 00000000000..7da2d4921a2
--- /dev/null
+++ b/app/serializers/cluster_app_entity.rb
@@ -0,0 +1,5 @@
+class ClusterAppEntity < Grape::Entity
+ expose :name
+ expose :status_name, as: :status
+ expose :status_reason
+end
diff --git a/app/serializers/cluster_entity.rb b/app/serializers/cluster_entity.rb
index 84ce34afb32..e775c68eb6b 100644
--- a/app/serializers/cluster_entity.rb
+++ b/app/serializers/cluster_entity.rb
@@ -3,16 +3,5 @@ class ClusterEntity < Grape::Entity
expose :status_name, as: :status
expose :status_reason
- expose :applications do |cluster, options|
- if cluster.created?
- {
- helm: { status: 'installed' },
- ingress: { status: 'error', status_reason: 'Missing namespace' },
- runner: { status: 'installing' },
- prometheus: { status: 'installable' }
- }
- else
- {}
- end
- end
+ expose :applications, using: ClusterAppEntity
end