3114: Fix href in json response for generic #create action too. See 7485476.
[arvados.git] / apps / workbench / config / routes.rb
1 ArvadosWorkbench::Application.routes.draw do
2   themes_for_rails
3
4   resources :keep_disks
5   resources :keep_services
6   resources :user_agreements do
7     post 'sign', on: :collection
8     get 'signatures', on: :collection
9   end
10   get '/user_agreements/signatures' => 'user_agreements#signatures'
11   get "users/setup_popup" => 'users#setup_popup', :as => :setup_user_popup
12   get "users/setup" => 'users#setup', :as => :setup_user
13   resources :nodes
14   resources :humans
15   resources :traits
16   resources :api_client_authorizations
17   resources :repositories
18   resources :virtual_machines
19   resources :authorized_keys
20   resources :job_tasks
21   resources :jobs do
22     post 'cancel', :on => :member
23   end
24   match '/logout' => 'sessions#destroy', via: [:get, :post]
25   get '/logged_out' => 'sessions#index'
26   resources :users do
27     get 'choose', :on => :collection
28     get 'home', :on => :member
29     get 'welcome', :on => :collection
30     get 'activity', :on => :collection
31     get 'storage', :on => :collection
32     post 'sudo', :on => :member
33     post 'unsetup', :on => :member
34     get 'setup_popup', :on => :member
35   end
36   get '/manage_account' => 'users#manage_account'
37   get "/add_ssh_key_popup" => 'users#add_ssh_key_popup', :as => :add_ssh_key_popup
38   get "/add_ssh_key" => 'users#add_ssh_key', :as => :add_ssh_key
39   resources :logs
40   resources :factory_jobs
41   resources :uploaded_datasets
42   resources :groups do
43     get 'choose', on: :collection
44   end
45   resources :specimens
46   resources :pipeline_templates do
47     get 'choose', on: :collection
48   end
49   resources :pipeline_instances do
50     get 'compare', on: :collection
51     post 'copy', on: :member
52   end
53   resources :links
54   get '/collections/graph' => 'collections#graph'
55   resources :collections do
56     post 'set_persistent', on: :member
57     get 'sharing_popup', :on => :member
58     post 'share', :on => :member
59     post 'unshare', :on => :member
60     get 'choose', on: :collection
61   end
62   get('/collections/download/:uuid/:reader_token/*file' => 'collections#show_file',
63       format: false)
64   get '/collections/download/:uuid/:reader_token' => 'collections#show_file_links'
65   get '/collections/:uuid/*file' => 'collections#show_file', :format => false
66   resources :projects do
67     match 'remove/:item_uuid', on: :member, via: :delete, action: :remove_item
68     match 'remove_items', on: :member, via: :delete, action: :remove_items
69     get 'move_items', on: :member, action: :move_items
70     get 'choose', on: :collection
71     post 'share_with', on: :member
72   end
73   resources :search do
74     get 'choose', :on => :collection
75   end
76
77   post 'actions' => 'actions#post'
78   get 'actions' => 'actions#show'
79   get 'websockets' => 'websocket#index'
80
81   root :to => 'projects#index'
82
83   # Send unroutable requests to an arbitrary controller
84   # (ends up at ApplicationController#render_not_found)
85   match '*a', to: 'links#render_not_found', via: [:get, :post]
86 end