{% extends 'base.html' %} {% block title %}Health Monitor - ePortal{% if current_unit() %} [{{ current_unit().title }}]{% endif %}{% endblock %} {# A canvas is pixels, so the table beside it is both the chart's text alternative and the only route to a slice's drill-down that is not a click. #} {% macro distribution_chart(chart_id, name, slice_column, chart_data) %}
{# Announcing the canvas too would read every figure twice. #} {% if not chart_data['data'] %} {# A table of the chart's figures with no figures in it is column headings and nothing else -- and with the canvas hidden it would be all this section says. The name is repeated here because the caption goes with the table and the visible title is drawn in canvas pixels. #}

{{ name }}: no servers to report.

{% else %} {# Wide data scrolls inside its own container so the page still reflows; focusable, or only a mouse could reach the scrolled-off columns, and named, or that stop announces as a group with nothing to say. #}
{# Chart.js draws the name inside the canvas, out of reach of anyone the canvas is hidden from. #} {% for point in chart_data['data'] %} {% endfor %}
{{ name }}
{{ slice_column }} Servers
{{ chart_data['labels'][loop.index0] }} {{ point['value'] }}
{% endif %}
{% endmacro %} {% block head %} {{ super() }} {% endblock %} {% block body %}

Health Monitor

{% block filters %}
{% for arg_name, arg_value in extra_args.items() %} {% endfor %} {% if sort_column is not none %} {% endif %}
{% if active_filters %} Reset Filters {% endif %}
{% endblock %}
 
{% block uptime_info %} {{ distribution_chart('uptime-distribution-chart', 'Uptime distribution', 'Uptime', uptime_distribution_data) }}
{% for label, key in [('Max uptime', 'max'), ('Average uptime', 'average'), ('Median uptime', 'median')] %} {% endfor %}
Uptime across the selected servers
{{ label }}: {{ uptime[key] }}
{% endblock %} {% block arch_distribution %} {{ distribution_chart('arch-distribution-chart', 'CPU arch distribution', 'CPU architecture', arch_distribution_data) }} {% endblock %}
 
{% block os_distribution %}

OS distribution (top 10)

{% for distro, kc_active_count, kc_silent_count, lc_active_count, lc_silent_count in os_distribution %} {% endfor %}
Distro name KCare active servers KCare silent servers LibCare active servers LibCare silent servers
{{ distro }} {{ kc_active_count }} {{ kc_silent_count }} {{ lc_active_count }} {{ lc_silent_count }}
{% endblock os_distribution %} {% block kernel_distribution %}

Kernel distribution (top 10)

{% for kernel, kc_active_count, kc_silent_count in kernel_distribution %} {% endfor %}
Kernel version KCare active servers KCare silent servers
{{ kernel }} {{ kc_active_count }} {{ kc_silent_count }}
{% endblock kernel_distribution %} {% endblock %} {% block tail %} {{ super() }}
{{ filter_groups|tojson|safe }}
{{ active_filters|tojson|safe }}
{{ uptime_distribution_data|tojson|safe }}
{{ arch_distribution_data|tojson|safe }}
{% endblock %}