-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #42 from liip/fix/fix-harvester-job-details
Fix/fix harvester job details
- Loading branch information
Showing
3 changed files
with
70 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
{% extends "source/admin_base.html" %} | ||
|
||
|
||
{% block subtitle %}{{ _('Harvest Jobs')}} - {{ super() }}{% endblock %} | ||
|
||
{% block primary_content_inner %} | ||
<div class="module-content"> | ||
|
||
<h1 class="results">{{ _('Harvest Jobs') }}</h1> | ||
|
||
{% if jobs|length == 0 %} | ||
<p class="empty">{{ _('No jobs yet for this source') }}</p> | ||
{% else %} | ||
<ul class="dataset-list unstyled"> | ||
{% for job in jobs %} | ||
<li class="dataset-item"> | ||
<div class="dataset-content"> | ||
<h3 class="dataset-heading"> | ||
<a href="{{ h.url_for('harvester.job_show', source=harvest_source.name, id=job.id) }}"> | ||
{{ _('Job: ') }} {{ job.id }} | ||
</a> | ||
{% if job.status != 'Finished' %} | ||
<span class="label">{{ job.status }}</span> | ||
{% endif %} | ||
</h3> | ||
<p> | ||
{{ _('Started:') }} | ||
<span class="automatic-local-datetime" data-datetime="{{ h.render_datetime(job.gather_started, date_format='%Y-%m-%dT%H:%M:%S%z') }}"> | ||
{{ h.render_datetime(job.gather_started, with_hours=True) or _('Not yet') }} | ||
</span> | ||
— | ||
{{ _('Finished:') }} | ||
<span class="automatic-local-datetime" data-datetime="{{ h.render_datetime(job.finished, date_format='%Y-%m-%dT%H:%M:%S%z') }}"> | ||
{{ h.render_datetime(job.finished, with_hours=True) or _('Not yet') }} | ||
</span> | ||
</p> | ||
</div> | ||
{% if job.status == 'Finished' %} | ||
<ul class="dataset-resources harvester-labels unstyled"> | ||
{% if 'errored' in job.stats and job.stats['errored'] > 0 %} | ||
<li> | ||
<span class="label label-important" data-diff="error"> | ||
{{ job.stats['errored'] }} {{ _('errors') }} | ||
</span> | ||
</li> | ||
{% endif %} | ||
{% for action in ['added', 'updated', 'deleted', 'not modified'] %} | ||
<li> | ||
<span class="label" data-diff="{{ action }}" title="{{ _(action) }}"> | ||
{% if action in job.stats and job.stats[action] > 0 %} | ||
{{ job.stats[action] }} | ||
{% else %} | ||
0 | ||
{% endif %} | ||
{{ _(action) }} | ||
</span> | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
{% endif %} | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
{% endif %} | ||
|
||
</div> | ||
{% endblock %} |