2014-03-06 21:30:11 -08:00
<div class="row header">
2021-02-18 16:28:44 -08:00
<div class="col-sm-4 pull-left flip">
<h3><%= t('Status') %></h3>
</div>
</div>
2021-05-03 12:51:16 -07:00
<div class="stats-wrapper">
2021-02-18 16:28:44 -08:00
<div class="stats-container">
<div class="stat">
<h3><%= s = processes.size; number_with_delimiter(s) %></h3>
<p><%= t('Processes') %></p>
</div>
<div class="stat">
<h3><%= x = processes.total_concurrency; number_with_delimiter(x) %></h3>
<p><%= t('Threads') %></p>
</div>
<div class="stat">
2022-03-03 12:37:25 -08:00
<h3><%= ws = workset.size; number_with_delimiter(ws) %></h3>
2021-02-18 16:28:44 -08:00
<p><%= t('Busy') %></p>
</div>
<div class="stat">
<h3><%= x == 0 ? 0 : ((ws / x.to_f) * 100).round(0) %>%</h3>
<p><%= t('Utilization') %></p>
</div>
<div class="stat">
<h3><%= format_memory(processes.total_rss) %></h3>
<p><%= t('RSS') %></p>
</div>
</div>
</div>
<div class="row header">
<div class="col-sm-4 pull-left flip">
2014-03-06 21:30:11 -08:00
<h3><%= t('Processes') %></h3>
</div>
2021-02-18 16:28:44 -08:00
<div class="col-sm-3 pull-right flip">
2016-08-04 11:18:07 -04:00
<form method="POST" class="warning-messages">
2015-07-06 15:52:41 -07:00
<%= csrf_tag %>
2017-03-16 13:51:29 -07:00
<div class="btn-group pull-right flip">
2016-04-20 19:23:41 -07:00
<button class="btn btn-warn" type="submit" name="quiet" value="1" data-confirm="<%= t('AreYouSure') %>"><%= t('QuietAll') %></button>
<button class="btn btn-danger" type="submit" name="stop" value="1" data-confirm="<%= t('AreYouSure') %>"><%= t('StopAll') %></button>
2014-05-15 21:12:44 -07:00
</div>
</form>
</div>
</div>
2015-05-14 02:48:17 +03:00
<div class="table_container">
2020-08-25 09:31:05 -07:00
<table class="processes table table-hover table-bordered table-striped">
2015-05-14 02:48:17 +03:00
<thead>
<th><%= t('Name') %></th>
<th><%= t('Started') %></th>
2022-03-30 16:00:56 +02:00
<th class="col-sm-1"><%= t('RSS') %><a target="blank" href="https://github.com/mperham/sidekiq/wiki/Memory#rss"><span class="info-circle" title="Click to learn more about RSS">?</span></a></th>
2021-02-18 16:28:44 -08:00
<th class="col-sm-1"><%= t('Threads') %></th>
<th class="col-sm-1"><%= t('Busy') %></th>
2015-05-14 02:48:17 +03:00
<th> </th>
</thead>
2017-05-26 10:35:19 -07:00
<% lead = processes.leader %>
2022-07-14 21:46:52 +02:00
<% sorted_processes.each do |process| %>
2015-05-14 02:48:17 +03:00
<tr>
2016-08-04 11:18:07 -04:00
<td class="box">
2015-05-14 02:48:17 +03:00
<%= "#{process['hostname']}:#{process['pid']}" %>
<span class="label label-success"><%= process.tag %></span>
<% process.labels.each do |label| %>
<span class="label label-info"><%= label %></span>
<% end %>
2016-01-07 16:39:57 -05:00
<% if process.stopping? %>
2017-05-26 10:25:32 -07:00
<span class="label label-danger">quiet</span>
<% end %>
2017-05-26 10:35:19 -07:00
<% if process.identity == lead %>
2017-05-26 10:25:32 -07:00
<span class="label label-warning">leader</span>
2016-01-07 16:40:34 -05:00
<% end %>
2015-05-14 02:48:17 +03:00
<br>
<b><%= "#{t('Queues')}: " %></b>
2021-06-03 10:02:48 -07:00
<%= process.queues.join(", ") %>
2015-05-14 02:48:17 +03:00
</td>
<td><%= relative_time(Time.at(process['started_at'])) %></td>
2020-10-14 15:09:50 -07:00
<td><%= format_memory(process['rss'].to_i) %></td>
2015-05-14 02:48:17 +03:00
<td><%= process['concurrency'] %></td>
<td><%= process['busy'] %></td>
<td>
2021-02-18 16:28:44 -08:00
<form method="POST">
2021-04-06 23:00:37 -05:00
<%= csrf_tag %>
<input type="hidden" name="identity" value="<%= process['identity'] %>"/>
2021-02-18 16:28:44 -08:00
<div class="btn-group pull-right flip">
2021-06-22 09:59:09 -07:00
<% unless process.stopping? %><button class="btn btn-xs btn-warn" type="submit" name="quiet" value="1"><%= t('Quiet') %></button><% end %>
<button class="btn btn-xs btn-danger" type="submit" name="stop" value="1"><%= t('Stop') %></button>
2021-02-18 16:28:44 -08:00
</div>
</form>
2015-05-14 02:48:17 +03:00
</td>
</tr>
<% end %>
</table>
</div>
2014-03-06 21:30:11 -08:00
<div class="row header">
<div class="col-sm-7">
<h3><%= t('Jobs') %></h3>
</div>
</div>
2015-05-14 02:48:17 +03:00
<div class="table_container">
2020-08-25 09:31:05 -07:00
<table class="workers table table-hover table-bordered table-striped">
2015-05-14 02:48:17 +03:00
<thead>
<th><%= t('Process') %></th>
<th><%= t('TID') %></th>
<th><%= t('JID') %></th>
<th><%= t('Queue') %></th>
<th><%= t('Job') %></th>
<th><%= t('Arguments') %></th>
<th><%= t('Started') %></th>
</thead>
2022-03-03 12:37:25 -08:00
<% workset.each do |process, thread, msg| %>
2021-08-19 13:07:47 -07:00
<% job = Sidekiq::JobRecord.new(msg['payload']) %>
2015-05-14 02:48:17 +03:00
<tr>
<td><%= process %></td>
<td><%= thread %></td>
<td><%= job.jid %></td>
<td>
<a href="<%= root_path %>queues/<%= msg['queue'] %>"><%= msg['queue'] %></a>
</td>
2019-09-22 00:03:59 +03:00
<td>
<%= job.display_class %>
2019-09-23 14:52:15 -07:00
<%= display_tags(job, nil) %>
2019-09-22 00:03:59 +03:00
</td>
2015-05-14 02:48:17 +03:00
<td>
<div class="args"><%= display_args(job.display_args) %></div>
</td>
<td><%= relative_time(Time.at(msg['run_at'])) %></td>
</tr>
<% end %>
</table>
</div>