{% macro row(key,value) %}
{{key}} |
{{value|safe}} |
{% endmacro %}
{# type: job:TurnoverJob #}
{% macro showjob(job, dataid) %}
New job like
this
key |
value |
{% set s = 's' if job.pepxml|length != 1 else '' %}
{{ row('pepxml file' + s, job.pepxml|join(' ')) }}
{{ row('protxml file', job.protxml) }}
{{ row('mzML files', job.mzmlfiles|join(' ')) }}
{{ row('labelled element', job.settings.labelledElement) }}
{{ row('isotope number', job.settings.labelledIsotopeNumber) }}
|
{% endmacro %}
{# type: loglist:list[LogRecord] #}
{% macro showlog(loglist) %}
{% if loglist %}
time |
level |
message |
{% for rec in loglist %}
{{rec.time.strftime('%Y-%m-%d %H:%M:%S')}} |
{{rec.level}} |
{{rec.msg}} |
{% endfor %}
{% else %}
No Logs
{% endif %}
|
{% endmacro %}
{# data:TurnoverJobFiles #}
{% macro jobinfo(data, oktokill) %}
{% if oktokill %}
{% if data.is_running %}
{% elif data.status == 'killed' %}
{% elif data.status == 'failed' %}
{% endif %}
{% endif %}
{% endmacro %}
{# results:list[TurnoverJobFiles] #}
{% macro jobtable(results, oktokill) %}
{% if results|length > 0 %}
has result |
job name |
status |
email |
info |
size |
last modified |
{% for data in results %}
{% if data.has_result %}
view result
{% endif %}
|
{{data.job.job_name}}
|
{{data.status}}
|
{{data.job.email or 'no email'}}
|
{{jobinfo(data, oktokill)}}
|
{{data.size|human}} |
{{data.mtime.strftime('%Y-%m-%d %H:%M:%S')}} |
{% endfor %}
{% else %}
{#No jobs
#}
{% endif %}
{% endmacro %}