{% load hc_extras humanize %}
{% with check.get_status as status %}
    {% if status == "down" %}
        This check is down. Last ping was {{ check.last_ping|naturaltime }}.
    {% elif status == "up" %}
        This check is up. Last ping was {{ check.last_ping|naturaltime }}.
    {% elif status == "grace" %}
        This check is late. Last ping was {{ check.last_ping|naturaltime }}.
    {% elif status == "paused" and check.manual_resume %}
        This check is paused, and will ignore pings until resumed.
        {% if rw %}
        <a id="resume-btn" href="#">(Resume&nbsp;Now)</a>
        {% endif %}
    {% elif status == "paused" and check.last_start %}
        This check is ready for pings.
    {% elif status == "paused" %}
        This check is paused.
    {% elif status == "new" and check.n_pings %}
        This check is ready for pings.
    {% elif status == "new" %}
        This check has never received a ping.
    {% endif %}

    {% if check.last_start %}
        <br />
        Currently running, started {{ check.last_start|hms }} ago.
    {% else %}
        <br /> &nbsp;
    {% endif %}
{% endwith %}