<span class="toolbar-item" data-toggle="panel">
  <i class="glyphicon glyphicon-cog" aria-hidden="true"></i>
  <span class="label label-success"><%= @request_conn.status %></span>
  <span class="label label-default"><%= controller_action(@request_conn) %></span>
</span>
<div class="panel panel-default navbar-fixed-bottom">
  <div class="panel-heading">
    <h3 class="panel-title">Conn details</h3>
  </div>
  <div class="panel-body">
    <div class="row">
      <div class="col-lg-6">
        <table class="table table-hover table-condensed table-bordered">
          <caption> Connection parameters </caption>
          <thead>
            <th> Parameter </th>
            <th> Value </th>
          </thead>
          <tbody>
            <%= for {key, value} <- conn_details(@request_conn) do %>
              <tr>
                <td class="col-lg-2 text-muted"><%= key %></td>
                <td class="col-lg-10 text-info"><%= value %></td>
              </tr>
            <% end %>
          </tbody>
        </table>
      </div>
      <div class="col-lg-6">
        <table class="table table-hover table-condensed table-bordered">
          <caption> Rendered templates </caption>
          <thead>
            <th> Name </th>
            <th> Count </th>
            <th> Average </th>
          </thead>
          <tbody>
            <%= for {name, stats} <- rendered_templates(@timeline) do %>
              <tr>
                <td class="col-lg-8 text-muted"><%= name %></td>
                <td class="col-lg-2 text-info"><%= stats.count %></td>
                <td class="col-lg-2 text-info">
                  <%= native_time_to_string stats.avg %>
                  <i
                        class="glyphicon glyphicon-info-sign pointer"
                        data-toggle="popover"
                        title="Stats"
                        data-content="<%= stats_popover_text(stats) %>"
                        data-container=".ex-debug-toolbar"
                        data-placement="top"
                        data-html=true
                        data-trigger="hover"
                  ></i>
                </td>
              </tr>
            <% end %>
          </tbody>
        </table>
      </div>
    </div>
  </div>
</div>
