summaryrefslogtreecommitdiff
path: root/app/helpers
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-10 15:09:50 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-10 15:09:50 +0000
commitde2fb5b82c92c90f90ed67ced45143c04e934fb8 (patch)
treeff8e5e642580de7bb596d90dd0e7f739f44ca540 /app/helpers
parentc6a33b298229f9e04933be43d6176c476ef03012 (diff)
downloadgitlab-ce-de2fb5b82c92c90f90ed67ced45143c04e934fb8.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/clusters_helper.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/app/helpers/clusters_helper.rb b/app/helpers/clusters_helper.rb
index 21bd2ff9e32..a97216f8a22 100644
--- a/app/helpers/clusters_helper.rb
+++ b/app/helpers/clusters_helper.rb
@@ -41,6 +41,23 @@ module ClustersHelper
end
end
+ def cluster_type_label(cluster_type)
+ case cluster_type
+ when 'project_type'
+ s_('ClusterIntegration|Project cluster')
+ when 'group_type'
+ s_('ClusterIntegration|Group cluster')
+ when 'instance_type'
+ s_('ClusterIntegration|Instance cluster')
+ else
+ Gitlab::ErrorTracking.track_and_raise_for_dev_exception(
+ ArgumentError.new('Cluster Type Missing'),
+ cluster_error: { error: 'Cluster Type Missing', cluster_type: cluster_type }
+ )
+ _('Cluster')
+ end
+ end
+
def has_rbac_enabled?(cluster)
return cluster.platform_kubernetes_rbac? if cluster.platform_kubernetes