123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- {% extends "base.html" %}
- {% block content %}
- <h2>Latency to {{ target }}</h2>
- <p>Job submitted at {{ target.submitted.strftime('%Y-%m-%d %H:%M') }}</p>
- <table>
- <tr>
- <th>Latency</th>
- <th>Jitter</th>
- <th>Packet loss</th>
- <th>Source</th>
- <th>Comment</th>
- <th>Contact</th>
- <th>Date</th>
- </tr>
- {% macro color(packetloss) -%}
- {% if packetloss >= 50 %}
- "red"
- {% elif packetloss > 0 %}
- "orange"
- {% else %}
- "green"
- {% endif %}
- {%- endmacro %}
- {% for r in results %}
- {% set packetloss = (100 * (r.probes_sent - r.probes_received) / r.probes_sent) %}
- <tr>
- <td>{% if r.avgrtt is not none() %}{{ r.avgrtt }} ms{% endif %}</td>
- <td>{% if r.jitter is not none() %}{{ r.jitter }} ms{% endif %}</td>
- <td><span class={{ color(packetloss) }}>
- {{ packetloss|round(2) }}%
- </span>
- (<span class={{ color(packetloss) }}>{{ r.probes_sent - r.probes_received }}</span>/{{ r.probes_sent }})
- </td>
- <td>{{ r.participant.name }}
- {% if r.participant.country is not none() %}
- ({{ r.participant.country }})
- {% endif %}
- </td>
- <td>{{ r.participant.comment|default("", True) }}</td>
- <td>{{ r.participant.contact }}</td>
- <td>{{ r.date.strftime('%Y-%m-%d %H:%M') }}</td>
- </tr>
- {% endfor %}
- </table>
- {% endblock %}
|