diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2017-11-02 15:10:46 +0100 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2017-11-02 15:10:46 +0100 |
commit | 64be8d70ae20928df351e495a3442bb6036bc3e7 (patch) | |
tree | 6eb01452391ccfa45d1dbaeae261d118d323bcc1 /app/serializers | |
parent | 461c385ebca7ecb52d0b385fd61c856eb395481a (diff) | |
download | gitlab-ce-64be8d70ae20928df351e495a3442bb6036bc3e7.tar.gz |
Improve backend structure of data
Diffstat (limited to 'app/serializers')
-rw-r--r-- | app/serializers/cluster_app_entity.rb | 5 | ||||
-rw-r--r-- | app/serializers/cluster_entity.rb | 13 |
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 |