summaryrefslogtreecommitdiff
path: root/report/report_application.rb
diff options
context:
space:
mode:
authormguetlein <martin.guetlein@gmail.com>2011-01-19 16:12:21 +0100
committermguetlein <martin.guetlein@gmail.com>2011-01-19 16:12:21 +0100
commit7b06ce45180a5b2c0dd0095cd1a60ec974b46aa5 (patch)
tree39d34044b9879d1bd22df1cc9005fcbe6a0afb00 /report/report_application.rb
parentbba009c7c59655392236e1cdaf873117bb59600f (diff)
aa suport, rdf support
Diffstat (limited to 'report/report_application.rb')
-rwxr-xr-xreport/report_application.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/report/report_application.rb b/report/report_application.rb
index 6d6353f..b02b780 100755
--- a/report/report_application.rb
+++ b/report/report_application.rb
@@ -46,7 +46,7 @@ get '/report/?' do
case request.env['HTTP_ACCEPT'].to_s
when /text\/html/
related_links =
- "All validations: "+$sinatra.url_for("/",:full)
+ "All validations: "+url_for("/",:full)
description =
"A list of all report types."
content_type "text/html"
@@ -63,9 +63,9 @@ get '/report/:report_type' do
case request.env['HTTP_ACCEPT'].to_s
when /text\/html/
related_links =
- "Available report types: "+$sinatra.url_for("/report",:full)+"\n"+
- "Single validations: "+$sinatra.url_for("/",:full)+"\n"+
- "Crossvalidations: "+$sinatra.url_for("/crossvalidation",:full)
+ "Available report types: "+url_for("/report",:full)+"\n"+
+ "Single validations: "+url_for("/",:full)+"\n"+
+ "Crossvalidations: "+url_for("/crossvalidation",:full)
description =
"A list of all "+params[:report_type]+" reports. To create a report, use the POST method."
post_params = [[:validation_uris]]
@@ -118,14 +118,14 @@ end
delete '/report/:type/:id' do
perform do |rs|
content_type "text/plain"
- rs.delete_report(params[:type],params[:id])
+ rs.delete_report(params[:type],params[:id],@subjectid)
end
end
post '/report/:type' do
task = OpenTox::Task.create("Create report",url_for("/report/"+params[:type], :full)) do |task| #,params
perform do |rs|
- rs.create_report(params[:type],params[:validation_uris]?params[:validation_uris].split(/\n|,/):nil,task)
+ rs.create_report(params[:type],params[:validation_uris]?params[:validation_uris].split(/\n|,/):nil,@subjectid,task)
end
end
content_type "text/uri-list"