|
@@ -25,14 +25,14 @@
|
|
|
{% endif %}
|
|
|
{%- endmacro %}
|
|
|
{% for r in results %}
|
|
|
- {% if r.probes_sent is not none() and r.probes_received is not none() %}
|
|
|
+ {% 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() %}
|
|
|
+ {% 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>
|