|
|
|
resources :projects, only: [:index, :new, :create]
|
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
Gitlab.ee do
|
|
|
|
scope "/-/push_from_secondary/:geo_node_id" do
|
|
|
|
draw :git_http
|
|
|
|
end
|
|
|
|
end
|
|
|
|
resources :projects, only: [:index, :new, :create]
|
|
|
|
|
|
|
|
draw :git_http
|
|
|
|
|
| ... | ... | @@ -87,22 +83,12 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do |
|
|
|
resource :operations, only: [:show, :update]
|
|
|
|
resource :integrations, only: [:show]
|
|
|
|
|
|
|
|
Gitlab.ee do
|
|
|
|
resource :slack, only: [:destroy, :edit, :update] do
|
|
|
|
get :slack_auth
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
resource :repository, only: [:show], controller: :repository do
|
|
|
|
post :create_deploy_token, path: 'deploy_token/create'
|
|
|
|
post :cleanup
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
Gitlab.ee do
|
|
|
|
resources :feature_flags
|
|
|
|
end
|
|
|
|
|
|
|
|
resources :autocomplete_sources, only: [] do
|
|
|
|
collection do
|
|
|
|
get 'members'
|
| ... | ... | @@ -268,16 +254,6 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do |
|
|
|
namespace :prometheus do
|
|
|
|
resources :metrics, constraints: { id: %r{[^\/]+} }, only: [:index, :new, :create, :edit, :update, :destroy] do
|
|
|
|
get :active_common, on: :collection
|
|
|
|
|
|
|
|
Gitlab.ee do
|
|
|
|
post :validate_query, on: :collection
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
Gitlab.ee do
|
|
|
|
resources :alerts, constraints: { id: /\d+/ }, only: [:index, :create, :show, :update, :destroy] do
|
|
|
|
post :notify, on: :collection
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
| ... | ... | @@ -290,15 +266,6 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do |
|
|
|
get :pipeline_status
|
|
|
|
get :ci_environments_status
|
|
|
|
post :toggle_subscription
|
|
|
|
|
|
|
|
Gitlab.ee do
|
|
|
|
get :approvals
|
|
|
|
post :approvals, action: :approve
|
|
|
|
delete :approvals, action: :unapprove
|
|
|
|
|
|
|
|
post :rebase
|
|
|
|
end
|
|
|
|
|
|
|
|
post :remove_wip
|
|
|
|
post :assign_related_issues
|
|
|
|
get :discussions, format: :json
|
| ... | ... | @@ -336,21 +303,6 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do |
|
|
|
post :bulk_update
|
|
|
|
end
|
|
|
|
|
|
|
|
Gitlab.ee do
|
|
|
|
resources :approvers, only: :destroy
|
|
|
|
delete 'approvers', to: 'approvers#destroy_via_user_id', as: :approver_via_user_id
|
|
|
|
resources :approver_groups, only: :destroy
|
|
|
|
|
|
|
|
scope module: :merge_requests do
|
|
|
|
resources :drafts, only: [:index, :update, :create, :destroy] do
|
|
|
|
collection do
|
|
|
|
post :publish
|
|
|
|
delete :discard
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
resources :discussions, only: [:show], constraints: { id: /\h{40}/ } do
|
|
|
|
member do
|
|
|
|
post :resolve
|
| ... | ... | @@ -381,21 +333,6 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do |
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
Gitlab.ee do
|
|
|
|
resources :path_locks, only: [:index, :destroy] do
|
|
|
|
collection do
|
|
|
|
post :toggle
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
get '/service_desk' => 'service_desk#show', as: :service_desk
|
|
|
|
put '/service_desk' => 'service_desk#update', as: :service_desk_refresh
|
|
|
|
end
|
|
|
|
|
|
|
|
Gitlab.ee do
|
|
|
|
resources :push_rules, constraints: { id: /\d+/ }, only: [:update]
|
|
|
|
end
|
|
|
|
|
|
|
|
resources :pipelines, only: [:index, :new, :create, :show] do
|
|
|
|
collection do
|
|
|
|
resource :pipelines_settings, path: 'settings', only: [:show, :update]
|
| ... | ... | @@ -414,11 +351,6 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do |
|
|
|
get :failures
|
|
|
|
get :status
|
|
|
|
get :test_report
|
|
|
|
|
|
|
|
Gitlab.ee do
|
|
|
|
get :security
|
|
|
|
get :licenses
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
member do
|
| ... | ... | @@ -447,21 +379,12 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do |
|
|
|
get '/terminal.ws/authorize', to: 'environments#terminal_websocket_authorize', constraints: { format: nil }
|
|
|
|
|
|
|
|
get '/prometheus/api/v1/*proxy_path', to: 'environments/prometheus_api#proxy', as: :prometheus_api
|
|
|
|
|
|
|
|
Gitlab.ee do
|
|
|
|
get :logs
|
|
|
|
get '/pods/(:pod_name)/containers/(:container_name)/logs', to: 'environments#k8s_pod_logs', as: :k8s_pod_logs
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
collection do
|
|
|
|
get :metrics, action: :metrics_redirect
|
|
|
|
get :folder, path: 'folders/*id', constraints: { format: /(html|json)/ }
|
|
|
|
get :search
|
|
|
|
|
|
|
|
Gitlab.ee do
|
|
|
|
get :logs, action: :logs_redirect
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
resources :deployments, only: [:index] do
|
| ... | ... | @@ -472,14 +395,6 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do |
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
Gitlab.ee do
|
|
|
|
resources :protected_environments, only: [:create, :update, :destroy], constraints: { id: /\d+/ } do
|
|
|
|
collection do
|
|
|
|
get 'search'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
namespace :serverless do
|
|
|
|
scope :functions do
|
|
|
|
get '/:environment_id/:id', to: 'functions#show'
|
| ... | ... | @@ -522,14 +437,6 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do |
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
Gitlab.ee do
|
|
|
|
namespace :security do
|
|
|
|
resource :dashboard, only: [:show], controller: :dashboard
|
|
|
|
end
|
|
|
|
|
|
|
|
resources :vulnerability_feedback, only: [:index, :create, :update, :destroy], constraints: { id: /\d+/ }
|
|
|
|
end
|
|
|
|
|
|
|
|
get :issues, to: 'issues#calendar', constraints: lambda { |req| req.format == :ics }
|
|
|
|
|
|
|
|
resources :issues, concerns: :awardable, constraints: { id: /\d+/ } do
|
| ... | ... | @@ -543,24 +450,11 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do |
|
|
|
get :realtime_changes
|
|
|
|
post :create_merge_request
|
|
|
|
get :discussions, format: :json
|
|
|
|
|
|
|
|
Gitlab.ee do
|
|
|
|
get 'designs(/*vueroute)', to: 'issues#designs', as: :designs, format: false
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
collection do
|
|
|
|
post :bulk_update
|
|
|
|
post :import_csv
|
|
|
|
|
|
|
|
Gitlab.ee do
|
|
|
|
post :export_csv
|
|
|
|
get :service_desk
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
Gitlab.ee do
|
|
|
|
resources :issue_links, only: [:index, :create, :destroy], as: 'links', path: 'links'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
| ... | ... | @@ -595,11 +489,6 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do |
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
Gitlab.ee do
|
|
|
|
resources :approvers, only: :destroy
|
|
|
|
resources :approver_groups, only: :destroy
|
|
|
|
end
|
|
|
|
|
|
|
|
resources :runner_projects, only: [:create, :destroy]
|
|
|
|
resources :badges, only: [:index] do
|
|
|
|
collection do
|
| ... | ... | @@ -614,10 +503,6 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do |
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
Gitlab.ee do
|
|
|
|
resources :audit_events, only: [:index]
|
|
|
|
end
|
|
|
|
|
|
|
|
resources :error_tracking, only: [:index], controller: :error_tracking do
|
|
|
|
collection do
|
|
|
|
get ':issue_id/details',
|
| ... | ... | @@ -639,9 +524,15 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do |
|
|
|
draw :wiki
|
|
|
|
draw :repository
|
|
|
|
|
|
|
|
Gitlab.ee do
|
|
|
|
resources :managed_licenses, only: [:index, :show, :new, :create, :edit, :update, :destroy]
|
|
|
|
end
|
|
|
|
# Legacy routes.
|
|
|
|
# Introduced in 12.0.
|
|
|
|
# Should be removed with https://gitlab.com/gitlab-org/gitlab/issues/28848.
|
|
|
|
Gitlab::Routing.redirect_legacy_paths(self, :settings, :branches, :tags,
|
|
|
|
:network, :graphs, :autocomplete_sources,
|
|
|
|
:project_members, :deploy_keys, :deploy_tokens,
|
|
|
|
:labels, :milestones, :services, :boards, :releases,
|
|
|
|
:forks, :group_links, :import, :avatar, :mirror,
|
|
|
|
:cycle_analytics, :mattermost, :variables, :triggers)
|
|
|
|
end
|
|
|
|
|
|
|
|
resources(:projects,
|
| ... | ... | @@ -666,23 +557,4 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do |
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
# Legacy routes.
|
|
|
|
# Introduced in 12.0.
|
|
|
|
# Should be removed with https://gitlab.com/gitlab-org/gitlab/issues/28848.
|
|
|
|
scope(path: '*namespace_id',
|
|
|
|
as: :namespace,
|
|
|
|
namespace_id: Gitlab::PathRegex.full_namespace_route_regex) do
|
|
|
|
scope(path: ':project_id',
|
|
|
|
constraints: { project_id: Gitlab::PathRegex.project_route_regex },
|
|
|
|
module: :projects,
|
|
|
|
as: :project) do
|
|
|
|
Gitlab::Routing.redirect_legacy_paths(self, :settings, :branches, :tags,
|
|
|
|
:network, :graphs, :autocomplete_sources,
|
|
|
|
:project_members, :deploy_keys, :deploy_tokens,
|
|
|
|
:labels, :milestones, :services, :boards, :releases,
|
|
|
|
:forks, :group_links, :import, :avatar, :mirror,
|
|
|
|
:cycle_analytics, :mattermost, :variables, :triggers)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end |