diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2018-11-02 12:34:40 +0000 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2018-11-02 12:34:40 +0000 |
commit | 46fd31594e166b17d1c0ca232b6acdd09c1b1cdb (patch) | |
tree | 28a50ec6870fb9eb977116079efe789a419f4306 /config | |
parent | 473262a04b098396c0633436c0e9572561d332c7 (diff) | |
parent | fec21f5542b4b50cb1e49a6c50c8b4d57fa9f62e (diff) | |
download | gitlab-ce-46fd31594e166b17d1c0ca232b6acdd09c1b1cdb.tar.gz |
Merge branch 'top_level_clusters_controller' into 'master'
Top level clusters controller
See merge request gitlab-org/gitlab-ce!22438
Diffstat (limited to 'config')
-rw-r--r-- | config/routes.rb | 17 | ||||
-rw-r--r-- | config/routes/project.rb | 15 |
2 files changed, 18 insertions, 14 deletions
diff --git a/config/routes.rb b/config/routes.rb index 37c7f98ec98..d2d91647d0b 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -84,6 +84,23 @@ Rails.application.routes.draw do draw :instance_statistics end + concern :clusterable do + resources :clusters, only: [:index, :new, :show, :update, :destroy] do + collection do + post :create_user + post :create_gcp + end + + member do + scope :applications do + post '/:application', to: 'clusters/applications#create', as: :install_applications + end + + get :cluster_status, format: :json + end + end + end + draw :api draw :sidekiq draw :help diff --git a/config/routes/project.rb b/config/routes/project.rb index 73c46f72168..387d2363552 100644 --- a/config/routes/project.rb +++ b/config/routes/project.rb @@ -206,20 +206,7 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do end end - resources :clusters, except: [:edit, :create] do - collection do - post :create_gcp - post :create_user - end - - member do - get :status, format: :json - - scope :applications do - post '/:application', to: 'clusters/applications#create', as: :install_applications - end - end - end + concerns :clusterable resources :environments, except: [:destroy] do member do |