app/views/logs/index.erb in tailog-0.2.1 vs app/views/logs/index.erb in tailog-0.2.2
- old
+ new
@@ -4,11 +4,14 @@
<% if params[:file] %>
<% file_path = File.join Tailog.log_path, params[:file] %>
<h3 class="page-header"><%= file_path %></h3>
- <% File.open file_path do |file| end %>
- <div id="content"></div>
+ <% File.open file_path do |file| %>
+ <div id="content">
+ <%= erb :'logs/list', locals: { file: file.tail(100).join("\n") } %>
+ </div>
+ <% end %>
<script type="text/javascript">
window.fileSize = {};
window.fileSizeDone = {};
var $window = $(window),