{% load i18n %}
{% load staticfiles %}

{% if not True %}
  <div class="alert alert-warning">
    {% trans "You are not authorized to access the VNC console." %}
  </div>
{% endif %}
<div class="row">
  <div class="col-xs-7">
    <div class="btn-toolbar">
    {% if perms.vm.access_console %}
      <button id="sendCtrlAltDelButton" class="btn btn-danger btn-sm">
        {% trans "Send Ctrl+Alt+Del" %}
      </button>
      <button id="sendPasswordButton" class="btn btn-default btn-sm">
        {% trans "Type password" %}
      </button>
    {% endif %}
    </div>
  </div>
  <div class="col-xs-5 text-right">
    <button id="getScreenshotButton" class="btn btn-info btn-sm" data-vm-pk="{{ instance.pk }}">
      <i class="fa fa-photo"></i> {% trans "Screenshot" %}
    </button>
  </div>
</div>


{% if True %}
  <div class="alert alert-info" id="noVNC_status"></div>
{% endif %}

<div id="vm-console-screenshot">
  <h3>
    <button class="btn btn-danger btn-sm pull-right">{% trans "Close" %}</button>
    {% trans "Screenshot" %}
  </h3>
  <img alt="{% trans "Screenshot" %}"/>
  <hr />
</div>

{% if True %}
  <iframe src="{{ vnc_url }}" style="width: 100%; height: 664px;"></iframe>
{#<canvas id="noVNC_canvas" width="640" height="20">Canvas not supported.#}
{#</canvas>#}

{#<script>#}
  {#var INCLUDE_URI = '{% static "no-vnc/include/" %}';#}
  {#var VNC_URL = "{{ vnc_url }}";#}
{#</script>#}
{% endif %}
