{% extends "dashboard/base.html" %} {% load staticfiles %} {% load i18n %} {% load render_table from django_tables2 %} {% load arrowfilter %} {% load sizefieldtags %} {% block title-page %}{% trans "Request" %}{% endblock %} {% block content %}
{% if request.user.is_superuser %} {% trans "Back" %} {% endif %}

{{ object.get_readable_type|capfirst }}

{{ object.get_readable_status|upper }}

{{ object.user.profile.get_display_name }}

{{ object.message }}


{% trans "Submitted" %}: {{ object.created }}
{% if object.type == "lease" %}
{% trans "VM name" %}
{{ action.instance.name }}
{% trans "VM description" %}
{{ action.instance.description }}
{% trans "Current lease" %}
{{ action.instance.lease }}
{% trans "Requested lease" %}
{{ action.lease_type.lease }}
{% elif object.type == "template" %}
{% trans "Template type" %}: {{ action.template_type.name }}
    {% for t in action.template_type.templates.all %}
  • {{ t }}
  • {% endfor %}
{% trans "Level" %}
{{ action.get_readable_level }}
{% elif object.type == "resource" %} {% if not is_acceptable %}
{% blocktrans %} To change the resources the virtual machine must be in one of the following states: STOPPED, PENDING, RUNNING. If the virtual machine is running it will be automatically stopped when accepting the request. {% endblocktrans %}
{% endif %}
{% trans "VM name" %}
{{ action.instance.name }}
{% trans "Status" %}
{{ action.instance.get_status_display|upper }}
{% trans "VM description" %}
{{ action.instance.description|default:"-" }}
{% trans "Priority" %} {% trans "(old values in parentheses)" %}
{{ action.priority }} ({{ action.instance.priority }})
{% trans "Number of cores" %}
{{ action.num_cores }} ({{ action.instance.num_cores }})
{% trans "Ram size" %}
{{ action.ram_size }} ({{ action.instance.ram_size }}) MiB
{% elif object.type == "resize" %} {% if not is_acceptable %}
{% trans "To resize the disk the virtual machine must be in RUNNING state." %}
{% endif %}
{% trans "VM name" %}
{{ action.instance.name }}
{% trans "Status" %}
{{ action.instance.get_status_display|upper }}
{% trans "VM description" %}
{{ action.instance.description|default:"-" }}
{% trans "Disk" %}
{% if request.user.is_superuser %} {{ action.disk.name }} (#{{ action.disk.id}}) {% else %} {{ action.disk.name }} (#{{ action.disk.id}})
{% endif %}
{% trans "Current size" %}
{{ action.disk.size|filesize}} ({{ action.disk.size }} bytes)
{% trans "Requested size" %}
{{ action.size|filesize}} ({{ action.size }} bytes)
{% else %} Are you adding a new action type? {% endif %} {% if object.status == "PENDING" and request.user.is_superuser %}
{% csrf_token %}

{% if not is_acceptable %} {% trans "You can't accept this request because of the VM's state." %} {% else %}
{% csrf_token %}
{% endif %}
{% endif %} {% if object.status != "PENDING" %}
{% blocktrans with closed=object.modified|arrowfilter:LANGUAGE_CODE user=object.closed_by.profile.get_display_name %} Closed {{ closed }} by {{ user }} {% endblocktrans %} {% if object.status == "DECLINED" %}

{% trans "Reason" %}: {{ object.reason }}

{% endif %}
{% endif %}
{% endblock %}