{% extends "base.html" %} {% load i18n %} {% load static %} {% load bootstrap_icons %} {% block title %}{% trans "Computes" %}{% endblock %} {% block content %}
{% include 'create_comp_block.html' %} {% include 'search_block.html' %}

{% trans "Computes" %}

{% if not computes %}
{% bs_icon 'exclamation-triangle'%} {% trans "Warning" %}: {% trans "You don't have any computes" %}
{% else %} {# the totals of the hosts the panel reaches #}
{% bs_icon 'hdd-rack' %} {% trans "Hosts" %}
{{ totals.connected }} / {{ totals.hosts }}
{% trans "connected" %}
{% bs_icon 'server' %} {% trans "VMs" %}
{{ totals.running }} / {{ totals.vms }}
{% trans "running" %}
{% bs_icon 'cpu' %} {% trans "vCPUs given" %}
{{ totals.vcpus }}
{% blocktrans count counter=totals.cpus %}on {{ counter }} CPU{% plural %}on {{ counter }} CPUs{% endblocktrans %}
{% bs_icon 'memory' %} {% trans "Memory given" %}
{{ totals.assigned|filesizeformat }}
{% blocktrans with memory=totals.memory|filesizeformat %}of {{ memory }}{% endblocktrans %}
{# position-relative: the hidden status texts are positioned within it, not the page #}
{% for compute in computes %} {% with given=compute.shown_capacity %} {% if given %} {% else %} {% endif %} {% endwith %} {% endfor %}
{% trans "Host" %} {% trans "VMs" %} {% trans "vCPUs" %} {% trans "Memory" %} {% trans "Actions" %}
{{ compute.name }} {% if compute.status is True %} {% trans "Connected" %} {% else %} {% trans "Not connected" %} {% endif %} {{ compute.connection_name }}
{{ compute.hostname }}
{% if compute.details %}
{{ compute.details }}
{% endif %} {% if compute.status is not True %}
{{ compute.connection_error }}
{% endif %}
{{ given.vm_count }}
{% blocktrans with running=given.vms.running %}{{ running }} running{% endblocktrans %}
{% include "computes/capacity_vcpus.html" %} {% include "computes/capacity_memory.html" %} {% if compute.status is True %}{% trans "The capacity could not be read." %}{% else %}{% trans "No capacity while the host cannot be reached." %}{% endif %} {# fixed: the menu would be cut off by the table's scrolling box #}
{% endif %} {% endblock content %} {% block script %} {% endblock script %}