{% extends "base.html" %} {% load i18n %} {% load static %} {% load common_tags %} {% load bootstrap_icons %} {% block title %}{% trans "Computes" %}{% endblock %} {% block content %}
{% include 'create_comp_block.html' %} {% include 'search_block.html' %}
{% if not computes %}
{% bs_icon 'exclamation-triangle'%} {% trans "Warning" %}: {% trans "You don't have any computes" %}
{% else %}
{# position-relative: the hidden status texts are positioned within it, not the page #}
{% for compute in computes %} {% with given=compute.capacity %} {% if given %} {% else %} {% endif %} {% endwith %} {% endfor %}
{% trans "Host" %} {% trans "vCPUs" %} {% trans "Memory" %} {% trans "Storage" %} {% trans "Actions" %}
{% if compute.status is True %} {% trans "Connected" %} {% else %} {% trans "Not Connected" %} {% endif %} {{ compute.name }}
{{ compute.hostname }}{% if compute.details %}
{{ compute.details }}{% endif %}
{% if compute.status is not True %}
{{ compute.connection_error }}
{% endif %}
{{ given.ratio|floatformat:1 }}:1
{% blocktrans count counter=given.vcpus.all %}{{ counter }} vCPU{% plural %}{{ counter }} vCPUs{% endblocktrans %} {% blocktrans count counter=given.cpus %}on {{ counter }} CPU{% plural %}on {{ counter }} CPUs{% endblocktrans %}
{% blocktrans with running=given.vcpus.running %}{{ running }} running{% endblocktrans %}
{% blocktrans with all=given.assigned.all|filesizeformat memory=given.memory|filesizeformat %}{{ all }} given of {{ memory }}{% endblocktrans %}
{% blocktrans with running=given.assigned.running|filesizeformat %}{{ running }} of it running{% endblocktrans %}
{% if given.pool %}{% include "computes/pool_bar.html" with pool=given.pool %}{% endif %} {% if given.more_pools %}
{% blocktrans count counter=given.more_pools|length %}{{ counter }} more pool{% plural %}{{ counter }} more pools{% endblocktrans %} {% for pool in given.more_pools %}
{% include "computes/pool_bar.html" %}
{% endfor %}
{% endif %}
{% if compute.status is True %}{% trans "The capacity could not be read." %}{% else %}{% trans "No capacity while the host cannot be reached." %}{% endif %}
{% endif %}
{% endblock content %} {% block script %} {% endblock script %}