diff options
author | Alessio Caiazza <acaiazza@gitlab.com> | 2017-10-31 13:29:56 +0300 |
---|---|---|
committer | Alessio Caiazza <acaiazza@gitlab.com> | 2017-10-31 14:23:31 +0300 |
commit | 84f5aaa729d6286252602800a1f9e1bf1e5b47d3 (patch) | |
tree | c144d77c478862303ac12cded4415f597cb8779b /app/serializers/cluster_entity.rb | |
parent | 6d462cea77508e407995c58b0ae581edefa74d22 (diff) |
WIP: mock cluster apps status API
Diffstat (limited to 'app/serializers/cluster_entity.rb')
-rw-r--r-- | app/serializers/cluster_entity.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/app/serializers/cluster_entity.rb b/app/serializers/cluster_entity.rb index 08a113c4d8a..84ce34afb32 100644 --- a/app/serializers/cluster_entity.rb +++ b/app/serializers/cluster_entity.rb @@ -3,4 +3,16 @@ 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 end |