diff --git a/changelogs/unreleased/dz-move-project-routes.yml b/changelogs/unreleased/dz-move-project-routes.yml new file mode 100644 index 0000000000000000000000000000000000000000..713f6d90f3207ffdf51fb2dfb68318d970122aee --- /dev/null +++ b/changelogs/unreleased/dz-move-project-routes.yml @@ -0,0 +1,5 @@ +--- +title: Move some project routes under - scope +merge_request: 19954 +author: +type: deprecated diff --git a/config/routes/project.rb b/config/routes/project.rb index dacc433784d945f18fe97b74a0579981d750106d..3f913683b0085cef7775f049d7b4a2826a82bce0 100644 --- a/config/routes/project.rb +++ b/config/routes/project.rb @@ -191,6 +191,31 @@ get 'proxy/:datasource_id/*proxy_path', to: 'grafana_api#proxy' get :metrics_dashboard, to: 'grafana_api#metrics_dashboard' end + + resource :mattermost, only: [:new, :create] + resource :variables, only: [:show, :update] + resources :triggers, only: [:index, :create, :edit, :update, :destroy] + + resource :mirror, only: [:show, :update] do + member do + get :ssh_host_keys, constraints: { format: :json } + post :update_now + end + end + + resource :cycle_analytics, only: [:show] + + namespace :cycle_analytics do + scope :events, controller: 'events' do + get :issue + get :plan + get :code + get :test + get :review + get :staging + get :production + end + end end # End of the /-/ scope. @@ -235,8 +260,6 @@ end end - resource :mattermost, only: [:new, :create] - namespace :prometheus do resources :metrics, constraints: { id: %r{[^\/]+} }, only: [:index, :new, :create, :edit, :update, :destroy] do get :active_common, on: :collection @@ -364,17 +387,6 @@ put '/service_desk' => 'service_desk#update', as: :service_desk_refresh end - resource :variables, only: [:show, :update] - - resources :triggers, only: [:index, :create, :edit, :update, :destroy] - - resource :mirror, only: [:show, :update] do - member do - get :ssh_host_keys, constraints: { format: :json } - post :update_now - end - end - Gitlab.ee do resources :push_rules, constraints: { id: /\d+/ }, only: [:update] end @@ -463,20 +475,6 @@ end end - resource :cycle_analytics, only: [:show] - - namespace :cycle_analytics do - scope :events, controller: 'events' do - get :issue - get :plan - get :code - get :test - get :review - get :staging - get :production - end - end - namespace :serverless do scope :functions do get '/:environment_id/:id', to: 'functions#show' @@ -678,7 +676,8 @@ :network, :graphs, :autocomplete_sources, :project_members, :deploy_keys, :deploy_tokens, :labels, :milestones, :services, :boards, :releases, - :forks, :group_links, :import, :avatar) + :forks, :group_links, :import, :avatar, :mirror, + :cycle_analytics, :mattermost, :variables, :triggers) end end end diff --git a/spec/javascripts/ci_variable_list/ajax_variable_list_spec.js b/spec/javascripts/ci_variable_list/ajax_variable_list_spec.js index b2fe315f6c62de670ecac79148362ca1b4ae5643..b53e30b68966be56fcfaeca5eb5d56742d66fc02 100644 --- a/spec/javascripts/ci_variable_list/ajax_variable_list_spec.js +++ b/spec/javascripts/ci_variable_list/ajax_variable_list_spec.js @@ -3,7 +3,7 @@ import MockAdapter from 'axios-mock-adapter'; import axios from '~/lib/utils/axios_utils'; import AjaxFormVariableList from '~/ci_variable_list/ajax_variable_list'; -const VARIABLE_PATCH_ENDPOINT = 'http://test.host/frontend-fixtures/builds-project/variables'; +const VARIABLE_PATCH_ENDPOINT = 'http://test.host/frontend-fixtures/builds-project/-/variables'; const HIDE_CLASS = 'hide'; describe('AjaxFormVariableList', () => {