Remove last cheetah templates (dataset errors and validation). Fix errors template to use correct form styles. Resolves #18

This commit is contained in:
James Taylor
2009-08-05 11:02:53 -04:00
parent dfa704a313
commit 641b008790
4 changed files with 48 additions and 89 deletions
+1 -1
View File
@@ -44,7 +44,7 @@ class DatasetInterface( BaseController ):
@web.expose
def errors( self, trans, id ):
dataset = model.HistoryDatasetAssociation.get( id )
return trans.fill_template( "dataset/errors.tmpl", dataset=dataset )
return trans.fill_template( "dataset/errors.mako", dataset=dataset )
@web.expose
def stderr( self, trans, id ):
+23 -23
View File
@@ -547,29 +547,29 @@ class RootController( BaseController ):
# return trans.fill_template( "/root/masthead.mako", brand=brand, wiki_url=wiki_url,
# blog_url=blog_url,bugs_email=bugs_email, screencasts_url=screencasts_url, admin_user=admin_user, active_view=active_view )
@web.expose
def dataset_errors( self, trans, id=None, **kwd ):
"""View/fix errors associated with dataset"""
data = trans.app.model.HistoryDatasetAssociation.get( id )
p = kwd
if p.get("fix_errors", None):
# launch tool to create new, (hopefully) error free dataset
tool_params = {}
tool_params["tool_id"] = 'fix_errors'
tool_params["runtool_btn"] = 'T'
tool_params["input"] = id
tool_params["ext"] = data.ext
# send methods selected
repair_methods = data.datatype.repair_methods( data )
methods = []
for method, description in repair_methods:
if method in p: methods.append(method)
tool_params["methods"] = ",".join(methods)
url = "/tool_runner/index?" + urllib.urlencode(tool_params)
trans.response.send_redirect(url)
else:
history = trans.app.model.History.get( data.history_id )
return trans.fill_template('dataset/validation.tmpl', data=data, history=history)
# @web.expose
# def dataset_errors( self, trans, id=None, **kwd ):
# """View/fix errors associated with dataset"""
# data = trans.app.model.HistoryDatasetAssociation.get( id )
# p = kwd
# if p.get("fix_errors", None):
# # launch tool to create new, (hopefully) error free dataset
# tool_params = {}
# tool_params["tool_id"] = 'fix_errors'
# tool_params["runtool_btn"] = 'T'
# tool_params["input"] = id
# tool_params["ext"] = data.ext
# # send methods selected
# repair_methods = data.datatype.repair_methods( data )
# methods = []
# for method, description in repair_methods:
# if method in p: methods.append(method)
# tool_params["methods"] = ",".join(methods)
# url = "/tool_runner/index?" + urllib.urlencode(tool_params)
# trans.response.send_redirect(url)
# else:
# history = trans.app.model.History.get( data.history_id )
# return trans.fill_template('dataset/validation.tmpl', data=data, history=history)
# ---- Debug methods ----------------------------------------------------
@@ -18,31 +18,31 @@
<body>
<h2>Dataset generation errors</h2>
<p><b>Dataset $dataset.hid: $dataset.display_name</b></p>
<p><b>Dataset ${dataset.hid}: ${dataset.display_name()}</b></p>
#if $dataset.creating_job_associations
#set job = $dataset.creating_job_associations[0].job
#if job.traceback
%if dataset.creating_job_associations:
<% job = dataset.creating_job_associations[0].job %>
%if job.traceback:
The Galaxy framework encountered the following error while attempting to run the tool:
<pre>${job.traceback}</pre>
#end if
#if $job.stderr or $job.info
%endif
%if job.stderr or job.info:
Tool execution generated the following error message:
#if $job.stderr
%if job.stderr:
<pre>${job.stderr}</pre>
#elif $job.info
%elif job.info:
<pre>${job.info}</pre>
#end if
#else
%endif
%else:
Tool execution did not generate any error messages.
#end if
#if $job.stdout
%endif
%if job.stdout:
The tool produced the following additional output:
<pre>${job.stdout}</pre>
#end if
#else
%endif
%else:
The tool did not create any additional job / error info.
#end if
%endif
<h2>Report this error to the Galaxy Team</h2>
<p>
@@ -56,12 +56,15 @@
<div class="toolFormTitle">Error Report</div>
<div class="toolFormBody">
<form name="report_error" action="${h.url_for( action='report_error')}" method="post" >
<input type="hidden" name="id" value="$dataset.id" />
<table>
<tr valign="top"><td>Your Email:</td><td><input type="text" name="email" size="40" /></td></tr>
<tr valign="top"><td>Message:</td><td><textarea name="message", rows="10" cols="40" /></textarea></td></tr>
<tr><td></td><td><input type="submit" value="Report">
</table>
<input type="hidden" name="id" value="${dataset.id}" />
<div class="form-row">
<label>Your email</label>
<input type="text" name="email" size="40" />
</div>
<div class="form-row">
<label>Message</label>
<textarea name="message", rows="10" cols="40" />
</div>
</form>
</div>
</div>
-44
View File
@@ -1,44 +0,0 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Galaxy</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="/static/style/base.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/static/universe.js">var dummy1=0;</script>
</head>
<body onLoad="frame_dw();">
<div class="toolForm">
<div class="toolFormTitle">Dataset Errors: $data.name</div>
<div class="toolFormBody">
<form action="/dataset_errors" method="post" >
<table>
<tr><td>Name:</td><td>$data.name</td></tr>
<tr><td>Info:</td><td>$data.info<input type="hidden" name="id" value="$data.id"></td></tr>
<tr><td>Errors:</td><td>$len($data.validation_errors)</td></tr>
</table>
#if len($data.validation_errors) > 0:
<table>
<tr><td>Displaying the first 10 errors:</td></tr>
#for count in range(min(len($data.validation_errors),10)):
<tr><td>$data.validation_errors[count].message</td></tr>
#end for
#if $data.datatype.repair_methods($data):
#for $option, $description in $data.datatype.repair_methods($data):
<tr><td><input type="checkbox" name="$option" value="true" />$description</td></tr>
#end for
<tr><td><input type="submit" name="fix_errors" value="Submit"></td></tr>
#end if
</table>
#end if
</form>
</div>
</div>
</body>
</html>