Commit 3fc48ee8 authored by marc's avatar marc

pre_process.py: add info view

display task scheduler result
parent c8f66d05
......@@ -94,3 +94,12 @@ def delete():
"message": "pre_process '%s' deleted" % request.vars["id"]}
log.admin(res)
return gluon.contrib.simplejson.dumps(res, separators=(',',':'))
## need ["sequence_file_id"]
## need ["sample_set_id"]
def info():
if (auth.can_modify_sample_set(request.vars["sample_set_id"])):
return dict(message=T('result info'))
else :
res = {"message": "acces denied"}
return gluon.contrib.simplejson.dumps(res, separators=(',',':'))
{{extend 'db_layout.html'}}
{{('message' in globals())}}
{{if 'message' in globals():}}
<div>
<h3>{{=message}}</h3>
Are you sure you want to delete this pre_process</br>
.</br>
<div class="center">
<button onclick="db.call('pre_process/delete', {'id' :'{{=request.vars["id"]}}'} )">continue</button>
</div>
</div>
{{elif 'content' in globals():}}
{{=content}}
{{else:}}
{{=BEAUTIFY(response._vars)}}
{{pass}}
{{extend 'db_layout.html'}}
{{('message' in globals())}}
{{if 'message' in globals():}}
{{
sequence_file_id = request.vars["sequence_file_id"]
sequence_file = db.sequence_file[sequence_file_id]
run = db(db.scheduler_run.task_id == sequence_file.pre_process_scheduler_task_id).select().first()
}}
<div>
<h3>info pre_process {{=sequence_file.filename}} </h3>
<div class="db_block">
<div class="db_block_left">
</div>
<div class="db_block_right">
</div>
</div>
</div>
{{if run:}}
<div id="db_table_container">
<table>
<tr>
<td>status :</td>
<td>{{=run.status}}</td>
</tr>
<tr>
<td>start :</td>
<td>{{=run.start_time}}</td>
</tr>
<tr>
<td>stop :</td>
<td>{{=run.stop_time}}</td>
</tr>
</table>
<table class='log'>
<tr><td>result : <b>{{if run.run_result:}}{{=run.run_result.replace('\r', '')}}{{pass}}</b>
</textarea></td></tr>
<tr><td>output :</td></tr>
<tr><td><textarea class="text" rows="25">{{if run.run_output:}}{{=run.run_output.replace('\r', '')}}{{pass}}
</textarea></td></tr>
<tr><td>traceback :</td></tr>
<tr><td><textarea class="text" rows="10">{{if run.traceback:}}{{=run.traceback.replace('\r', '')}}{{pass}}
</textarea></td></tr>
</table>
</div>
{{pass}}
<div class="db_block">
<div class="db_block_left">
</div>
<div class="db_block_right">
</div>
</div>
{{elif 'content' in globals():}}
{{=content}}
{{else:}}
{{=BEAUTIFY(response._vars)}}
{{pass}}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment