app/views/logs/index.erb in tailog-0.2.2 vs app/views/logs/index.erb in tailog-0.2.3
- old
+ new
@@ -5,13 +5,11 @@
<% 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| %>
- <div id="content">
- <%= erb :'logs/list', locals: { file: file.tail(100).join("\n") } %>
- </div>
+ <div id="content"></div>
<% end %>
<script type="text/javascript">
window.fileSize = {};
window.fileSizeDone = {};
@@ -29,10 +27,12 @@
window.fileSizeDone[fileSizeKey] = true;
window.fileSize[data.server_uuid] = data.file_size;
if (!data.content) return;
var shouldScrollToBottom = $window.scrollTop() + $window.height() == $document.height();
- $(data.content).appendTo($content);
+ $content
+ .append('<p class="text-info">' + data.server_uuid + '</p>')
+ .append(data.content);
if (shouldScrollToBottom) {
$window.scrollTop($document.height() - $window.height());
}