debian-mirror-gitlab/config/routes/admin.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

198 lines
4.9 KiB
Ruby
Raw Normal View History

2021-03-11 19:13:27 +05:30
# frozen_string_literal: true
2016-11-03 12:29:30 +05:30
namespace :admin do
2018-03-17 18:26:18 +05:30
resources :users, constraints: { id: %r{[a-zA-Z./0-9_\-]+} } do
2016-11-03 12:29:30 +05:30
resources :keys, only: [:show, :destroy]
resources :identities, except: [:show]
2017-08-17 22:00:37 +05:30
resources :impersonation_tokens, only: [:index, :create] do
member do
put :revoke
end
end
2016-11-03 12:29:30 +05:30
member do
get :projects
get :keys
put :block
put :unblock
2021-06-08 01:23:25 +05:30
put :ban
put :unban
2019-12-21 20:55:43 +05:30
put :deactivate
put :activate
2016-11-03 12:29:30 +05:30
put :unlock
put :confirm
2021-01-03 14:25:43 +05:30
put :approve
2021-02-22 17:27:13 +05:30
delete :reject
2016-11-03 12:29:30 +05:30
post :impersonate
patch :disable_two_factor
delete 'remove/:email_id', action: 'remove_email', as: 'remove_email'
end
end
2019-12-21 20:55:43 +05:30
resource :session, only: [:new, :create] do
2020-03-13 15:44:24 +05:30
post 'destroy', action: :destroy, as: :destroy
2019-12-21 20:55:43 +05:30
end
2016-11-03 12:29:30 +05:30
resource :impersonation, only: :destroy
resources :abuse_reports, only: [:index, :destroy]
2018-03-17 18:26:18 +05:30
resources :gitaly_servers, only: [:index]
2016-11-03 12:29:30 +05:30
resources :spam_logs, only: [:index, :destroy] do
member do
post :mark_as_ham
end
end
resources :applications
2017-08-17 22:00:37 +05:30
resources :groups, only: [:index, :new, :create]
scope(path: 'groups/*id',
controller: :groups,
2017-09-10 17:25:29 +05:30
constraints: { id: Gitlab::PathRegex.full_namespace_route_regex, format: /(html|json|atom)/ }) do
2017-08-17 22:00:37 +05:30
scope(as: :group) do
2016-11-03 12:29:30 +05:30
put :members_update
2017-08-17 22:00:37 +05:30
get :edit, action: :edit
get '/', action: :show
patch '/', action: :update
put '/', action: :update
delete '/', action: :destroy
2016-11-03 12:29:30 +05:30
end
end
2022-08-13 15:12:31 +05:30
resources :topics, only: [:index, :new, :create, :edit, :update, :destroy] do
2021-11-18 22:05:49 +05:30
resource :avatar, controller: 'topics/avatars', only: [:destroy]
collection do
post :preview_markdown
2022-08-27 11:52:29 +05:30
post :merge
2021-11-18 22:05:49 +05:30
end
end
2017-09-10 17:25:29 +05:30
resources :deploy_keys, only: [:index, :new, :create, :edit, :update, :destroy]
2016-11-03 12:29:30 +05:30
2017-08-17 22:00:37 +05:30
resources :hooks, only: [:index, :create, :edit, :update, :destroy] do
member do
2018-10-15 14:42:47 +05:30
post :test
2017-08-17 22:00:37 +05:30
end
2017-09-10 17:25:29 +05:30
resources :hook_logs, only: [:show] do
member do
2018-11-08 19:23:39 +05:30
post :retry
2017-09-10 17:25:29 +05:30
end
end
2016-11-03 12:29:30 +05:30
end
resources :broadcast_messages, only: [:index, :edit, :create, :update, :destroy] do
post :preview, on: :collection
end
2021-01-03 14:25:43 +05:30
get :instance_review, to: 'instance_review#index'
2022-07-16 23:28:13 +05:30
resources :background_migrations, only: [:index, :show] do
resources :batched_jobs, only: [:show]
2021-09-30 23:02:18 +05:30
member do
post :pause
post :resume
2021-11-11 11:23:49 +05:30
post :retry
2021-09-30 23:02:18 +05:30
end
end
2018-12-13 13:39:08 +05:30
resource :health_check, controller: 'health_check', only: [:show]
2016-11-03 12:29:30 +05:30
resource :background_jobs, controller: 'background_jobs', only: [:show]
2018-12-13 13:39:08 +05:30
2016-11-03 12:29:30 +05:30
resource :system_info, controller: 'system_info', only: [:show]
2017-08-17 22:00:37 +05:30
resources :projects, only: [:index]
2016-11-03 12:29:30 +05:30
2021-04-17 20:07:23 +05:30
resources :usage_trends, only: :index
2022-06-21 17:19:12 +05:30
resource :dev_ops_reports, controller: 'dev_ops_report', only: :show
get 'dev_ops_report', to: redirect('admin/dev_ops_reports')
2020-11-24 15:15:51 +05:30
resources :cohorts, only: :index
2017-08-17 22:00:37 +05:30
scope(path: 'projects/*namespace_id',
as: :namespace,
2017-09-10 17:25:29 +05:30
constraints: { namespace_id: Gitlab::PathRegex.full_namespace_route_regex }) do
2016-11-03 12:29:30 +05:30
resources(:projects,
path: '/',
2017-09-10 17:25:29 +05:30
constraints: { id: Gitlab::PathRegex.project_route_regex },
2019-09-04 21:01:54 +05:30
only: [:show, :destroy]) do
2016-11-03 12:29:30 +05:30
member do
put :transfer
post :repository_check
end
resources :runner_projects, only: [:create, :destroy]
end
end
2020-03-13 15:44:24 +05:30
resource :application_settings, only: :update do
2020-04-22 19:07:51 +05:30
resources :integrations, only: [:edit, :update] do
2020-04-08 14:13:33 +05:30
member do
2021-10-27 15:23:28 +05:30
get :overrides
2020-04-08 14:13:33 +05:30
put :test
2021-02-22 17:27:13 +05:30
post :reset
2020-04-08 14:13:33 +05:30
end
end
2018-12-13 13:39:08 +05:30
2017-08-17 22:00:37 +05:30
get :usage_data
2018-12-05 23:21:45 +05:30
put :reset_registration_token
2016-11-03 12:29:30 +05:30
put :reset_health_check_token
2022-08-13 15:12:31 +05:30
put :reset_error_tracking_access_token
2016-11-03 12:29:30 +05:30
put :clear_repository_check_states
2019-12-21 20:55:43 +05:30
match :general, :integrations, :repository, :ci_cd, :reporting, :metrics_and_profiling, :network, :preferences, via: [:get, :patch]
2019-09-04 21:01:54 +05:30
get :lets_encrypt_terms_of_service
2020-03-13 15:44:24 +05:30
post :create_self_monitoring_project
get :status_create_self_monitoring_project
delete :delete_self_monitoring_project
get :status_delete_self_monitoring_project
2021-09-04 01:27:46 +05:30
2022-04-04 11:22:00 +05:30
get :service_usage_data
2021-09-04 01:27:46 +05:30
resource :appearances, only: [:show, :create, :update], path: 'appearance', module: 'application_settings' do
member do
get :preview_sign_in
delete :logo
delete :header_logos
delete :favicon
end
end
2016-11-03 12:29:30 +05:30
end
2020-11-24 15:15:51 +05:30
resources :plan_limits, only: :create
2016-11-03 12:29:30 +05:30
resources :labels
2022-03-02 08:16:31 +05:30
resources :runners, only: [:index, :show, :edit, :update, :destroy] do
2016-11-03 12:29:30 +05:30
member do
2020-11-05 12:06:23 +05:30
post :resume
post :pause
2016-11-03 12:29:30 +05:30
end
2019-07-07 11:18:12 +05:30
collection do
get :tag_list, format: :json
2021-01-03 14:25:43 +05:30
get :runner_setup_scripts, format: :json
2019-07-07 11:18:12 +05:30
end
2016-11-03 12:29:30 +05:30
end
2017-09-10 17:25:29 +05:30
resources :jobs, only: :index do
2016-11-03 12:29:30 +05:30
collection do
post :cancel_all
end
end
2020-05-24 23:13:21 +05:30
namespace :ci do
resource :variables, only: [:show, :update]
end
2019-07-31 22:56:46 +05:30
concerns :clusterable
2020-04-22 19:07:51 +05:30
get '/dashboard/stats', to: 'dashboard#stats'
2016-11-03 12:29:30 +05:30
root to: 'dashboard#index'
2022-01-26 12:08:38 +05:30
get :version_check, to: 'version_check#version_check'
2016-11-03 12:29:30 +05:30
end