summaryrefslogtreecommitdiff
path: root/config/routes.rb
diff options
context:
space:
mode:
authorThong Kuah <tkuah@gitlab.com>2018-11-01 13:39:01 +1300
committerThong Kuah <tkuah@gitlab.com>2018-11-01 19:37:33 +1300
commit1a1fdf8efe1923ba781e978e858c009264020e72 (patch)
treedf98af221d7a722e4c67db450b78a5488bff6a3c /config/routes.rb
parent28dabc67f4db8271ac20c0db458ae2c86a906eee (diff)
downloadgitlab-ce-1a1fdf8efe1923ba781e978e858c009264020e72.tar.gz
Resolve controller sharing concern
Use ClustersController as base while having Projects::ClustersController to inform what `clusterable` is. Thanks @ayufan for the great suggestion ! - View changes to work with new approach - Fix javascript for new approach - Fix feature specs for new approach - Fix QA
Diffstat (limited to 'config/routes.rb')
-rw-r--r--config/routes.rb28
1 files changed, 13 insertions, 15 deletions
diff --git a/config/routes.rb b/config/routes.rb
index bf5023eeec2..d2d91647d0b 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -74,7 +74,18 @@ Rails.application.routes.draw do
resources :issues, module: :boards, only: [:index, :update]
end
- resources :clusters, only: [:update, :destroy] do
+ # UserCallouts
+ resources :user_callouts, only: [:create]
+
+ get 'ide' => 'ide#index'
+ get 'ide/*vueroute' => 'ide#index', format: false
+
+ draw :operations
+ draw :instance_statistics
+ end
+
+ concern :clusterable do
+ resources :clusters, only: [:index, :new, :show, :update, :destroy] do
collection do
post :create_user
post :create_gcp
@@ -85,22 +96,9 @@ Rails.application.routes.draw do
post '/:application', to: 'clusters/applications#create', as: :install_applications
end
- get :status, format: :json
+ get :cluster_status, format: :json
end
end
-
- # UserCallouts
- resources :user_callouts, only: [:create]
-
- get 'ide' => 'ide#index'
- get 'ide/*vueroute' => 'ide#index', format: false
-
- draw :operations
- draw :instance_statistics
- end
-
- concern :clusterable do
- resources :clusters, only: [:index, :new, :show], controller: '/clusters'
end
draw :api