Cleans cluster views a bit
- Moves logic into ClustersHelp - Add CSS to ensure compatibility with EE view.
This commit is contained in:
parent
9dc67bf10c
commit
aa86223a4a
3 changed files with 6 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
-# 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
|
||||
|
|
Loading…
Reference in a new issue