summaryrefslogtreecommitdiff
path: root/app/presenters
diff options
context:
space:
mode:
authorThong Kuah <tkuah@gitlab.com>2018-11-07 21:07:28 +1300
committerThong Kuah <tkuah@gitlab.com>2018-11-08 23:28:30 +1300
commitecb4a29fc069990a4e946f40f1bd8e17dcb2186d (patch)
tree6d8f2d0c56d33f0469c15af4b20a2652094312b7 /app/presenters
parentb019224ff2bf6c8282a210eff1e98d0225e98a0c (diff)
downloadgitlab-ce-ecb4a29fc069990a4e946f40f1bd8e17dcb2186d.tar.gz
Reverse view override as EE has an override too
Use presenters instead otherwise we will have x2 overides in EE
Diffstat (limited to 'app/presenters')
-rw-r--r--app/presenters/clusterable_presenter.rb4
-rw-r--r--app/presenters/group_clusterable_presenter.rb5
-rw-r--r--app/presenters/project_clusterable_presenter.rb5
3 files changed, 14 insertions, 0 deletions
diff --git a/app/presenters/clusterable_presenter.rb b/app/presenters/clusterable_presenter.rb
index 08ff49a8702..9cc137aa3bd 100644
--- a/app/presenters/clusterable_presenter.rb
+++ b/app/presenters/clusterable_presenter.rb
@@ -48,6 +48,10 @@ class ClusterablePresenter < Gitlab::View::Presenter::Delegated
nil
end
+ def sidebar_text
+ raise NotImplementedError
+ end
+
def learn_more_link
raise NotImplementedError
end
diff --git a/app/presenters/group_clusterable_presenter.rb b/app/presenters/group_clusterable_presenter.rb
index 427f3ec047c..d963c188559 100644
--- a/app/presenters/group_clusterable_presenter.rb
+++ b/app/presenters/group_clusterable_presenter.rb
@@ -24,6 +24,11 @@ class GroupClusterablePresenter < ClusterablePresenter
s_('ClusterIntegration|Adding an integration to your group will share the cluster across all your projects.')
end
+ override :sidebar_text
+ def sidebar_text
+ s_('ClusterIntegration|Adding a Kubernetes cluster to your group will automatically share the cluster across all your projects. Use review apps, deploy your applications, and easily run your pipelines for all projects using the same cluster.')
+ end
+
override :learn_more_link
def learn_more_link
link_to(s_('ClusterIntegration|Learn more about group Kubernetes clusters'), help_page_path('user/project/clusters/index'), target: '_blank', rel: 'noopener noreferrer')
diff --git a/app/presenters/project_clusterable_presenter.rb b/app/presenters/project_clusterable_presenter.rb
index ede8547d210..63e69b91b11 100644
--- a/app/presenters/project_clusterable_presenter.rb
+++ b/app/presenters/project_clusterable_presenter.rb
@@ -19,6 +19,11 @@ class ProjectClusterablePresenter < ClusterablePresenter
project_cluster_path(clusterable, cluster, params)
end
+ override :sidebar_text
+ def sidebar_text
+ s_('ClusterIntegration|With a Kubernetes cluster associated to this project, you can use review apps, deploy your applications, run your pipelines, and much more in an easy way.')
+ end
+
override :learn_more_link
def learn_more_link
link_to(s_('ClusterIntegration|Learn more about Kubernetes'), help_page_path('user/project/clusters/index'), target: '_blank', rel: 'noopener noreferrer')