Remove method as using nested resource routes
We introduced hidden_clusterable_fields in this MR but it is no longer needed as we have gone back to nested resource routes which should provide the params such as `project_id`.
This commit is contained in:
parent
3e7d483173
commit
2c6a3f6a1a
7 changed files with 0 additions and 17 deletions
|
@ -14,10 +14,4 @@ module ClustersHelper
|
|||
render 'clusters/clusters/gcp_signup_offer_banner'
|
||||
end
|
||||
end
|
||||
|
||||
def hidden_clusterable_fields
|
||||
clusterable.clusterable_params.map do |key, value|
|
||||
hidden_field_tag(key, value)
|
||||
end.reduce(&:safe_concat)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
= form_for @cluster, url: clusterable.cluster_path(@cluster), as: :cluster do |field|
|
||||
= form_errors(@cluster)
|
||||
= hidden_clusterable_fields
|
||||
.form-group
|
||||
%h5= s_('ClusterIntegration|Integration status')
|
||||
%label.append-bottom-0.js-cluster-enable-toggle-area
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
|
||||
= form_for @gcp_cluster, html: { class: 'js-gke-cluster-creation prepend-top-20', data: { token: token_in_session } }, url: clusterable.create_gcp_clusters_path, as: :cluster do |field|
|
||||
= form_errors(@gcp_cluster)
|
||||
= hidden_clusterable_fields
|
||||
.form-group
|
||||
= field.label :name, s_('ClusterIntegration|Kubernetes cluster name'), class: 'label-bold'
|
||||
= field.text_field :name, class: 'form-control', placeholder: s_('ClusterIntegration|Kubernetes cluster name')
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
|
||||
= form_for @cluster, url: clusterable.cluster_path(@cluster), as: :cluster do |field|
|
||||
= form_errors(@cluster)
|
||||
= hidden_clusterable_fields
|
||||
|
||||
= field.fields_for :platform_kubernetes, @cluster.platform_kubernetes do |platform_kubernetes_field|
|
||||
.form-group
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
= form_for @user_cluster, url: clusterable.create_user_clusters_path, as: :cluster do |field|
|
||||
= form_errors(@user_cluster)
|
||||
= hidden_clusterable_fields
|
||||
.form-group
|
||||
= field.label :name, s_('ClusterIntegration|Kubernetes cluster name'), class: 'label-bold'
|
||||
= field.text_field :name, class: 'form-control', placeholder: s_('ClusterIntegration|Kubernetes cluster name')
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
= form_for @cluster, url: clusterable.cluster_path(@cluster), as: :cluster do |field|
|
||||
= form_errors(@cluster)
|
||||
= hidden_clusterable_fields
|
||||
.form-group
|
||||
= field.label :name, s_('ClusterIntegration|Kubernetes cluster name'), class: 'label-bold'
|
||||
= field.text_field :name, class: 'form-control', placeholder: s_('ClusterIntegration|Kubernetes cluster name')
|
||||
|
|
|
@ -74,10 +74,4 @@ describe ProjectClusterablePresenter do
|
|||
|
||||
it { is_expected.to eq(project_cluster_path(project, cluster)) }
|
||||
end
|
||||
|
||||
describe '#clusterable_params' do
|
||||
subject { presenter.clusterable_params }
|
||||
|
||||
it { is_expected.to eq({ project_id: project.to_param, namespace_id: project.namespace.to_param }) }
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue