gitlab-org--gitlab-foss/config/routes/admin.rb
Lin Jen-Shin 70eb0c6a88 Merge remote-tracking branch 'upstream/master' into rename-builds-controller
* upstream/master: (307 commits)
  Address feedback
  Add small update for the i18n guide.
  update webpack to v2.6.1 patch release to fix "Can't find variable: Promise" error
  update webpack-bundle-analyzer past v2.4.1 to support NamedChunksPlugin
  name all webpack chunks to improve long term cacheability
  add NameAllModulesPlugin to cover shortcomings of NamedModulesPlugin
  upgrade to latest webpack version
  Only use DROP INDEX CONCURRENTLY on postgreql 9.2+
  Provide default for calculating label text color (!11681)
  Add failing test for #32728
  Bugfix: Always use the default language when generating emails.
  Remove unecessary commit pattern check
  Add regexp_for_value helper method
  Remove shared example and improve sub_group_issuables_spec.rb
  Remove 'should' from scenario in has_subgroup_title_spec.rb
  Cartfile git and binary methods cannot take a GitHub repo
  Fix terminals support for Kubernetes service
  Add review comments to compare_spec.rb
  Fix transient error clicking dropdown items in compare_spec.rb
  Use non-global jQuery reference within raven bundle
  ...
2017-05-26 18:25:32 +08:00

128 lines
3.1 KiB
Ruby

namespace :admin do
resources :users, constraints: { id: /[a-zA-Z.\/0-9_\-]+/ } do
resources :keys, only: [:show, :destroy]
resources :identities, except: [:show]
resources :impersonation_tokens, only: [:index, :create] do
member do
put :revoke
end
end
member do
get :projects
get :keys
put :block
put :unblock
put :unlock
put :confirm
post :impersonate
patch :disable_two_factor
delete 'remove/:email_id', action: 'remove_email', as: 'remove_email'
end
end
resource :impersonation, only: :destroy
resources :abuse_reports, only: [:index, :destroy]
resources :spam_logs, only: [:index, :destroy] do
member do
post :mark_as_ham
end
end
resources :applications
resources :groups, only: [:index, :new, :create]
scope(path: 'groups/*id',
controller: :groups,
constraints: { id: Gitlab::PathRegex.full_namespace_route_regex, format: /(html|json|atom)/ }) do
scope(as: :group) do
put :members_update
get :edit, action: :edit
get '/', action: :show
patch '/', action: :update
put '/', action: :update
delete '/', action: :destroy
end
end
resources :deploy_keys, only: [:index, :new, :create, :destroy]
resources :hooks, only: [:index, :create, :edit, :update, :destroy] do
member do
get :test
end
resources :hook_logs, only: [:show] do
member do
get :retry
end
end
end
resources :broadcast_messages, only: [:index, :edit, :create, :update, :destroy] do
post :preview, on: :collection
end
resource :logs, only: [:show]
resource :health_check, controller: 'health_check', only: [:show]
resource :background_jobs, controller: 'background_jobs', only: [:show]
resource :system_info, controller: 'system_info', only: [:show]
resources :requests_profiles, only: [:index, :show], param: :name, constraints: { name: /.+\.html/ }
resources :projects, only: [:index]
scope(path: 'projects/*namespace_id',
as: :namespace,
constraints: { namespace_id: Gitlab::PathRegex.full_namespace_route_regex }) do
resources(:projects,
path: '/',
constraints: { id: Gitlab::PathRegex.project_route_regex },
only: [:show]) do
member do
put :transfer
post :repository_check
end
resources :runner_projects, only: [:create, :destroy]
end
end
resource :appearances, only: [:show, :create, :update], path: 'appearance' do
member do
get :preview
delete :logo
delete :header_logos
end
end
resource :application_settings, only: [:show, :update] do
resources :services, only: [:index, :edit, :update]
get :usage_data
put :reset_runners_token
put :reset_health_check_token
put :clear_repository_check_states
end
resources :labels
resources :runners, only: [:index, :show, :update, :destroy] do
member do
get :resume
get :pause
end
end
resources :cohorts, only: :index
resources :jobs, only: :index do
collection do
post :cancel_all
end
end
root to: 'dashboard#index'
end