{% 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) %} {% if repo.status[0] != 'ok' %} {% endif %}
{{ repo.display_name }}
{{ repo.notes or mdash }}
{# Status Badge #} {{ repo.status[2] }}
{{ repo.status[1] }}
{% trans %}Last backup{% endtrans %}
{{ repo.backup_count or mdash }}
{% trans %}Restore points{% endtrans %}
{{ repo.last_filesize | filesize if repo.last_filesize else mdash }}
{% trans %}Size{% endtrans %}
{% trans %}Oldest:{% endtrans %} {{ repo.first_backup_date | format_date if repo.first_backup_date else mdash }} {{ _('%(count)s errors', count=repo.last_error_count) }}
{% endmacro %}