diff options
Diffstat (limited to 'config')
-rw-r--r-- | config/routes.rb | 1 | ||||
-rw-r--r-- | config/routes/project.rb | 16 |
2 files changed, 8 insertions, 9 deletions
diff --git a/config/routes.rb b/config/routes.rb index 7e2f1f0027a..bdc6a3930d1 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -67,7 +67,6 @@ InitializerConnections.raise_if_new_database_connection do Gitlab.ee do resource :company, only: [:new, :create], controller: 'company' resources :groups, only: [:new, :create] - draw :verification end end diff --git a/config/routes/project.rb b/config/routes/project.rb index 250371d1257..199c9c99b74 100644 --- a/config/routes/project.rb +++ b/config/routes/project.rb @@ -525,20 +525,20 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do end namespace :prometheus do - resources :alerts, constraints: { id: /\d+/ }, only: [] do # rubocop: disable Cop/PutProjectRoutesUnderScope - post :notify, on: :collection # rubocop:todo Cop/PutProjectRoutesUnderScope - member do - get :metrics_dashboard # rubocop:todo Cop/PutProjectRoutesUnderScope - end - end - resources :metrics, constraints: { id: %r{[^\/]+} }, only: [:index, :new, :create, :edit, :update, :destroy] do # rubocop: disable Cop/PutProjectRoutesUnderScope get :active_common, on: :collection # rubocop:todo Cop/PutProjectRoutesUnderScope post :validate_query, on: :collection # rubocop:todo Cop/PutProjectRoutesUnderScope end end - post 'alerts/notify', to: 'alerting/notifications#create' # rubocop:todo Cop/PutProjectRoutesUnderScope + scope :prometheus, as: :prometheus do + resources :alerts, constraints: { id: /\d+/ }, only: [] do # rubocop: disable Cop/PutProjectRoutesUnderScope + post :notify, on: :collection, to: 'alerting/notifications#create', defaults: { endpoint_identifier: 'legacy-prometheus' } # rubocop: disable Cop/PutProjectRoutesUnderScope + get :metrics_dashboard, on: :member # rubocop:todo Cop/PutProjectRoutesUnderScope + end + end + + post 'alerts/notify', to: 'alerting/notifications#create', defaults: { endpoint_identifier: 'legacy' } # rubocop:todo Cop/PutProjectRoutesUnderScope post 'alerts/notify/:name/:endpoint_identifier', # rubocop:todo Cop/PutProjectRoutesUnderScope to: 'alerting/notifications#create', as: :alert_http_integration, |