Sha256: a9bef815fdffc9edeecab5259477aa3bf24e1b52b0db8777cd76f7b9075ad08b

Contents?: true

Size: 1.87 KB

Versions: 2

Compression:

Stored size: 1.87 KB

Contents

<div class="page_entries">
  <%= page_entries_info @logs, :entry_name => 'log' %>
</div>
  
<div id="content">
  <table class="logs">
    <thead>
      <th width="20%">Context</th>
      <th width="5%">Method</th>
      <th width="20%">User</th>    
      <th width="10%">IP</th>
      <th width="10%">Server</th>
      <th width="10%">Date</th>
      <th align="right" width="5%">Timing</th>
      <th align="right" width="3%">&nbsp;</th>
    </thead>
    <tbody>
      <% count=0;@logs.each do |log| %>
        <tr class="<%=row_class_for log['typ'] %>" href="<%="/logs/#{log['_id']}/show"%>" rel='#details'>
          <td><%=context_for log['fid'] %></td>
          <td><%=log['met']%></td>
          <td><%=truncate( user_name_for( log['uid'] ), 30 )%></td>
          <td><%=log['ip']%></td>
          <td><%=format_host( log['hos'] )%></td>
          <td><%=timestamp_for log %></td>
          <td align="right"><%=request_time( log['rti'] )%></td>
          <td align="right"><%=browser_icon( log['bro']['name'] )%></td>
        </tr>
      <% count+=1;end %>
    </body>
  </table>
</div>

<div class="pages">
  <%= will_paginate @logs, :previous_label => "&nbsp;&nbsp;", :next_label => "&nbsp;&nbsp;", :params => { :url => "/logs" } %>
</div>

<div class="overlay" id="details">
  <div class="ov_content"></div>
</div>

<script>
 $( function() {
   $( "tr[rel]").hover( 
     function() {
       $(this).addClass( 'highlight' );
     },
     function() {
       $(this).removeClass( 'highlight' );
     }
    );
   $( "tr[rel]" ).overlay( {
     expose: 'gray',
     onBeforeLoad: function() {  
       var wrap = this.getContent().find( '.ov_content' );
       wrap.load( this.getTrigger().attr( 'href' ) );
     }
   });
  $('.pagination a').live( 'click', function() {
    $("#content").html( '<%=partial :"shared/wait"%>' ); 
    $.getScript( this.href );
    return false;
  });     
 });
</script>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
wackamole-0.0.3 views/logs/_rows.erb
wackamole-0.0.2 views/logs/_rows.erb