{% macro row(key,value) %} {{key}} {{value|safe}} {% endmacro %} {# type: job:TurnoverJob #} {% macro showjob(job, dataid) %}
New job like this {% 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) }}
key value
{% endmacro %} {% macro check_finish(msg) -%} {%- if msg.startswith('turnover finished!') -%} {{msg}} {%- else -%} {{msg}} {%- endif -%} {%- endmacro %} {# type: loglist:list[LogRecord] #} {% macro showlog(loglist) %}
{% if loglist %} {% for rec in loglist %} {% if loop.index == 1 -%} {%- else -%} {%- endif %} {% endfor %}
time level message
{{rec.time.strftime('%Y-%m-%d %H:%M:%S')}} {{rec.level}}{{check_finish(rec.msg)}}{{rec.msg}}
{% 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 %} {% for data in results %} {% endfor %}
has result job name status email info size last modified
{% 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')}}
{% else %} {#
No jobs
#} {% endif %} {% endmacro %}