<!DOCTYPE html>
<html>
<head>
  <title>Mongo Logs</title>
  <style>
    td { border-top: 1px dotted black; vertical-align: top; }
  </style>
</head>
<body>
  <p>Log records (latest/newest entries first), page <%= @page %></p>
  <table id="mongo_list">
    <thead>
      <tr class="header">
        <th>ID</th>
        <th>controller</th>
        <th>action</th>
        <th>messages</th>
      </tr>
    </thead>
    <tbody>
      <% @records.each do |record| -%>
      <tr class="record">
        <td class="id"><%= record['_id'] %></td>
        <td class="controller"><%= record['controller'] %></td>
        <td class="action"><%= record['action'] %></td>
        <td class="messages">        
          <%= format_messages(record['messages']['error'], 'error') %>
          <%= format_messages(record['messages']['warning'], 'warning') %>
          <%= format_messages(record['messages']['info'], 'info') %>
          <%= format_messages(record['messages']['debug'], 'debug') %>
        </td>
      </tr>
      <% end -%>
    </tbody>
  </table>
  
</body>
</html>
<!DOCTYPE html>
<html>
<head>
  <title>Mongo Logs</title>
  <style>
    td { border-top: 1px dotted black; vertical-align: top; }
  </style>
</head>
<body>
  <p>Log records (latest/newest entries first), page <%= @page %></p>
  <table id="mongo_list">
    <thead>
      <tr class="header">
        <th>ID, timestamp</th>
        <th>controller</th>
        <th>action</th>
        <th>messages</th>
      </tr>
    </thead>
    <tbody>
      <% @records.each do |record| -%>
      <tr class="record">
        <td class="id"><%= record['_id'] %><br/><%= record['request_time'].strftime("%d-%b-%Y %H:%M:%S %Z") %></td>
        <td class="controller"><%= record['controller'] %></td>
        <td class="action"><%= record['action'] %></td>
        <td class="messages">        
          <%= format_messages(record['messages']['error'], 'error') %>
          <%= format_messages(record['messages']['warning'], 'warning') %>
          <%= format_messages(record['messages']['info'], 'info') %>
          <%= format_messages(record['messages']['debug'], 'debug') %>
        </td>
      </tr>
      <% end -%>
    </tbody>
  </table>
  
</body>
</html>
Add timestamps to log view.
Add timestamps to log view.
