diff options
author | mguetlein <martin.guetlein@gmail.com> | 2010-11-26 16:05:25 +0100 |
---|---|---|
committer | mguetlein <martin.guetlein@gmail.com> | 2010-11-26 16:05:25 +0100 |
commit | 16a25a63ba7882901a778745d0a32baaafc22cad (patch) | |
tree | 9bf89ee176575aa49da36a4bc57e8c09a75fad4a /report/report_application.rb | |
parent | a6d79dffc5f65300f06f3a33451ef26d0fb96f08 (diff) |
huge commit, main changes: validation_type and .finished introduced, supporting subtasks, reporting slightly refactored
Diffstat (limited to 'report/report_application.rb')
-rw-r--r-- | report/report_application.rb | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/report/report_application.rb b/report/report_application.rb index baa91a0..f6b810c 100644 --- a/report/report_application.rb +++ b/report/report_application.rb @@ -80,15 +80,9 @@ end post '/report/:type/:id/format_html' do - task_uri = OpenTox::Task.as_task("Format report",url_for("/report/"+params[:type]+"/format_html", :full), params) do - perform do |rs| - rs.get_report(params[:type],params[:id],"text/html",true,params) - content_type "text/uri-list" - rs.get_uri(params[:type],params[:id])+"\n" - end - end + rs.get_report(params[:type],params[:id],"text/html",true,params) content_type "text/uri-list" - halt 202,task_uri+"\n" + rs.get_uri(params[:type],params[:id])+"\n" end @@ -128,9 +122,9 @@ delete '/report/:type/:id' do end post '/report/:type' do - task_uri = OpenTox::Task.as_task("Create report",url_for("/report/"+params[:type], :full), params) do + task_uri = OpenTox::Task.as_task("Create report",url_for("/report/"+params[:type], :full), params) do |task| perform do |rs| - rs.create_report(params[:type],params[:validation_uris]?params[:validation_uris].split(/\n|,/):nil) + rs.create_report(params[:type],params[:validation_uris]?params[:validation_uris].split(/\n|,/):nil,task) end end content_type "text/uri-list" |