1 # Copyright (C) The Arvados Authors. All rights reserved.
3 # SPDX-License-Identifier: AGPL-3.0
5 Rails.application.routes.draw do
9 resources :keep_services
10 resources :user_agreements do
11 post 'sign', on: :collection
12 get 'signatures', on: :collection
14 get '/user_agreements/signatures' => 'user_agreements#signatures'
15 get "users/setup_popup" => 'users#setup_popup', :as => :setup_user_popup
16 get "users/setup" => 'users#setup', :as => :setup_user
17 get "report_issue_popup" => 'actions#report_issue_popup', :as => :report_issue_popup
18 post "report_issue" => 'actions#report_issue', :as => :report_issue
19 get "star" => 'actions#star', :as => :star
20 get "all_processes" => 'work_units#index', :as => :all_processes
21 get "choose_work_unit_templates" => 'work_unit_templates#choose', :as => :choose_work_unit_templates
22 resources :work_units do
23 post 'show_child_component', :on => :member
28 resources :api_client_authorizations
29 resources :virtual_machines
31 resources :container_requests do
32 post 'cancel', :on => :member
33 post 'copy', on: :member
35 get '/virtual_machines/:id/webshell/:login' => 'virtual_machines#webshell', :as => :webshell_virtual_machine
36 resources :authorized_keys
39 post 'cancel', :on => :member
40 get 'logs', :on => :member
42 resources :repositories do
43 post 'share_with', on: :member
45 # {format: false} prevents rails from treating "foo.png" as foo?format=png
46 get '/repositories/:id/tree/:commit' => 'repositories#show_tree'
47 get '/repositories/:id/tree/:commit/*path' => 'repositories#show_tree', as: :show_repository_tree, format: false
48 get '/repositories/:id/blob/:commit/*path' => 'repositories#show_blob', as: :show_repository_blob, format: false
49 get '/repositories/:id/commit/:commit' => 'repositories#show_commit', as: :show_repository_commit
51 match '/logout' => 'sessions#destroy', via: [:get, :post]
52 get '/logged_out' => 'sessions#logged_out'
54 get 'choose', :on => :collection
55 get 'home', :on => :member
56 get 'welcome', :on => :collection
57 get 'inactive', :on => :collection
58 get 'activity', :on => :collection
59 get 'storage', :on => :collection
60 post 'sudo', :on => :member
61 post 'unsetup', :on => :member
62 get 'setup_popup', :on => :member
63 get 'profile', :on => :member
64 post 'request_shell_access', :on => :member
65 get 'virtual_machines', :on => :member
66 get 'repositories', :on => :member
67 get 'ssh_keys', :on => :member
68 get 'link_account', :on => :collection
69 post 'link_account', :on => :collection, :action => :merge
71 get '/current_token' => 'users#current_token'
72 get "/add_ssh_key_popup" => 'users#add_ssh_key_popup', :as => :add_ssh_key_popup
73 get "/add_ssh_key" => 'users#add_ssh_key', :as => :add_ssh_key
75 resources :factory_jobs
76 resources :uploaded_datasets
78 get 'choose', on: :collection
81 resources :pipeline_templates do
82 get 'choose', on: :collection
84 resources :pipeline_instances do
85 post 'cancel', :on => :member
86 get 'compare', on: :collection
87 post 'copy', on: :member
90 get '/collections/graph' => 'collections#graph'
91 resources :collections do
92 post 'set_persistent', on: :member
93 get 'sharing_popup', :on => :member
94 post 'share', :on => :member
95 post 'unshare', :on => :member
96 get 'choose', on: :collection
97 post 'remove_selected_files', on: :member
98 get 'tags', on: :member
99 post 'save_tags', on: :member
100 get 'multisite', on: :collection, to: redirect('/search')
102 get('/collections/download/:uuid/:reader_token/*file' => 'collections#show_file',
104 get '/collections/download/:uuid/:reader_token' => 'collections#show_file_links'
105 get '/collections/:uuid/*file' => 'collections#show_file', :format => false
106 resources :projects do
107 match 'remove/:item_uuid', on: :member, via: :delete, action: :remove_item
108 match 'remove_items', on: :member, via: :delete, action: :remove_items
109 get 'choose', on: :collection
110 post 'share_with', on: :member
111 get 'tab_counts', on: :member
112 get 'public', on: :collection
116 get 'choose', :on => :collection
121 get "trash" => 'trash_items#index', :as => :trash
122 resources :trash_items do
123 post 'untrash_items', on: :collection
126 post 'actions' => 'actions#post'
127 get 'actions' => 'actions#show'
128 get 'websockets' => 'websocket#index'
129 post "combine_selected" => 'actions#combine_selected_files_into_collection'
131 root :to => 'projects#index'
133 match '/_health/ping', to: 'healthcheck#ping', via: [:get]
135 get '/tests/mithril', to: 'tests#mithril'
137 get '/status', to: 'status#status'
139 # Send unroutable requests to an arbitrary controller
140 # (ends up at ApplicationController#render_not_found)
141 match '*a', to: 'links#render_not_found', via: [:get, :post]