lib/sidekiq/statistic/views/worker.erb in sidekiq-statistic-1.2.0 vs lib/sidekiq/statistic/views/worker.erb in sidekiq-statistic-1.4.0
- old
+ new
@@ -13,11 +13,11 @@
</ul>
<div class="statistic__container live-reload">
<div class="statistic__table">
<div class='statistic__datepicker'>
- <%= t('InformationTable') %>: <input id='datepicker_from' />
+ <%= t('Start') %>: <input id='datepicker_from' />
<%= t('End') %>: <input id='datepicker_to' />
</div>
<h2><%= t('WorkerTablePerDay') %></h2>
<div class="table_container">
@@ -27,19 +27,19 @@
<th><%= t('LastRun') %></th>
<th><%= t('Success') %></th>
<th><%= t('Failure') %></th>
<th><%= t('Total') %></th>
<th><%= t('TimeSec') %></th>
- <th><%= t('Average_Sec') %></th>
+ <th><%= t('AverageSec') %></th>
<th><%= t('MinTimeSec') %></th>
<th><%= t('MaxTimeSec') %></th>
<th><%= t('LastJobStatus') %></th>
</thead>
<% @worker_statistic.each do |worker| %>
<tr>
- <td class="worker"><%= formate_date worker[:date], '%e %B %Y' %></td>
- <td class="worker"><%= formate_date worker[:runtime][:last] %></td>
+ <td class="worker"><%= format_date worker[:date] %></td>
+ <td class="worker"><%= format_date worker[:runtime][:last], 'datetime' %></td>
<td class="worker"><%= worker[:success] %></td>
<td class="worker"><%= worker[:failure] %></td>
<td class="worker"><%= worker[:total] %></td>
<td class="worker"><%= worker[:runtime][:total] %></td>
<td class="worker"><%= worker[:runtime][:average] %></td>
@@ -51,12 +51,20 @@
</table>
</div>
</div>
<div class="statistic__log">
- <input type='text' name='' id='statistic__search' value='' placeholder='Search text in log file'/>
- <% @worker_log.each do |line| %>
- <p class="statistic__i"><%= line %></p>
+ <input type="text" id="statistic__search" placeholder="<%= t('SearchLogs') %>" />
+
+ <% if @worker_log.empty? %>
+ <%= t('EmptyLogs') %>
+ <p>
+ <small><%= Sidekiq::Statistic.configuration.log_file %></small>
+ </p>
+ <% else %>
+ <% @worker_log.each do |line| %>
+ <p class="statistic__i"><%= line %></p>
+ <% end %>
<% end %>
</div>
</div>
</div>