runit-man 1.10.2 → 1.10.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/i18n/en.yml +1 -0
- data/i18n/ru.yml +1 -0
- data/lib/runit-man/helpers.rb +3 -10
- data/lib/runit-man/service_info.rb +4 -3
- data/lib/runit-man/utils.rb +16 -0
- data/lib/runit-man/version.rb +1 -1
- data/views/log_downloads.erubis +5 -1
- metadata +4 -3
data/i18n/en.yml
CHANGED
data/i18n/ru.yml
CHANGED
data/lib/runit-man/helpers.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
require 'socket'
|
2
1
|
require 'runit-man/service_info'
|
3
2
|
require 'runit-man/partials'
|
3
|
+
require 'runit-man/utils'
|
4
4
|
require 'sinatra/content_for2'
|
5
5
|
|
6
6
|
module Helpers
|
@@ -12,16 +12,9 @@ module Helpers
|
|
12
12
|
attr_accessor :even_or_odd_state
|
13
13
|
|
14
14
|
def host_name
|
15
|
-
|
16
|
-
begin
|
17
|
-
@host_name = Socket.gethostbyname(Socket.gethostname).first
|
18
|
-
rescue
|
19
|
-
@host_name = Socket.gethostname
|
20
|
-
end
|
21
|
-
end
|
22
|
-
@host_name
|
15
|
+
Utils.host_name
|
23
16
|
end
|
24
|
-
|
17
|
+
|
25
18
|
def service_infos
|
26
19
|
ServiceInfo.all
|
27
20
|
end
|
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'runit-man/log_location_cache'
|
2
2
|
require 'runit-man/service_status'
|
3
|
+
require 'runit-man/utils'
|
3
4
|
|
4
5
|
class ServiceInfo
|
5
6
|
SPECIAL_LOG_FILES = %w(lock config state newstate).freeze
|
@@ -121,13 +122,13 @@ class ServiceInfo
|
|
121
122
|
next if SPECIAL_LOG_FILES.include?(name)
|
122
123
|
full_name = File.expand_path(name, dir_name)
|
123
124
|
stats = File.stat(full_name)
|
124
|
-
label = "#{self.name}-#{fl(stats.atime)}-#{fl(stats.mtime)}.log"
|
125
|
+
label = "#{Utils.host_name}-#{self.name}-#{fl(stats.atime.utc)}-#{fl(stats.mtime.utc)}.log"
|
125
126
|
r << {
|
126
127
|
:name => name,
|
127
128
|
:label => label,
|
128
129
|
:size => stats.size,
|
129
|
-
:created => stats.ctime,
|
130
|
-
:modified => stats.mtime
|
130
|
+
:created => stats.ctime.utc,
|
131
|
+
:modified => stats.mtime.utc
|
131
132
|
}
|
132
133
|
end
|
133
134
|
if r.length >= 2
|
data/lib/runit-man/version.rb
CHANGED
data/views/log_downloads.erubis
CHANGED
@@ -2,7 +2,6 @@
|
|
2
2
|
<h2><%= h(name) %></h2>
|
3
3
|
<h3><%= h(t.runit.services.log.downloads) %></h3>
|
4
4
|
<table>
|
5
|
-
<caption><%= h(name + ': ' + t.runit.services.log.downloads) %></caption>
|
6
5
|
<thead>
|
7
6
|
<tr>
|
8
7
|
<th><%= h(t.runit.services.log.modified) %></th>
|
@@ -11,6 +10,11 @@
|
|
11
10
|
<th></th>
|
12
11
|
</tr>
|
13
12
|
</thead>
|
13
|
+
<tfoot>
|
14
|
+
<tr>
|
15
|
+
<td colspan="4"><%= h(t.runit.services.log.about_utc) %></td>
|
16
|
+
</tr>
|
17
|
+
</tfoot>
|
14
18
|
<tbody>
|
15
19
|
<% files.each do |f| %>
|
16
20
|
<tr class="<%= even_or_odd ? 'even' : 'odd' %>">
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: runit-man
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 57
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 10
|
9
|
-
-
|
10
|
-
version: 1.10.
|
9
|
+
- 3
|
10
|
+
version: 1.10.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Akzhan Abdulin
|
@@ -172,6 +172,7 @@ files:
|
|
172
172
|
- lib/runit-man/runner.rb
|
173
173
|
- lib/runit-man/service_info.rb
|
174
174
|
- lib/runit-man/service_status.rb
|
175
|
+
- lib/runit-man/utils.rb
|
175
176
|
- lib/runit-man/version.rb
|
176
177
|
- public/css/runit-man.css
|
177
178
|
- public/css/tripoli.simple.css
|