diff options
author | Mike Greiling <mike@pixelcog.com> | 2018-11-06 23:26:30 +0300 |
---|---|---|
committer | Thong Kuah <tkuah@gitlab.com> | 2018-11-08 13:28:30 +0300 |
commit | 1dba5dbc3ad227aa0d3252efffb2dd1b2078eb0d (patch) | |
tree | 6a088996ca01f6dfab4e9da8851ff32c00dc539a /app | |
parent | 5a042ef2fbe1bd57b9428c89b49d2fa1e248ad46 (diff) |
Update empty state for group clusters index
Diffstat (limited to 'app')
-rw-r--r-- | app/presenters/clusterable_presenter.rb | 4 | ||||
-rw-r--r-- | app/presenters/group_clusterable_presenter.rb | 4 | ||||
-rw-r--r-- | app/presenters/project_clusterable_presenter.rb | 4 | ||||
-rw-r--r-- | app/views/clusters/clusters/_empty_state.html.haml | 8 |
4 files changed, 19 insertions, 1 deletions
diff --git a/app/presenters/clusterable_presenter.rb b/app/presenters/clusterable_presenter.rb index cff0e74d6ea..9cc93d7f0c6 100644 --- a/app/presenters/clusterable_presenter.rb +++ b/app/presenters/clusterable_presenter.rb @@ -43,4 +43,8 @@ class ClusterablePresenter < Gitlab::View::Presenter::Delegated def cluster_path(cluster, params = {}) raise NotImplementedError end + + def is_project? + raise NotImplementedError + end end diff --git a/app/presenters/group_clusterable_presenter.rb b/app/presenters/group_clusterable_presenter.rb index 22d3ba9db35..5a893559f12 100644 --- a/app/presenters/group_clusterable_presenter.rb +++ b/app/presenters/group_clusterable_presenter.rb @@ -12,4 +12,8 @@ class GroupClusterablePresenter < ClusterablePresenter def cluster_path(cluster, params = {}) group_cluster_path(clusterable, cluster, params) end + + def is_project? + false + end end diff --git a/app/presenters/project_clusterable_presenter.rb b/app/presenters/project_clusterable_presenter.rb index 12077b2e735..4b74c9beb95 100644 --- a/app/presenters/project_clusterable_presenter.rb +++ b/app/presenters/project_clusterable_presenter.rb @@ -12,4 +12,8 @@ class ProjectClusterablePresenter < ClusterablePresenter def cluster_path(cluster, params = {}) project_cluster_path(clusterable, cluster, params) end + + def is_project? + true + end end diff --git a/app/views/clusters/clusters/_empty_state.html.haml b/app/views/clusters/clusters/_empty_state.html.haml index 800e76d92ef..4e739e86edf 100644 --- a/app/views/clusters/clusters/_empty_state.html.haml +++ b/app/views/clusters/clusters/_empty_state.html.haml @@ -5,7 +5,13 @@ .text-content %h4.text-center= s_('ClusterIntegration|Integrate Kubernetes cluster automation') - link_to_help_page = link_to(_('Learn more about Kubernetes'), help_page_path('user/project/clusters/index'), target: '_blank', rel: 'noopener noreferrer') - %p= s_('ClusterIntegration|Kubernetes clusters allow you to use review apps, deploy your applications, run your pipelines, and much more in an easy way. %{link_to_help_page}').html_safe % { link_to_help_page: link_to_help_page} + %p + = s_('ClusterIntegration|Kubernetes clusters allow you to use review apps, deploy your applications, run your pipelines, and much more in an easy way.') + - if clusterable.is_project? + = link_to(s_('ClusterIntegration|Learn more about Kubernetes'), help_page_path('user/project/clusters/index'), target: '_blank', rel: 'noopener noreferrer') + - else + = s_('ClusterIntegration|Adding an integration to your group will share the cluster across all your projects.') + = link_to(s_('ClusterIntegration|Learn more about group Kubernetes clusters'), help_page_path('user/project/clusters/index'), target: '_blank', rel: 'noopener noreferrer') - if clusterable.can_create_cluster? .text-center |