Commit aa86223a authored by Mayra Cabrera's avatar Mayra Cabrera Committed by Thong Kuah

Cleans cluster views a bit

- Moves logic into ClustersHelp
- Add CSS to ensure compatibility with EE view.
parent 9dc67bf1
......@@ -36,4 +36,8 @@ module ClustersHelper
render 'clusters/clusters/gcp_signup_offer_banner'
end
end
def display_clusters_callout?(clusters, clusterable)
clusters.length > clusterable.clusters.length
end
end
-# This partial is overridden in EE
.nav-controls
- if clusterable.can_create_cluster? && clusterable.clusters.empty?
= link_to s_('ClusterIntegration|Add Kubernetes cluster'), clusterable.new_path, class: 'btn btn-success'
= 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
= s_("ClusterIntegration|Add Kubernetes cluster")
......@@ -12,7 +12,7 @@
= s_("ClusterIntegration|Kubernetes clusters can be used to deploy applications and to provide Review Apps for this project")
= render 'clusters/clusters/buttons'
- if @clusters.length > clusterable.clusters.length
- if display_clusters_callout?(@clusters, clusterable)
.bs-callout.bs-callout-info
= s_("ClusterIntegration|Clusters are utilized by selecting the nearest ancestor with a matching environment scope. For example, project clusters will override group clusters.")
%strong
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment