nopaque/app/templates/main/jobs/job.html.j2

98 lines
3.4 KiB
Plaintext
Raw Normal View History

2019-08-09 09:49:09 +00:00
{% extends "base.html.j2" %}
{% block page_content %}
<div class="col s12 m4">
<h3>{{ job.title }}</h3>
<p>{{ job.description }}</p>
{% if job.status == 'pending' %}
{% set status_color = 'amber' %}
{% elif job.status =='running' %}
{% set status_color = 'indigo' %}
{% elif job.status =='complete' %}
{% set status_color = 'teal' %}
{% else %}
{% set status_color = 'red' %}
{% endif %}
<p><a class="waves-effect waves-light btn {{ status_color }}">{{ job.status }}</a></p>
2019-08-09 09:49:09 +00:00
</div>
<div class="col s12 m8">
<div class="card">
<div class="card-content">
<span class="card-title">Chronometrics</span>
<div class="row">
<div class="col s12 m6">
<div class="input-field">
<input disabled value="{{ job.creation_date }}" id="creation-date" type="text" class="validate">
<label for="creation-date">Creation date</label>
</div>
</div>
<div class="col s12 m6">
<div class="input-field">
<input disabled value="{{ job.end_date }}" id="end-date" type="text" class="validate">
<label for="end-date">End date</label>
</div>
</div>
</div>
<span class="card-title">Ressource allocations</span>
<div class="row">
<div class="col s12 m6">
<div class="input-field">
<input disabled value="{{ job.mem_mb }}" id="mem-mb" type="text" class="validate">
<label for="mem-mb">Memory</label>
</div>
</div>
<div class="col s12 m6">
<div class="input-field">
<input disabled value="{{ job.n_cores }}" id="n-cores" type="text" class="validate">
<label for="n-cores">CPU cores</label>
</div>
</div>
</div>
<span class="card-title">Service informations</span>
<div class="row">
<div class="col s12 m4">
<div class="input-field">
<input disabled value="{{ job.service }}" id="service" type="text" class="validate">
<label for="service">Service</label>
</div>
</div>
<div class="col s12 m4">
<div class="input-field">
<input disabled value="{{ job.service_args|escape }}" id="service-args" type="text" class="validate">
<label for="service-args">Service arguments</label>
</div>
</div>
<div class="col s12 m4">
<div class="input-field">
<input disabled value="{{ job.service_version }}" id="service-version" type="text" class="validate">
<label for="service-version">Service version</label>
</div>
</div>
</div>
<p>
2019-08-12 07:51:32 +00:00
{% for file in files %}
2019-08-12 08:36:51 +00:00
<a href="{{ url_for('main.job_download', job_id=job.id, file=files[file]['path']) }}" class="waves-effect waves-light btn-small">
<i class="material-icons left">file_download</i>{{ file }}
</a>
{% endfor %}
</p>
2019-08-12 07:51:32 +00:00
{% if job.status == 'complete' %}
<p>&nbsp;</p>
<span class="card-title">Results</span>
<p>
2019-08-12 07:51:32 +00:00
{% for file in files %}
{% for result in files[file]['results'] %}
2019-08-12 08:36:51 +00:00
<a href="{{ url_for('main.job_download', job_id=job.id, file=files[file]['results'][result]['path']) }}" class="waves-effect waves-light btn-small">
2019-08-12 07:51:32 +00:00
<i class="material-icons left">file_download</i>{{ result }}
</a>
{% endfor %}
{% endfor %}
</p>
2019-08-12 07:51:32 +00:00
{% endif %}
2019-08-09 09:49:09 +00:00
</div>
</div>
{% endblock %}