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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2f4bbe82b52a7fdf5f9d754e5088dc99bd453ea3
4
- data.tar.gz: 5719525299be253ab1063c4f7fd57006f1efcc4d
3
+ metadata.gz: 841c8ef5da7bab87b34f2f7f5c7937c177aae71c
4
+ data.tar.gz: 85b2c056f8df7364ed7c1676344c5718bd4d138e
5
5
  SHA512:
6
- metadata.gz: 332005270de07797549a15cdafa1aa879c71a4cd6fdda163c749cf08cc5ec9bdfbe1663f9aaf013c6d329bc847460035a1291381285831456f57dd39a4577cb8
7
- data.tar.gz: 8b759620f2b55557ff262ac263a1d5bb86ee1c5aa756d3790633dbfc044110f36f675efd411cf095b9c3c4b8f21c86ec4fddaf0acb7c46ca399e4ced65967e21
6
+ metadata.gz: 4c5463cd1b82ba4e2937dcc21f18aeea48d8952c62df8c5b7e7a125a13302e23f28fcb0fe24956b74edda8c5a5d8b2cc1f93587c51bf003d6be4b475c748f5e1
7
+ data.tar.gz: 125bcb76f356bd2ee3508d7497dfb7639d31be64d8625d38f40a2047c3b0fd01cba5e7b3c0c27c2dbb95196b5804ef820a3fe2251f97f8be9a2de9973830f762
@@ -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 %>
@@ -114,7 +114,7 @@
114
114
 
115
115
  var instanceId = data.instance_id;
116
116
  if (discovered.indexOf(instanceId) < 0) {
117
- totalEstimate += currentTries * 2 + 2;
117
+ totalEstimate += currentTries + 3;
118
118
  discovered.push(instanceId);
119
119
 
120
120
  $content
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]
@@ -1,3 +1,3 @@
1
1
  module Tailog
2
- VERSION = "0.6.4"
2
+ VERSION = "0.6.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tailog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.4
4
+ version: 0.6.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - bbtfr