{% load i18n %}
{# two ways into a VM: its screen, and root's login, which reaches the guest on its disk or through its agent #}

{% trans "Screen" %}

{% if not can_open_console %}

{% trans "Only the owners of this instance and administrators can open its console." %}

{% elif instance.status == 1 or instance.status == 3 %} {# one window per VM: opening it again reloads it; a paused VM shows its last screen #}
{% trans "Opens the VM's screen in a new window." %}
{% if vdi_reachable %}

{% trans "For virt-viewer or another VNC or SPICE client on your computer." %}

{% else %}

{% trans "A remote viewer cannot reach this console: it listens on the host only, or it is a serial one." %}

{% endif %} {% else %}

{% trans "Start the VM to open its console." %}

{% endif %}
{% if can_change %}{% if app_settings.SHOW_ACCESS_ROOT_PASSWORD == 'True' or app_settings.SHOW_ACCESS_SSH_KEYS == 'True' %}

{% trans "Log in as root" %}

{% if instance.status == 5 %} {% trans "Written to the VM's disk while it is off." %} {% elif guest_access_ready %} {% trans "Sent to the running VM through its guest agent." %} {% elif instance.status == 1 %} {% trans "The guest agent is not connected: connect it, or shut the VM down." %} {% else %} {% trans "Shut the VM down, or run it with its guest agent." %} {% endif %}

{% if app_settings.SHOW_ACCESS_ROOT_PASSWORD == 'True' %}
{% csrf_token %}
{% endif %} {% if app_settings.SHOW_ACCESS_SSH_KEYS == 'True' %}
{% csrf_token %}
{% if not publickeys %}

{% trans "You have no saved public key." %} {% trans "Add one in your profile." %}

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