diff options
author | Thong Kuah <tkuah@gitlab.com> | 2018-11-01 03:39:01 +0300 |
---|---|---|
committer | Thong Kuah <tkuah@gitlab.com> | 2018-11-01 09:37:33 +0300 |
commit | 1a1fdf8efe1923ba781e978e858c009264020e72 (patch) | |
tree | df98af221d7a722e4c67db450b78a5488bff6a3c /config/routes.rb | |
parent | 28dabc67f4db8271ac20c0db458ae2c86a906eee (diff) |
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.rb | 28 |
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 |