index.html.erb 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. <div class='table-responsive'>
  2. <table class='table table-striped logs'>
  3. <tr>
  4. <th>Message</th>
  5. <th>When</th>
  6. <th width="200px"></th>
  7. </tr>
  8. <% @logs.each do |log| %>
  9. <tr>
  10. <td><%= truncate log.message, :length => 200, :omission => "..." %></td>
  11. <td><%= time_ago_in_words log.created_at %> ago</td>
  12. <td>
  13. <div class="btn-group btn-group-xs">
  14. <% if log.inbound_event.present? %>
  15. <%= link_to 'Event In', event_path(log.inbound_event), class: "btn btn-default" %>
  16. <% else %>
  17. <%= link_to 'Event In', '#', class: "btn btn-default disabled" %>
  18. <% end %>
  19. <% if log.outbound_event.present? %>
  20. <%= link_to 'Event Out', event_path(log.outbound_event), class: "btn btn-default" %>
  21. <% else %>
  22. <%= link_to 'Event Out', '#', class: "btn btn-default disabled" %>
  23. <% end %>
  24. <%= link_to 'Details', '#', :class => "btn btn-default show-log-details", :data => { :'modal-title' => log.level >= 4 ? 'Error' : 'Info', :'modal-content' => log.message } %>
  25. </div>
  26. </td>
  27. </tr>
  28. <% end %>
  29. </table>
  30. </div>