|
<% if @console[:proxy_port] -%>
|
|
<%= content_for(:head) { javascript_tag "var INCLUDE_URI = '/javascripts/noVNC/';" } %>
|
|
<%= javascript 'noVNC/vnc', 'noVNC/ui', 'noVNC' %>
|
|
|
|
<div id='vnc' data-port='<%= @console[:proxy_port] %>' data-password='<%= @console[:password] %>'>
|
|
|
|
<div id="noVNC_status_bar" class="row" style="margin-bottom:18px;">
|
|
<div id="noVNC_status" class="span7 label" >Loading</div>
|
|
<div id="noVNC_buttons">
|
|
<input type=button value="Ctrl-Alt-Del" id="sendCtrlAltDelButton" class="fr btn" >
|
|
</div>
|
|
<%= link_to_if_authorized("Back to host", hash_for_host_path(:id => @host), :title => "Back to host" , :class => 'fr btn') if @host %>
|
|
</div>
|
|
|
|
<canvas id="noVNC_canvas" width="640px" height="20px" class="clearfix ca">
|
|
Canvas not supported.
|
|
</canvas>
|
|
</div>
|
|
|
|
<% else -%>
|
|
<div class="row">
|
|
<% search_bar "Generated #{time_ago_in_words @console['timestamp']} ago" %>
|
|
<% title_actions link_to_if_authorized("Back to host", hash_for_host_path(:id => @host), :title => "Back to host" , :class => 'fr btn') %>
|
|
<% title "Console output for #{@host}" %>
|
|
</div>
|
|
<% if @host.installed_at.nil? or (@console['timestamp'] - @host.installed_at < 5.minutes) -%>
|
|
<div class='alert'>
|
|
<a class="close" href="#" data-dismiss="alert">×</a>
|
|
Console output may be out of date
|
|
</div>
|
|
<% end -%>
|
|
<pre class="pre-scrollable">
|
|
<code>
|
|
<%= @console['output'] %>
|
|
</code>
|
|
</pre>
|
|
<% end -%>
|