From ecb4a29fc069990a4e946f40f1bd8e17dcb2186d Mon Sep 17 00:00:00 2001 From: Thong Kuah Date: Wed, 7 Nov 2018 21:07:28 +1300 Subject: Reverse view override as EE has an override too Use presenters instead otherwise we will have x2 overides in EE --- app/presenters/clusterable_presenter.rb | 4 ++++ app/presenters/group_clusterable_presenter.rb | 5 +++++ app/presenters/project_clusterable_presenter.rb | 5 +++++ 3 files changed, 14 insertions(+) (limited to 'app/presenters') 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') -- cgit v1.2.3