Commit 882cf2e4 authored by Kamil Trzcinski's avatar Kamil Trzcinski

Fix paths to the first page

parent 5754908f
class Projects::ClustersController < Projects::ApplicationController
before_action :cluster, except: [:login, :index, :new, :create]
before_action :cluster, except: [:login, :index, :new, :new_gcp, :create]
before_action :authorize_read_cluster!
before_action :authorize_create_cluster!, only: [:new, :create]
before_action :authorize_google_api, only: [:new, :create]
before_action :authorize_create_cluster!, only: [:new, :new_gcp, :create]
before_action :authorize_google_api, only: [:new_gcp, :create]
before_action :authorize_update_cluster!, only: [:update]
before_action :authorize_admin_cluster!, only: [:destroy]
......@@ -16,7 +16,7 @@ class Projects::ClustersController < Projects::ApplicationController
def login
begin
state = generate_session_key_redirect(namespace_project_clusters_url.to_s)
state = generate_session_key_redirect(providers_gcp_new_namespace_project_clusters_url.to_s)
@authorize_url = GoogleApi::CloudPlatform::Client.new(
nil, callback_google_api_auth_url,
......@@ -26,13 +26,11 @@ class Projects::ClustersController < Projects::ApplicationController
end
end
# TODO fix this
def new_kubernetes_form
@cluster = project.build_cluster
def new
end
def new
# First page!
def new_gcp
@cluster = project.build_cluster
end
def create
......
......@@ -8,9 +8,6 @@
%h4= s_('ClusterIntegration|Choose how to set up cluster integration')
%p= s_('ClusterIntegration| Create a new cluster on Google Engine right from GitLab')
-# TODO FIX PATH
= link_to s_('ClusterIntegration|Create on GKE'), providers_gcp_login_project_clusters_path(@project), class: 'btn append-bottom-20'
-# TODO FIX PATH
= link_to s_('ClusterIntegration|Create on GKE'), providers_gcp_new_namespace_project_clusters_path(@project.namespace, @project), class: 'btn append-bottom-20'
%p= s_('ClusterIntegration| Enter the details for an existing Kubernetes cluster')
= link_to s_('ClusterIntegration|Add an existing cluster'), project_settings_integrations_path(@project), class: 'btn append-bottom-20'
= link_to s_('ClusterIntegration|Add an existing cluster'), edit_project_service_path(@project, :kubernetes), class: 'btn append-bottom-20'
......@@ -186,6 +186,7 @@ constraints(ProjectUrlConstrainer.new) do
resources :clusters, except: [:edit] do
collection do
get :login
get '/providers/gcp/new', to: :new_gcp
end
member do
......
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