{% load i18n %}

<h3>{% trans "Instance VNC Console" %}</h3>
{% if vnc_url %}
<p class='alert alert-info'>{% blocktrans %}If VNC console is not responding to keyboard input: click the grey status bar below.{% endblocktrans %} <a href="{{ vnc_url }}">{% trans "Click here to show only VNC" %}</a></p>
<iframe id="vnc_console" src="{{ vnc_url }}" style="width:100%;height:100%"></iframe>
<script type="text/javascript">
    $(document).ready(function() {
        $('iframe#vnc_console').css({
            height: $(document).height() + 'px'
        });
    });
</script>
{% else %}
<p class='alert alert-error'>{% blocktrans %}VNC console is currently unavailable. Please try again later.{% endblocktrans %}
<a class='btn btn-mini' href="{% url horizon:project:instances:detail instance_id %}">{% trans "Reload" %}</a></p>
{% endif %}
