[hg] galaxy 2534: Remove last cheetah templates (dataset errors ...
details: http://www.bx.psu.edu/hg/galaxy/rev/80e1c1772ed5 changeset: 2534:80e1c1772ed5 user: James Taylor <james@jamestaylor.org> date: Wed Aug 05 11:02:53 2009 -0400 description: Remove last cheetah templates (dataset errors and validation). Fix errors template to use correct form styles. Resolves #18 5 file(s) affected in this change: lib/galaxy/web/controllers/dataset.py lib/galaxy/web/controllers/root.py templates/dataset/errors.mako templates/dataset/errors.tmpl templates/dataset/validation.tmpl diffs (266 lines): diff -r ab5bf78270af -r 80e1c1772ed5 lib/galaxy/web/controllers/dataset.py --- a/lib/galaxy/web/controllers/dataset.py Wed Aug 05 10:44:57 2009 -0400 +++ b/lib/galaxy/web/controllers/dataset.py Wed Aug 05 11:02:53 2009 -0400 @@ -44,7 +44,7 @@ @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 ): diff -r ab5bf78270af -r 80e1c1772ed5 lib/galaxy/web/controllers/root.py --- a/lib/galaxy/web/controllers/root.py Wed Aug 05 10:44:57 2009 -0400 +++ b/lib/galaxy/web/controllers/root.py Wed Aug 05 11:02:53 2009 -0400 @@ -547,29 +547,29 @@ # 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 ---------------------------------------------------- diff -r ab5bf78270af -r 80e1c1772ed5 templates/dataset/errors.mako --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/templates/dataset/errors.mako Wed Aug 05 11:02:53 2009 -0400 @@ -0,0 +1,72 @@ +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> +<html> + <head> + <title>Dataset generation errors</title> + <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> + <link href="/static/style/base.css" rel="stylesheet" type="text/css" /> + <style> + pre + { + background: white; + color: black; + border: dotted black 1px; + overflow: auto; + padding: 10px; + } + </style> + </head> + + <body> + <h2>Dataset generation errors</h2> + <p><b>Dataset ${dataset.hid}: ${dataset.display_name()}</b></p> + + %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> + %endif + %if job.stderr or job.info: + Tool execution generated the following error message: + %if job.stderr: + <pre>${job.stderr}</pre> + %elif job.info: + <pre>${job.info}</pre> + %endif + %else: + Tool execution did not generate any error messages. + %endif + %if job.stdout: + The tool produced the following additional output: + <pre>${job.stdout}</pre> + %endif + %else: + The tool did not create any additional job / error info. + %endif + + <h2>Report this error to the Galaxy Team</h2> + <p> + The Galaxy team regularly reviews errors that occur in the application. + However, if you would like to provide additional information (such as + what you were trying to do when the error occurred) and a contact e-mail + address, we will be better able to investigate your problem and get back + to you. + </p> + <div class="toolForm"> + <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}" /> + <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> + </body> +</html> diff -r ab5bf78270af -r 80e1c1772ed5 templates/dataset/errors.tmpl --- a/templates/dataset/errors.tmpl Wed Aug 05 10:44:57 2009 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,69 +0,0 @@ -<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> -<html> - <head> - <title>Dataset generation errors</title> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - <link href="/static/style/base.css" rel="stylesheet" type="text/css" /> - <style> - pre - { - background: white; - color: black; - border: dotted black 1px; - overflow: auto; - padding: 10px; - } - </style> - </head> - - <body> - <h2>Dataset generation errors</h2> - <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 - 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 - Tool execution generated the following error message: - #if $job.stderr - <pre>${job.stderr}</pre> - #elif $job.info - <pre>${job.info}</pre> - #end if - #else - Tool execution did not generate any error messages. - #end if - #if $job.stdout - The tool produced the following additional output: - <pre>${job.stdout}</pre> - #end if - #else - The tool did not create any additional job / error info. - #end if - - <h2>Report this error to the Galaxy Team</h2> - <p> - The Galaxy team regularly reviews errors that occur in the application. - However, if you would like to provide additional information (such as - what you were trying to do when the error occurred) and a contact e-mail - address, we will be better able to investigate your problem and get back - to you. - </p> - <div class="toolForm"> - <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> - </form> - </div> - </div> - </body> -</html> diff -r ab5bf78270af -r 80e1c1772ed5 templates/dataset/validation.tmpl --- a/templates/dataset/validation.tmpl Wed Aug 05 10:44:57 2009 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -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> \ No newline at end of file
participants (1)
-
Greg Von Kuster