admin.rb 2.43 KB
Newer Older
1 2 3
# frozen_string_literal: true

namespace :admin do
4
  resources :users, only: [], constraints: { id: %r{[a-zA-Z./0-9_\-]+} } do
5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
    member do
      post :reset_runners_minutes
    end
  end

  scope(path: 'groups/*id',
        controller: :groups,
        constraints: { id: Gitlab::PathRegex.full_namespace_route_regex, format: /(html|json|atom)/ }) do
    scope(as: :group) do
      post :reset_runners_minutes
    end
  end

  resource :push_rule, only: [:show, :update]
  resource :email, only: [:show, :create]
  resources :audit_logs, controller: 'audit_logs', only: [:index]
21
  resources :audit_log_reports, only: [:index], constraints: { format: :csv }
22
  resources :credentials, only: [:index, :destroy] do
23 24 25 26
    member do
      put :revoke
    end
  end
27
  resources :user_permission_exports, controller: 'user_permission_exports', only: [:index]
28 29 30

  resource :license, only: [:show, :new, :create, :destroy] do
    get :download, on: :member
31
    post :sync_seat_link, on: :collection
32 33

    resource :usage_export, controller: 'licenses/usage_exports', only: [:show]
34 35
  end

36
  resource :subscription, only: [:show]
Jake Burden's avatar
Jake Burden committed
37

38 39
  # using `only: []` to keep duplicate routes from being created
  resource :application_settings, only: [] do
40
    get :seat_link_payload
41
    match :templates, :advanced_search, via: [:get, :patch]
42
    get :geo, to: "geo/settings#show"
43 44
  end

45
  namespace :geo do
46 47
    get '/' => 'nodes#index'

Zack Cuddy's avatar
Zack Cuddy committed
48 49 50 51 52
    # Old Routes Replaced in 13.0
    get '/projects', to: redirect(path: 'admin/geo/replication/projects')
    get '/uploads', to: redirect(path: 'admin/geo/replication/uploads')
    get '/designs', to: redirect(path: 'admin/geo/replication/designs')

53 54
    resources :nodes, only: [:index, :create, :new, :edit, :update]

Zack Cuddy's avatar
Zack Cuddy committed
55 56
    scope '/replication' do
      get '/', to: redirect(path: 'admin/geo/replication/projects')
Gabriel Mazetto's avatar
Gabriel Mazetto committed
57

Zack Cuddy's avatar
Zack Cuddy committed
58 59 60 61 62 63 64 65 66 67 68
      resources :projects, only: [:index, :destroy] do
        member do
          post :reverify
          post :resync
          post :force_redownload
        end

        collection do
          post :reverify_all
          post :resync_all
        end
Gabriel Mazetto's avatar
Gabriel Mazetto committed
69
      end
70

Zack Cuddy's avatar
Zack Cuddy committed
71
      resources :designs, only: [:index]
72

Zack Cuddy's avatar
Zack Cuddy committed
73
      resources :uploads, only: [:index, :destroy]
74 75

      get '/:replicable_name_plural', to: 'replicables#index', as: 'replicables'
Zack Cuddy's avatar
Zack Cuddy committed
76
    end
77

Zack Cuddy's avatar
Zack Cuddy committed
78
    resource :settings, only: [:show, :update]
79 80
  end

81 82
  namespace :elasticsearch do
    post :enqueue_index
83
    post :trigger_reindexing
84
    post :cancel_index_deletion
85
    post :retry_migration
86
  end
87
end