X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/6449106742aa47e1ec729e28e4b858e25dbeea4f..a5186eeef2d320d34d70d9f55c70a1e6679c29cf:/apps/workbench/app/controllers/actions_controller.rb diff --git a/apps/workbench/app/controllers/actions_controller.rb b/apps/workbench/app/controllers/actions_controller.rb index cae7f16fd9..d1dc0fca35 100644 --- a/apps/workbench/app/controllers/actions_controller.rb +++ b/apps/workbench/app/controllers/actions_controller.rb @@ -10,6 +10,19 @@ class ActionsController < ApplicationController ArvadosBase::resource_class_for_uuid(params[:uuid]) end + def show + @object = model_class.andand.find(params[:uuid]) + if @object.is_a? Link and + @object.link_class == 'name' and + ArvadosBase::resource_class_for_uuid(@object.head_uuid) == Collection + redirect_to collection_path(id: @object.uuid) + elsif @object + redirect_to @object + else + raise ActiveRecord::RecordNotFound + end + end + def post params.keys.collect(&:to_sym).each do |param| if @@exposed_actions[param] @@ -72,7 +85,6 @@ class ActionsController < ApplicationController def arv_normalize mt, *opts r = "" - puts "['arv-normalize', #{opts}]" IO.popen(['arv-normalize'] + opts, 'w+b') do |io| io.write mt io.close_write @@ -145,8 +157,7 @@ class ActionsController < ApplicationController IO.popen([env, 'arv-put', '--raw'], 'w+b') do |io| io.write normalized_stripped io.close_write - while buf = io.read(2**20) - + while buf = io.read(2**16) end end