app/views/index.erb in tailog-0.1.0 vs app/views/index.erb in tailog-0.1.1
- old
+ new
@@ -20,10 +20,14 @@
}
p:hover {
background: #EEE;
}
+
+ a {
+ display: block;
+ }
</style>
</head>
<body>
<div class="container">
@@ -88,17 +92,30 @@
$window.scrollTop($document.height() - $window.height())
} else {
$(data).appendTo($content);
}
});
- }, 1000);
+ }, 3000);
</script>
<% end %>
<% rescue => error %>
- <div class="alert alert-danger"><%= h error.message %></div>
+ <div class="alert alert-danger">
+ <h4><%= h error.class %>: <%= h error.message %></h4>
+ <% error.backtrace.each do |backtrace| %>
+ <%= h backtrace %><br>
+ <% end %>
+ </div>
<% end %>
+
+ <% else %>
+ <div id="content" class="monospace">
+ <% Dir[File.join Tailog.log_path, '**/*.log'].each do |file| %>
+ <% relative_file = Pathname.new(file).relative_path_from(Pathname.new(Tailog.log_path)) %>
+ <a href="?file=<%= relative_file %>"><%= file %></a>
+ <% end %>
+ </div>
<% end %>
</div> <!-- /container -->
</body>
</html>