Fix paths to the first page
This commit is contained in:
parent
5754908fee
commit
882cf2e409
4 changed files with 11 additions and 14 deletions
|
@ -1,8 +1,8 @@
|
||||||
class Projects::ClustersController < Projects::ApplicationController
|
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_read_cluster!
|
||||||
before_action :authorize_create_cluster!, only: [:new, :create]
|
before_action :authorize_create_cluster!, only: [:new, :new_gcp, :create]
|
||||||
before_action :authorize_google_api, only: [:new, :create]
|
before_action :authorize_google_api, only: [:new_gcp, :create]
|
||||||
before_action :authorize_update_cluster!, only: [:update]
|
before_action :authorize_update_cluster!, only: [:update]
|
||||||
before_action :authorize_admin_cluster!, only: [:destroy]
|
before_action :authorize_admin_cluster!, only: [:destroy]
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ class Projects::ClustersController < Projects::ApplicationController
|
||||||
|
|
||||||
def login
|
def login
|
||||||
begin
|
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(
|
@authorize_url = GoogleApi::CloudPlatform::Client.new(
|
||||||
nil, callback_google_api_auth_url,
|
nil, callback_google_api_auth_url,
|
||||||
|
@ -26,13 +26,11 @@ class Projects::ClustersController < Projects::ApplicationController
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# TODO fix this
|
def new
|
||||||
def new_kubernetes_form
|
|
||||||
@cluster = project.build_cluster
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def new
|
def new_gcp
|
||||||
# First page!
|
@cluster = project.build_cluster
|
||||||
end
|
end
|
||||||
|
|
||||||
def create
|
def create
|
||||||
|
|
|
@ -8,9 +8,6 @@
|
||||||
%h4= s_('ClusterIntegration|Choose how to set up cluster integration')
|
%h4= s_('ClusterIntegration|Choose how to set up cluster integration')
|
||||||
|
|
||||||
%p= s_('ClusterIntegration| Create a new cluster on Google Engine right from GitLab')
|
%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_new_namespace_project_clusters_path(@project.namespace, @project), class: 'btn append-bottom-20'
|
||||||
= link_to s_('ClusterIntegration|Create on GKE'), providers_gcp_login_project_clusters_path(@project), class: 'btn append-bottom-20'
|
|
||||||
-# TODO FIX PATH
|
|
||||||
%p= s_('ClusterIntegration| Enter the details for an existing Kubernetes cluster')
|
%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'
|
||||||
|
|
||||||
|
|
|
@ -6,4 +6,5 @@
|
||||||
= render 'sidebar'
|
= render 'sidebar'
|
||||||
.col-sm-8
|
.col-sm-8
|
||||||
= render 'header'
|
= render 'header'
|
||||||
|
|
||||||
= render 'form'
|
= render 'form'
|
|
@ -186,6 +186,7 @@ constraints(ProjectUrlConstrainer.new) do
|
||||||
resources :clusters, except: [:edit] do
|
resources :clusters, except: [:edit] do
|
||||||
collection do
|
collection do
|
||||||
get :login
|
get :login
|
||||||
|
get '/providers/gcp/new', to: :new_gcp
|
||||||
end
|
end
|
||||||
|
|
||||||
member do
|
member do
|
||||||
|
|
Loading…
Reference in a new issue