1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- {% 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 %}
- {% if r.probes_sent is not none() and r.probes_received is not none() and r.probes_sent != 0 %}
- {% set packetloss = (100 * (r.probes_sent - r.probes_received) / r.probes_sent) %}
- {% endif %}
- <tr>
- <td>{% if r.avgrtt is not none() %}{{ r.avgrtt|round(2) }} ms{% endif %}</td>
- <td>{% if r.jitter is not none() %}{{ r.jitter|round(2) }} ms{% endif %}</td>
- <td>
- {% if r.probes_sent is not none() and r.probes_received is not none() and r.probes_sent != 0 %}
- <span class={{ color(packetloss) }}>
- {{ packetloss|round(2) }}%
- </span>
- (<span class={{ color(packetloss) }}>{{ r.probes_sent - r.probes_received }}</span>/{{ r.probes_sent }})
- {% endif %}
- </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 %}
|