<%= javascript 'reports', 'ace/ace' %>
<% title "#{@report.host}"%>

<p class='ra'> <%= _("Reported at %s ") % @report.reported_at %> </p>
<% if @offset > 10 %>
  <div class="alert alert-block alert-danger alert-dismissable">
    <%= alert_close %>
    <h3><%= _("Host times seems to be adrift!") %></h3>
    <%= (_("Host reported time is <em>%s</em>") % @report.reported_at).html_safe %> <br/>
    <%= (_("Foreman report creation time is <em>%s</em>") % @report.created_at).html_safe %> <br/>
    <%= (_("Which is an offset of <b>%s</b>") % distance_of_time_in_words(@report.reported_at, @report.created_at, true)).html_safe %>
  </div>
<% end %>

<% content_for(:search_bar) {logs_show} %>

<%= render 'output', :logs => @report.logs%>
<%= render 'metrics', :status => @report.status, :metrics => @report.metrics["time"] if @report.metrics["time"] %>

<%= title_actions link_to(_('Back'), :back),
  display_delete_if_authorized(hash_for_report_path(:id => @report), :class=> "btn btn-danger"),
  link_to(_("Host details"), @report.host),
  link_to(_("Other reports for this host"), host_reports_path(@report.host))
%>

<div id="diff-modal" class="modal fade">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title"><%= _("Diff View") %></h4>
      </div>
      <div  id="diff-modal-editor" class="modal-body">

      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal"><%= _("Close") %></button>
      </div>
    </div><!-- /.modal-content -->
  </div><!-- /.modal-dialog -->
</div><!-- /.modal -->
