{% macro repo_card(repo) -%}
{% set status_color = {'ok': bs_colors.success, 'in_progress': bs_colors.info, 'broken': bs_colors.danger}.get(repo.status[0], bs_colors.warning) %}
|
{{ repo.display_name }}
{{ repo.notes or mdash }}
|
{# Status Badge #}
{{ repo.status[2] }}
|
|
{% if repo.status[0] != 'ok' %}
|
{{ repo.status[1] }}
|
{% endif %}
|
{% trans %}Last backup{% endtrans %}
|
{{ repo.session_statistics | length if repo.session_statistics else mdash }}
{% trans %}Restore points{% endtrans %}
|
{{ repo.session_statistics[-1].sourcefilesize | filesize if repo.session_statistics else mdash }}
{% trans %}Size{% endtrans %}
|
|
|
{% trans %}Oldest:{% endtrans %}
{{ repo.session_statistics[0].date | format_date if repo.session_statistics else mdash }}
|
{% set error_count = repo.session_statistics[-1].errors if repo.session_statistics else 0 %}
{{ _('%(count)s errors', count=error_count) }} |
|
{% endmacro %}