Merge branch 'master' into 14930-arvput-trash-at
[arvados.git] / apps / workbench / config / routes.rb
index 2e152c705f8983c2834c67efebf89a27d4426858..718adfd2ed0583a99f8eebb221b5eae0c7d012c3 100644 (file)
@@ -1,3 +1,7 @@
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: AGPL-3.0
+
 ArvadosWorkbench::Application.routes.draw do
   themes_for_rails
 
@@ -12,12 +16,23 @@ ArvadosWorkbench::Application.routes.draw do
   get "users/setup" => 'users#setup', :as => :setup_user
   get "report_issue_popup" => 'actions#report_issue_popup', :as => :report_issue_popup
   post "report_issue" => 'actions#report_issue', :as => :report_issue
-  get "getting_started_popup" => 'actions#getting_started_popup', :as => :getting_started_popup
+  get "star" => 'actions#star', :as => :star
+  get "all_processes" => 'work_units#index', :as => :all_processes
+  get "choose_work_unit_templates" => 'work_unit_templates#choose', :as => :choose_work_unit_templates
+  resources :work_units do
+    post 'show_child_component', :on => :member
+  end
   resources :nodes
   resources :humans
   resources :traits
   resources :api_client_authorizations
   resources :virtual_machines
+  resources :containers
+  resources :container_requests do
+    post 'cancel', :on => :member
+    post 'copy', on: :member
+  end
+  get '/virtual_machines/:id/webshell/:login' => 'virtual_machines#webshell', :as => :webshell_virtual_machine
   resources :authorized_keys
   resources :job_tasks
   resources :jobs do
@@ -27,8 +42,14 @@ ArvadosWorkbench::Application.routes.draw do
   resources :repositories do
     post 'share_with', on: :member
   end
+  # {format: false} prevents rails from treating "foo.png" as foo?format=png
+  get '/repositories/:id/tree/:commit' => 'repositories#show_tree'
+  get '/repositories/:id/tree/:commit/*path' => 'repositories#show_tree', as: :show_repository_tree, format: false
+  get '/repositories/:id/blob/:commit/*path' => 'repositories#show_blob', as: :show_repository_blob, format: false
+  get '/repositories/:id/commit/:commit' => 'repositories#show_commit', as: :show_repository_commit
+  resources :sessions
   match '/logout' => 'sessions#destroy', via: [:get, :post]
-  get '/logged_out' => 'sessions#index'
+  get '/logged_out' => 'sessions#logged_out'
   resources :users do
     get 'choose', :on => :collection
     get 'home', :on => :member
@@ -41,8 +62,13 @@ ArvadosWorkbench::Application.routes.draw do
     get 'setup_popup', :on => :member
     get 'profile', :on => :member
     post 'request_shell_access', :on => :member
+    get 'virtual_machines', :on => :member
+    get 'repositories', :on => :member
+    get 'ssh_keys', :on => :member
+    get 'link_account', :on => :collection
+    post 'link_account', :on => :collection, :action => :merge
   end
-  get '/manage_account' => 'users#manage_account'
+  get '/current_token' => 'users#current_token'
   get "/add_ssh_key_popup" => 'users#add_ssh_key_popup', :as => :add_ssh_key_popup
   get "/add_ssh_key" => 'users#add_ssh_key', :as => :add_ssh_key
   resources :logs
@@ -56,6 +82,7 @@ ArvadosWorkbench::Application.routes.draw do
     get 'choose', on: :collection
   end
   resources :pipeline_instances do
+    post 'cancel', :on => :member
     get 'compare', on: :collection
     post 'copy', on: :member
   end
@@ -67,6 +94,10 @@ ArvadosWorkbench::Application.routes.draw do
     post 'share', :on => :member
     post 'unshare', :on => :member
     get 'choose', on: :collection
+    post 'remove_selected_files', on: :member
+    get 'tags', on: :member
+    post 'save_tags', on: :member
+    get 'multisite', on: :collection, to: redirect('/search')
   end
   get('/collections/download/:uuid/:reader_token/*file' => 'collections#show_file',
       format: false)
@@ -78,11 +109,20 @@ ArvadosWorkbench::Application.routes.draw do
     get 'choose', on: :collection
     post 'share_with', on: :member
     get 'tab_counts', on: :member
+    get 'public', on: :collection
   end
+
   resources :search do
     get 'choose', :on => :collection
   end
 
+  resources :workflows
+
+  get "trash" => 'trash_items#index', :as => :trash
+  resources :trash_items do
+    post 'untrash_items', on: :collection
+  end
+
   post 'actions' => 'actions#post'
   get 'actions' => 'actions#show'
   get 'websockets' => 'websocket#index'
@@ -90,6 +130,12 @@ ArvadosWorkbench::Application.routes.draw do
 
   root :to => 'projects#index'
 
+  match '/_health/ping', to: 'healthcheck#ping', via: [:get]
+
+  get '/tests/mithril', to: 'tests#mithril'
+
+  get '/status', to: 'status#status'
+
   # Send unroutable requests to an arbitrary controller
   # (ends up at ApplicationController#render_not_found)
   match '*a', to: 'links#render_not_found', via: [:get, :post]