Sha256: 82e897e442aa558cf686ab563429f4f8b3fca202be832e54a3ac7daaf8e4d216

Contents?: true

Size: 585 Bytes

Versions: 5

Compression:

Stored size: 585 Bytes

Contents

<% begin %>
  <% file_path = File.join Tailog.log_path, params[:file] %>
  <% File.open file_path do |file| %>
    <% file_size = file.size %>
    <% file.seek params[:seek].to_i %>
    <% file.each_line do |line| %>
      <p><%= h line %></p>
    <% end %>
    <script type="text/javascript">
      window.fileSize = <%= file_size %>;
    </script>
  <% end %>
<% rescue => error %>
  <div class="alert alert-danger">
    <h4><%= h error.class %>: <%= h error.message %></h4>
    <% error.backtrace.each do |backtrace| %>
      <%= h backtrace %><br>
    <% end %>
  </div>
<% end %>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
tailog-0.1.5 app/views/ajax.erb
tailog-0.1.4 app/views/ajax.erb
tailog-0.1.3 app/views/ajax.erb
tailog-0.1.2 app/views/ajax.erb
tailog-0.1.1 app/views/ajax.erb