<html>
<head>
  <title>{% block title %}System status{% endblock title %}</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <meta name="robots" content="noindex">
  <style>
    html, body {
      margin: 0 auto;
      font-family: sans-serif;
      line-height: 1.5;
      max-width: 900px;
    }

    h1 {
      text-align: center;
      margin: 10px;
      font-weight: lighter;
    }

    table {
      border-collapse: collapse;
      width: 100%;
      text-align: left;
    }

    table tr:nth-child(2n) {
      background-color: #f1f1f1;
    }

    td, th {
      padding: 8px;
    }

    .align-right {
      text-align: right;
    }

    table thead {
      background-color: lightskyblue;
    }

    table .icons {
      text-align: center;
      width: 50px;
    }
  </style>
  {% block extra_head %}{% endblock extra_head %}
</head>
<body>
  {% block content %}
    <h1>System status</h1>
    <table>
      <thead>
        <th colspan="2">Service</th>
        <th>Status</th>
        <th class="align-right">Time Taken</th>
      </thead>
      <tbody>
        {% for plugin in plugins %}
          <tr>
            <td class="icons">
              <span aria-hidden="true">
                {% if plugin.status %}
                  &#9989;
                {% else %}
                  &#10060;
                {% endif %}
              </span>
            </td>
            <td>{{ plugin.identifier }}</td>
            <td>{{ plugin.pretty_status | linebreaks }}</td>
            <td class="align-right">{{ plugin.time_taken|floatformat:4 }} seconds</td>
          </tr>
        {% endfor %}
      </tbody>
    </table>
  {% endblock content %}
</body>
</html>
