diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-20 15:26:25 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-07-20 15:26:25 +0300 |
commit | a09983ae35713f5a2bbb100981116d31ce99826e (patch) | |
tree | 2ee2af7bd104d57086db360a7e6d8c9d5d43667a /config/routes.rb | |
parent | 18c5ab32b738c0b6ecb4d0df3994000482f34bd8 (diff) |
Add latest changes from gitlab-org/gitlab@13-2-stable-ee
Diffstat (limited to 'config/routes.rb')
-rw-r--r-- | config/routes.rb | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/config/routes.rb b/config/routes.rb index 598a52cddb3..dd84bc859bb 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,5 +1,6 @@ require 'sidekiq/web' require 'sidekiq/cron/web' +require 'product_analytics/collector_app' Rails.application.routes.draw do concern :access_requestable do @@ -58,6 +59,7 @@ Rails.application.routes.draw do # Search get 'search' => 'search#show' + get 'search/autocomplete' => 'search#autocomplete', as: :search_autocomplete get 'search/count' => 'search#count', as: :search_count # JSON Web Token @@ -75,6 +77,7 @@ Rails.application.routes.draw do get '/autocomplete/projects' => 'autocomplete#projects' get '/autocomplete/award_emojis' => 'autocomplete#award_emojis' get '/autocomplete/merge_request_target_branches' => 'autocomplete#merge_request_target_branches' + get '/autocomplete/deploy_keys_with_owners' => 'autocomplete#deploy_keys_with_owners' Gitlab.ee do get '/autocomplete/project_groups' => 'autocomplete#project_groups' @@ -174,6 +177,9 @@ Rails.application.routes.draw do # Used by third parties to verify CI_JOB_JWT, placeholder route # in case we decide to move away from doorkeeper-openid_connect get 'jwks' => 'doorkeeper/openid_connect/discovery#keys' + + # Product analytics collector + match '/collector/i', to: ProductAnalytics::CollectorApp.new, via: :all end # End of the /-/ scope. @@ -189,8 +195,6 @@ Rails.application.routes.draw do member do Gitlab.ee do get :metrics, format: :json - get :metrics_dashboard - get :'/prometheus/api/v1/*proxy_path', to: 'clusters#prometheus_proxy', as: :prometheus_api get :environments, format: :json end @@ -200,6 +204,8 @@ Rails.application.routes.draw do delete '/:application', to: 'clusters/applications#destroy', as: :uninstall_applications end + get :metrics_dashboard + get :'/prometheus/api/v1/*proxy_path', to: 'clusters#prometheus_proxy', as: :prometheus_api get :cluster_status, format: :json delete :clear_cache end @@ -242,6 +248,8 @@ Rails.application.routes.draw do post :preview_markdown end + draw :group + resources :projects, only: [:index, :new, :create] get '/projects/:id' => 'projects#resolve' @@ -258,10 +266,17 @@ Rails.application.routes.draw do draw :admin draw :profile draw :dashboard - draw :group draw :user draw :project + # Serve snippet routes under /-/snippets. + # To ensure an old unscoped routing is used for the UI we need to + # add prefix 'as' to the scope routing and place it below original routing. + # Issue https://gitlab.com/gitlab-org/gitlab/-/issues/210024 + scope '-', as: :scoped do + draw :snippets + end + root to: "root#index" get '*unmatched_route', to: 'application#route_not_found' |