Skip to content

Commit

Permalink
Merge pull request #27 from liip/add-harvest-status-colors
Browse files Browse the repository at this point in the history
feat: add colors to harvest-stats
  • Loading branch information
stefina authored Nov 21, 2023
2 parents 46aa470 + 114c19d commit 414d757
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions ckanext/switzerland/templates/snippets/job_details.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

{% if job.status == 'Finished' %}
<p class="harvester-labels">
<span class="label label-important" data-diff="error">
<span class="label label-danger" data-diff="error">
{% if 'errored' in stats and stats['errored'] > 0 %}
{{ stats['errored'] }}
{% else %}
Expand All @@ -26,7 +26,15 @@
{{ _('errors') }}
</span>
{% for action in ['added', 'updated', 'deleted', 'not modified'] %}
<span class="label" data-diff="{{ action }}">
{% if "deleted" == action %}
<span class="label label-warning" data-diff="{{ action }}">
{% elif "added" == action %}
<span class="label label-success" data-diff="{{ action }}">
{% elif "updated" == action %}
<span class="label label-info" data-diff="{{ action }}">
{% else %}
<span class="label label-default" data-diff="{{ action }}">
{% endif %}
{% if action in stats and stats[action] > 0 %}
{{ stats[action] }}
{% else %}
Expand Down

0 comments on commit 414d757

Please sign in to comment.