{% extends "resources/base.html" %} {% import "site_shell/_macros.html" as ui %} {% block title %}Health Dashboard - Pychestrate Resources{% endblock %} {% block content %} {% macro group_footer(status, shown, count, noun) -%} {%- if selected_status == '' and count > shown %}

Showing {{ shown }} of {{ count }} {{ noun }}. View all {{ count }}

{%- endif %} {%- endmacro %} {% if selected_status %}

« All statuses

{% endif %}
{{ health_counts.online }}
Online
{{ health_counts.degraded }}
Degraded
{{ health_counts.maintenance }}
Maintenance
{{ health_counts.offline }}
Offline
{% if health_groups.offline %}
{{ ui.icon("cancel") }} Offline Resources
{% for resource in health_groups.offline %} {% endfor %}
Name Type Pool
{{ resource.name }} {{ resource.resource_type }} {{ resource.pool_name | display }}
{{ group_footer('offline', health_groups.offline | length, health_counts.offline, 'resources') }}
{% endif %} {% if health_groups.degraded %}
{{ ui.icon("warning") }} Degraded Resources
{% for resource in health_groups.degraded %} {% endfor %}
Name Type Pool
{{ resource.name }} {{ resource.resource_type }} {{ resource.pool_name | display }}
{{ group_footer('degraded', health_groups.degraded | length, health_counts.degraded, 'resources') }}
{% endif %} {% if health_groups.maintenance %}
{{ ui.icon("build") }} Resources in Maintenance
{% for resource in health_groups.maintenance %} {% endfor %}
Name Type Pool
{{ resource.name }} {{ resource.resource_type }} {{ resource.pool_name | display }}
{{ group_footer('maintenance', health_groups.maintenance | length, health_counts.maintenance, 'resources') }}
{% endif %} {% if selected_status == '' or selected_status == 'online' %}
{{ ui.icon("check_circle") }} Online Resources ({{ health_counts.online }})
{% if health_groups.online %}
{% for resource in health_groups.online %} {% endfor %}
Name Type Pool Capacity
{{ resource.name }} {{ resource.resource_type }} {{ resource.pool_name | display }} {{ resource.current_allocations }}/{{ resource.capacity }}
{{ group_footer('online', health_groups.online | length, health_counts.online, 'online resources') }} {% else %}

No online resources

{% endif %}
{% endif %} {% if selected_status and not health_groups[selected_status] %}

No {{ selected_status }} resources{% if page > 1 %} on this page{% endif %}.

{% endif %} {% if selected_status %} {{ ui.pagination('resources.health_dashboard', page, total_pages, {'status': selected_status, 'per_page': per_page}, health_counts[selected_status]) }} {% endif %} {% endblock %}