Sha256: fc2a6a11b68f9c267c7413440cb655b5d2aa494ed6c7e9a6e624c7ec40a9d8c5
Contents?: true
Size: 1.17 KB
Versions: 7
Compression:
Stored size: 1.17 KB
Contents
<table id="logs-table" class="table table-condensed table-striped mobile-data"> <thead> <tr> <th>Time</th> <th>Name</th> <th>Level</th> <th>Message</th> </tr> </thead> <tbody> <% logs.each do |log| %> <tr> <td> <% unless log['time'].blank? %> <%= DateTime.strptime(log['time'].to_s, '%Q').strftime('%Y-%m-%d %H:%M:%S') %> <% end %> </td> <td><%= log['name'] %></td> <td> <% if log['level'] == 'ERROR' %> <span class="label label-danger"><%= log['level'] %></span> <% elsif log['level'] == 'WARNING' %> <span class="label label-warning"><%= log['level'] %></span> <% else %> <span class="label label-success"><%= log['level'] %></span> <% end %> </td> <td><pre><%= log['message'] %></pre></td> </tr> <% end %> </tbody> </table> <%= javascript_tag do %> $(document).ready(function() { $('#logs-table').dataTable({ "dom": "<'row'r>t<'row'<'col-md-6'i><'col-md-6'p>>", "pagingType": "full_numbers", "pageLength": 50, "ordering": false }); }); <% end %>
Version data entries
7 entries across 7 versions & 2 rubygems