summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2018-11-02 12:34:40 +0000
committerKamil Trzciński <ayufan@ayufan.eu>2018-11-02 12:34:40 +0000
commit46fd31594e166b17d1c0ca232b6acdd09c1b1cdb (patch)
tree28a50ec6870fb9eb977116079efe789a419f4306 /config
parent473262a04b098396c0633436c0e9572561d332c7 (diff)
parentfec21f5542b4b50cb1e49a6c50c8b4d57fa9f62e (diff)
downloadgitlab-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.rb17
-rw-r--r--config/routes/project.rb15
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