{% comment %}© 2015, Multapplied Networks, Inc.{% endcomment %}{% load removenbsp %}
{% if summary.down_count == 0 and summary.up_count > 0 %}
    OK: {{ summary.up_count }} leg{{ summary.up_count|pluralize }} up for {{ summary.last_state_change|timesince:utcnow|removenbsp }}
{% else %}
    {% if not summary.one_or_more_up %}
        Critical: All legs down for {{ summary.last_state_change|timesince:utcnow|removenbsp }}
    {% else %}
        {% if not summary.one_or_more_non_failover_leg_up %}
            Critical: Using failover leg for {{ summary.last_state_change|timesince:utcnow|removenbsp }}
        {% else %}
            Warning: {{ summary.up_count }} leg{{ summary.up_count|pluralize }} up, {{ summary.down_count }} leg{{ summary.down|pluralize }} down for {{ summary.last_state_change|timesince:utcnow|removenbsp }}
        {% endif %}
    {% endif %}
{% endif %}
{% for leg in legs %}
    {{ leg }}: {% if leg.is_up %}up{% else %}down{% endif %}
{% endfor %}
