summaryrefslogtreecommitdiff
path: root/openstack_dashboard/dashboards/project/instances/templates/instances/_detail_console.html
blob: 10cd22586e370ce9558912b7e8528b37687af49f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
{% load i18n %}

<h3>{% trans "Instance Console" %}</h3>
{% if console_url %}
<p class="alert alert-info">
{% if console_type != 'SERIAL' %}
{% blocktrans %}If console is not responding to keyboard input: click the grey status bar below.{% endblocktrans %}
{% endif %}
<a href="{{ console_url }}"  style="text-decoration: underline">{% trans "Click here to show only console" %}</a><br />
    {% trans "To exit the fullscreen mode, click the browser's back button." %}</p>
<iframe id="console_embed" src="{{ console_url }}" style="width:100%;height:100%"></iframe>
<script type="text/javascript">
    var fix_height = function() {
        $('iframe#console_embed').css({ height: $(document).height() + 'px' });
    };
    // there are two code paths to this particular block; handle them both
    if (typeof($) != 'undefined') {
        $(document).ready(fix_height);
    } else {
        addHorizonLoadEvent(fix_height);
    }
</script>
{% else %}
  <script type="text/javascript">
    horizon.toast.add('error', '{% blocktrans %}Console is currently unavailable.{% endblocktrans %}');
  </script>
  <div class="well">{% blocktrans %}Unable to load console. Please reload page to try again.{% endblocktrans %}</div>
{% endif %}