提交 db30e7f3 编写于 作者: D Dennis Tang

use implied route for clusters#create

上级 250a8aee
......@@ -6,7 +6,7 @@
%p= link_to('Select a different Google account', @authorize_url)
= form_for @new_cluster, html: { class: 'js-gke-cluster-creation prepend-top-20', data: { token: @token_in_session } }, url: new_namespace_project_clusters_path(@project.namespace, @project, { type: 'new' }), as: :cluster do |field|
= form_for @new_cluster, html: { class: 'js-gke-cluster-creation prepend-top-20', data: { token: @token_in_session } }, url: namespace_project_clusters_path(@project.namespace, @project, { type: 'new' }), as: :cluster do |field|
= form_errors(@new_cluster)
.form-group
= field.label :name, s_('ClusterIntegration|Kubernetes cluster name')
......
= form_for @existing_cluster, url: new_namespace_project_clusters_path(@project.namespace, @project, { type: 'existing' }), as: :cluster do |field|
= form_for @existing_cluster, url: namespace_project_clusters_path(@project.namespace, @project, { type: 'existing' }), as: :cluster do |field|
= form_errors(@existing_cluster)
.form-group
= field.label :name, s_('ClusterIntegration|Kubernetes cluster name')
......
......@@ -204,11 +204,7 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
end
end
resources :clusters, except: [:edit, :create] do
collection do
post '/new', to: 'clusters#create'
end
resources :clusters, except: [:edit] do
member do
get :status, format: :json
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册