diff --git a/server/templates/instances.html.j2 b/server/templates/instances.html.j2 index 96b712a..aa0ef37 100644 --- a/server/templates/instances.html.j2 +++ b/server/templates/instances.html.j2 @@ -42,10 +42,10 @@ {%- endif -%} {%- if host.recent_pings|length > 0 -%} - {%- set height = 57 -%} + {%- set height = 34 -%} {%- set width = 100 -%} {%- set amount = host.recent_pings|length -%} - {%- set width_bar = width / amount -%} + {%- set width_bar = 5 -%} {%- set offset = 5 -%} {%- set error_size = height / 3 %} {%- if host.ping_max and host.ping_min -%} @@ -63,20 +63,16 @@ #} {%- if host.ping_min -%} - - {%- if host.ping_avg and host.ping_min -%} - {%- set avg_pos = (height-(host.ping_avg - host.ping_min )/step_size) - offset -%} - Average - {%- endif -%} + {%- for ping in host.recent_pings -%} {%- if ping -%} - {%- set height_bar = (ping - host.ping_min )/step_size + offset -%} - {%- set color_bar = "#a09df2" -%} + {%- set title = "Healthy" -%} + {%- set color_bar = "#2fcc66" -%} {%- else -%} - {%- set height_bar = error_size -%} - {%- set color_bar = "#cc0000" -%} + {%- set title = "Unhealthy" -%} + {%- set color_bar = "#ff6225" -%} {%- endif -%} - {{ping | default(value="unhealthy") }} + {{title}} {%- endfor -%} {%- else -%}