tailog 0.6.4 → 0.6.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/views/logs/index.erb +3 -0
- data/app/views/script/index.erb +1 -1
- data/lib/tailog.rb +9 -0
- data/lib/tailog/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 841c8ef5da7bab87b34f2f7f5c7937c177aae71c
|
4
|
+
data.tar.gz: 85b2c056f8df7364ed7c1676344c5718bd4d138e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c5463cd1b82ba4e2937dcc21f18aeea48d8952c62df8c5b7e7a125a13302e23f28fcb0fe24956b74edda8c5a5d8b2cc1f93587c51bf003d6be4b475c748f5e1
|
7
|
+
data.tar.gz: 125bcb76f356bd2ee3508d7497dfb7639d31be64d8625d38f40a2047c3b0fd01cba5e7b3c0c27c2dbb95196b5804ef820a3fe2251f97f8be9a2de9973830f762
|
data/app/views/logs/index.erb
CHANGED
@@ -167,6 +167,9 @@
|
|
167
167
|
<tr>
|
168
168
|
<td>
|
169
169
|
<a href="?file=<%= relative_file %>"><%= file %></a>
|
170
|
+
<a href="logs/download?file=<%= relative_file %>" download>
|
171
|
+
<span class="glyphicon glyphicon-download-alt"></span>
|
172
|
+
</a>
|
170
173
|
</td>
|
171
174
|
<td>
|
172
175
|
<%= stat.size.to_filesize %>
|
data/app/views/script/index.erb
CHANGED
data/lib/tailog.rb
CHANGED
@@ -47,6 +47,15 @@ module Tailog
|
|
47
47
|
erb :'logs/index'
|
48
48
|
end
|
49
49
|
|
50
|
+
get '/logs/download' do
|
51
|
+
begin
|
52
|
+
file_path = File.join Tailog.log_path, params[:file]
|
53
|
+
send_file file_path
|
54
|
+
rescue => error
|
55
|
+
content = erb :error, locals: { error: error }, layout: false
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
50
59
|
post '/logs' do
|
51
60
|
begin
|
52
61
|
file_path = File.join Tailog.log_path, params[:file]
|
data/lib/tailog/version.rb
CHANGED