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:
authorThong Kuah <tkuah@gitlab.com>2018-12-13 10:53:15 +0300
committerThong Kuah <tkuah@gitlab.com>2018-12-13 10:53:15 +0300
commit459758921faefa10c475c4691faa4d388eb00df8 (patch)
tree2ed204c55d211c340f5b0baa6078043897b19795 /app/presenters
parente7a6b841684f9a2929b16176b223ea44bfc26332 (diff)
Move description of cluster type to presenter
Diffstat (limited to 'app/presenters')
-rw-r--r--app/presenters/clusters/cluster_presenter.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/app/presenters/clusters/cluster_presenter.rb b/app/presenters/clusters/cluster_presenter.rb
index 7e6eccb648c..0473bb8c72a 100644
--- a/app/presenters/clusters/cluster_presenter.rb
+++ b/app/presenters/clusters/cluster_presenter.rb
@@ -12,6 +12,14 @@ module Clusters
can?(current_user, :update_cluster, cluster) && created?
end
+ def cluster_type_description
+ if cluster.project_type?
+ s_("ClusterIntegration|Project cluster")
+ elsif cluster.group_type?
+ s_("ClusterIntegration|Group cluster")
+ end
+ end
+
def show_path
if cluster.project_type?
project_cluster_path(project, cluster)