2018-08-18 11:19:57 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2017-12-18 13:13:57 +00:00
|
|
|
module ClustersHelper
|
2018-10-19 01:42:30 +00:00
|
|
|
# EE overrides this
|
|
|
|
def has_multiple_clusters?
|
2017-12-18 13:35:08 +00:00
|
|
|
false
|
2017-12-18 13:13:57 +00:00
|
|
|
end
|
2018-05-07 18:06:02 +00:00
|
|
|
|
|
|
|
def render_gcp_signup_offer
|
2018-07-10 13:20:05 +00:00
|
|
|
return if Gitlab::CurrentSettings.current_application_settings.hide_third_party_offers?
|
2018-05-07 18:06:02 +00:00
|
|
|
return unless show_gcp_signup_offer?
|
|
|
|
|
|
|
|
content_tag :section, class: 'no-animate expanded' do
|
2018-10-15 03:37:51 +00:00
|
|
|
render 'clusters/gcp_signup_offer_banner'
|
2018-05-07 18:06:02 +00:00
|
|
|
end
|
|
|
|
end
|
2018-10-19 01:42:30 +00:00
|
|
|
|
|
|
|
def hidden_clusterable_fields
|
2018-10-30 10:33:43 +00:00
|
|
|
clusterable.clusterable_params.map do |key, value|
|
2018-10-19 01:42:30 +00:00
|
|
|
hidden_field_tag(key, value)
|
|
|
|
end.reduce(&:safe_concat)
|
|
|
|
end
|
2017-12-18 13:13:57 +00:00
|
|
|
end
|