diff options
author | Mayra Cabrera <mcabrera@gitlab.com> | 2018-12-04 15:38:15 -0600 |
---|---|---|
committer | Mayra Cabrera <mcabrera@gitlab.com> | 2018-12-24 10:28:40 -0600 |
commit | 01ed3a1511be5d2076b5f602839ca0046055dd8b (patch) | |
tree | e4f825cfb92c1a2fd470ac3fb3f50ededdeebbd2 /app/views/clusters | |
parent | 4a10c813e726d09216c534bb0ad0ae50a0400259 (diff) | |
download | gitlab-ce-01ed3a1511be5d2076b5f602839ca0046055dd8b.tar.gz |
Allow users to add cluster with ancestors
Include a new policy in Clusterables
(projects and groups), which checks if another cluster
can be added
clusterable_has_cluster? and multiple_clusters_available
private methods will be overriden in EE
Related to https://gitlab.com/gitlab-org/gitlab-ce/issues/34758
Diffstat (limited to 'app/views/clusters')
-rw-r--r-- | app/views/clusters/clusters/_buttons.html.haml | 3 | ||||
-rw-r--r-- | app/views/clusters/clusters/_empty_state.html.haml | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/app/views/clusters/clusters/_buttons.html.haml b/app/views/clusters/clusters/_buttons.html.haml index 9238903aa10..c81d1d5b05a 100644 --- a/app/views/clusters/clusters/_buttons.html.haml +++ b/app/views/clusters/clusters/_buttons.html.haml @@ -1,6 +1,5 @@ --# This partial is overridden in EE .nav-controls - - if clusterable.can_create_cluster? && clusterable.clusters.empty? + - if clusterable.can_add_cluster? = link_to s_('ClusterIntegration|Add Kubernetes cluster'), clusterable.new_path, class: 'btn btn-success js-add-cluster' - else %span.btn.btn-add-cluster.disabled.js-add-cluster diff --git a/app/views/clusters/clusters/_empty_state.html.haml b/app/views/clusters/clusters/_empty_state.html.haml index c926ec258f0..cfdbfe2dea1 100644 --- a/app/views/clusters/clusters/_empty_state.html.haml +++ b/app/views/clusters/clusters/_empty_state.html.haml @@ -9,6 +9,6 @@ = clusterable.empty_state_help_text = clusterable.learn_more_link - - if clusterable.can_create_cluster? + - if clusterable.can_add_cluster? .text-center = link_to s_('ClusterIntegration|Add Kubernetes cluster'), clusterable.new_path, class: 'btn btn-success' |