sidekiq 7.3.7 → 8.0.0.beta1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Changes.md +30 -0
- data/README.md +16 -13
- data/bin/sidekiqload +10 -10
- data/bin/webload +69 -0
- data/lib/active_job/queue_adapters/sidekiq_adapter.rb +5 -18
- data/lib/sidekiq/api.rb +108 -36
- data/lib/sidekiq/capsule.rb +1 -1
- data/lib/sidekiq/cli.rb +15 -19
- data/lib/sidekiq/client.rb +13 -16
- data/lib/sidekiq/component.rb +30 -2
- data/lib/sidekiq/config.rb +18 -15
- data/lib/sidekiq/embedded.rb +1 -0
- data/lib/sidekiq/job/iterable.rb +3 -5
- data/lib/sidekiq/job_retry.rb +2 -2
- data/lib/sidekiq/job_util.rb +5 -1
- data/lib/sidekiq/launcher.rb +1 -1
- data/lib/sidekiq/logger.rb +6 -10
- data/lib/sidekiq/manager.rb +0 -1
- data/lib/sidekiq/metrics/query.rb +1 -3
- data/lib/sidekiq/middleware/current_attributes.rb +5 -17
- data/lib/sidekiq/paginator.rb +14 -1
- data/lib/sidekiq/processor.rb +21 -14
- data/lib/sidekiq/profiler.rb +59 -0
- data/lib/sidekiq/rails.rb +12 -2
- data/lib/sidekiq/redis_client_adapter.rb +0 -1
- data/lib/sidekiq/testing.rb +2 -2
- data/lib/sidekiq/version.rb +2 -2
- data/lib/sidekiq/web/action.rb +101 -85
- data/lib/sidekiq/web/application.rb +339 -333
- data/lib/sidekiq/web/config.rb +116 -0
- data/lib/sidekiq/web/helpers.rb +45 -20
- data/lib/sidekiq/web/router.rb +60 -76
- data/lib/sidekiq/web.rb +51 -156
- data/sidekiq.gemspec +6 -4
- data/web/assets/javascripts/application.js +6 -13
- data/web/assets/javascripts/base-charts.js +30 -18
- data/web/assets/javascripts/dashboard-charts.js +2 -0
- data/web/assets/javascripts/dashboard.js +6 -0
- data/web/assets/javascripts/metrics.js +1 -1
- data/web/assets/stylesheets/style.css +750 -0
- data/web/locales/ar.yml +1 -0
- data/web/locales/cs.yml +1 -0
- data/web/locales/da.yml +1 -0
- data/web/locales/de.yml +1 -0
- data/web/locales/el.yml +1 -0
- data/web/locales/en.yml +9 -0
- data/web/locales/es.yml +24 -2
- data/web/locales/fa.yml +1 -0
- data/web/locales/fr.yml +1 -0
- data/web/locales/gd.yml +1 -0
- data/web/locales/he.yml +1 -0
- data/web/locales/hi.yml +1 -0
- data/web/locales/it.yml +1 -0
- data/web/locales/ja.yml +1 -0
- data/web/locales/ko.yml +1 -0
- data/web/locales/lt.yml +1 -0
- data/web/locales/nb.yml +1 -0
- data/web/locales/nl.yml +1 -0
- data/web/locales/pl.yml +1 -0
- data/web/locales/{pt-br.yml → pt-BR.yml} +2 -1
- data/web/locales/pt.yml +1 -0
- data/web/locales/ru.yml +1 -0
- data/web/locales/sv.yml +1 -0
- data/web/locales/ta.yml +1 -0
- data/web/locales/tr.yml +1 -0
- data/web/locales/uk.yml +1 -0
- data/web/locales/ur.yml +1 -0
- data/web/locales/vi.yml +1 -0
- data/web/locales/{zh-cn.yml → zh-CN.yml} +85 -73
- data/web/locales/{zh-tw.yml → zh-TW.yml} +2 -1
- data/web/views/_footer.erb +31 -34
- data/web/views/_job_info.erb +91 -89
- data/web/views/_metrics_period_select.erb +1 -1
- data/web/views/_nav.erb +14 -21
- data/web/views/_paging.erb +23 -21
- data/web/views/_poll_link.erb +2 -2
- data/web/views/_summary.erb +16 -16
- data/web/views/busy.erb +124 -122
- data/web/views/dashboard.erb +62 -64
- data/web/views/dead.erb +31 -27
- data/web/views/filtering.erb +3 -3
- data/web/views/layout.erb +5 -21
- data/web/views/metrics.erb +83 -80
- data/web/views/metrics_for_job.erb +39 -42
- data/web/views/morgue.erb +61 -70
- data/web/views/profiles.erb +43 -0
- data/web/views/queue.erb +54 -52
- data/web/views/queues.erb +43 -41
- data/web/views/retries.erb +66 -75
- data/web/views/retry.erb +32 -27
- data/web/views/scheduled.erb +58 -54
- data/web/views/scheduled_job_info.erb +1 -1
- metadata +46 -22
- data/web/assets/stylesheets/application-dark.css +0 -147
- data/web/assets/stylesheets/application-rtl.css +0 -163
- data/web/assets/stylesheets/application.css +0 -759
- data/web/assets/stylesheets/bootstrap-rtl.min.css +0 -9
- data/web/assets/stylesheets/bootstrap.css +0 -5
- data/web/views/_status.erb +0 -4
data/web/views/metrics.erb
CHANGED
@@ -2,89 +2,92 @@
|
|
2
2
|
<script type="text/javascript" src="<%= root_path %>javascripts/chartjs-plugin-annotation.min.js" nonce="<%= csp_nonce %>"></script>
|
3
3
|
<script type="text/javascript" src="<%= root_path %>javascripts/base-charts.js" nonce="<%= csp_nonce %>"></script>
|
4
4
|
|
5
|
-
<
|
6
|
-
<
|
7
|
-
<h1
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
<
|
13
|
-
<
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
<%
|
18
|
-
|
19
|
-
|
20
|
-
|
5
|
+
<section>
|
6
|
+
<header>
|
7
|
+
<h1>
|
8
|
+
<%= t('Metrics') %>
|
9
|
+
<a target="blank" href="https://github.com/sidekiq/sidekiq/wiki/Metrics"><span class="info-circle" title="Click to learn more about metrics">?</span></a>
|
10
|
+
</h1>
|
11
|
+
|
12
|
+
<div class="filter">
|
13
|
+
<form id="metrics-form" class="form-inline" action="<%= root_path %>metrics" method="get">
|
14
|
+
<label for="substr"><%= t('Filter') %></label>
|
15
|
+
<input id="class-filter" class="form-control" type="text" name="substr" placeholder="<%= t('Name') %>" value="<%= h url_params("substr") %>">
|
16
|
+
<select id="period-selector" class="form-control" name="period">
|
17
|
+
<% @periods.each_key do |code| %>
|
18
|
+
<% if code == @period %>
|
19
|
+
<option selected value="<%= code %>"><%= code %></option>
|
20
|
+
<% else %>
|
21
|
+
<option value="<%= code %>"><%= code %></option>
|
22
|
+
<% end %>
|
21
23
|
<% end %>
|
22
|
-
|
23
|
-
</
|
24
|
-
</
|
25
|
-
</
|
26
|
-
</div>
|
24
|
+
</select>
|
25
|
+
</form>
|
26
|
+
</div>
|
27
|
+
</header>
|
27
28
|
|
28
|
-
<%
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
%>
|
29
|
+
<%
|
30
|
+
table_limit = 20
|
31
|
+
chart_limit = 5
|
32
|
+
job_results = @query_result.job_results.sort_by { |(kls, jr)| jr.totals["s"] }.reverse.first(table_limit)
|
33
|
+
visible_kls = job_results.first(chart_limit).map(&:first)
|
34
|
+
%>
|
34
35
|
|
35
|
-
<% if job_results.any? %>
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
<% end %>
|
36
|
+
<% if job_results.any? %>
|
37
|
+
<canvas id="job-metrics-overview-chart">
|
38
|
+
<%= to_json({
|
39
|
+
series: job_results.map { |(kls, jr)| [kls, jr.dig("series", "s")] }.to_h,
|
40
|
+
marks: @query_result.marks.map { |m| [m.bucket, m.label] },
|
41
|
+
labels: @query_result.buckets,
|
42
|
+
visibleKls: visible_kls,
|
43
|
+
yLabel: t('TotalExecutionTime'),
|
44
|
+
units: t('Seconds').downcase,
|
45
|
+
markLabel: t('Deploy'),
|
46
|
+
}) %>
|
47
|
+
</canvas>
|
48
|
+
<% end %>
|
48
49
|
|
49
|
-
<div class="table_container">
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
<
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
50
|
+
<div class="table_container">
|
51
|
+
<table>
|
52
|
+
<thead>
|
53
|
+
<tr>
|
54
|
+
<th><%= t('Name') %></th>
|
55
|
+
<th><%= t('Success') %></th>
|
56
|
+
<th><%= t('Failure') %></th>
|
57
|
+
<th><%= t('TotalExecutionTime') %> (<%= t('Seconds') %>)</th>
|
58
|
+
<th><%= t('AvgExecutionTime') %> (<%= t('Seconds') %>)</th>
|
59
|
+
</tr>
|
60
|
+
</thead>
|
61
|
+
<tbody>
|
62
|
+
<% if job_results.any? %>
|
63
|
+
<% job_results.each_with_index do |(kls, jr), i| %>
|
64
|
+
<tr>
|
65
|
+
<td>
|
66
|
+
<div class="metrics-swatch-wrapper">
|
67
|
+
<% id = "metrics-swatch-#{kls}" %>
|
68
|
+
<input
|
69
|
+
type="checkbox"
|
70
|
+
id="<%= id %>"
|
71
|
+
class="metrics-swatch"
|
72
|
+
value="<%= kls %>"
|
73
|
+
<%= visible_kls.include?(kls) ? 'checked' : '' %>
|
74
|
+
/>
|
75
|
+
<code><a href="<%= root_path %>metrics/<%= kls %>?period=<%= @period %>"><%= kls %></a></code>
|
76
|
+
</div>
|
77
|
+
</td>
|
78
|
+
<td class="num"><%= number_with_delimiter(jr.dig("totals", "p") - jr.dig("totals", "f")) %></td>
|
79
|
+
<td class="num"><%= number_with_delimiter(jr.dig("totals", "f")) %></td>
|
80
|
+
<td class="num"><%= number_with_delimiter(jr.dig("totals", "s"), precision: 2) %></td>
|
81
|
+
<td class="num"><%= number_with_delimiter(jr.total_avg("s"), precision: 2) %></td>
|
82
|
+
</tr>
|
83
|
+
<% end %>
|
84
|
+
<% else %>
|
85
|
+
<tr><td colspan=5><%= t("NoDataFound") %></td></tr>
|
80
86
|
<% end %>
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
</tbody>
|
85
|
-
</table>
|
86
|
-
</div>
|
87
|
-
|
88
|
-
<!--p><small>Data from <%= @query_result.starts_at %> to <%= @query_result.ends_at %></small></p-->
|
87
|
+
</tbody>
|
88
|
+
</table>
|
89
|
+
</div>
|
89
90
|
|
90
|
-
|
91
|
+
<!--p><small>Data from <%= @query_result.starts_at %> to <%= @query_result.ends_at %></small></p-->
|
92
|
+
</section>
|
93
|
+
<script type="text/javascript" src="<%= root_path %>javascripts/metrics.js" nonce="<%= csp_nonce %>"></script>
|
@@ -8,52 +8,49 @@
|
|
8
8
|
bucket_labels = Sidekiq::Metrics::Histogram::LABELS
|
9
9
|
bucket_intervals = Sidekiq::Metrics::Histogram::BUCKET_INTERVALS
|
10
10
|
%>
|
11
|
-
|
12
|
-
<% if job_result.totals["s"] > 0 %>
|
13
|
-
|
14
|
-
<div class="page-title-container">
|
11
|
+
<section>
|
12
|
+
<% if job_result.totals["s"] > 0 %>
|
13
|
+
<header>
|
15
14
|
<h1>
|
16
15
|
<a href="<%= root_path %>metrics?period=<%= @period %>"><%= t('Metrics') %></a> /
|
17
16
|
<%= h @name %>
|
17
|
+
<a target="blank" href="https://github.com/sidekiq/sidekiq/wiki/Metrics"><span class="info-circle" title="Click to learn more about metrics">?</span></a>
|
18
18
|
</h1>
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
yUnits: t('Seconds').downcase,
|
45
|
-
zUnits: t('Jobs').downcase,
|
46
|
-
}) %>
|
47
|
-
</canvas>
|
19
|
+
<%= erb :_metrics_period_select, locals: { periods: @periods, period: @period, path: "#{root_path}metrics/#{@name}" } %>
|
20
|
+
</header>
|
21
|
+
|
22
|
+
<canvas id="hist-totals-chart">
|
23
|
+
<%= to_json({
|
24
|
+
series: hist_totals,
|
25
|
+
labels: bucket_labels,
|
26
|
+
xLabel: t('ExecutionTime'),
|
27
|
+
yLabel: t('Jobs'),
|
28
|
+
units: t('Jobs').downcase,
|
29
|
+
}) %>
|
30
|
+
</canvas>
|
31
|
+
|
32
|
+
<canvas id="hist-bubble-chart">
|
33
|
+
<%= to_json({
|
34
|
+
hist: job_result.hist,
|
35
|
+
marks: @query_result.marks.map { |m| [m.bucket, m.label] },
|
36
|
+
labels: @query_result.buckets,
|
37
|
+
histIntervals: bucket_intervals,
|
38
|
+
yLabel: t('ExecutionTime'),
|
39
|
+
markLabel: t('Deploy'),
|
40
|
+
yUnits: t('Seconds').downcase,
|
41
|
+
zUnits: t('Jobs').downcase,
|
42
|
+
}) %>
|
43
|
+
</canvas>
|
48
44
|
|
49
45
|
<!--p><small>Data from <%= @query_result.starts_at %> to <%= @query_result.ends_at %></small></p-->
|
50
|
-
<% else %>
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
46
|
+
<% else %>
|
47
|
+
<header>
|
48
|
+
<h1>
|
49
|
+
<a href="<%= root_path %>/metrics"><%= t('Metrics') %></a> /
|
50
|
+
<%= h @name %>
|
51
|
+
</h1>
|
52
|
+
</header>
|
53
|
+
<div class="alert alert-success"><%= t('NoJobMetricsFound') %></div>
|
54
|
+
<% end %>
|
55
|
+
</section>
|
59
56
|
<script type="text/javascript" src="<%= root_path %>javascripts/metrics.js" nonce="<%= csp_nonce %>"></script>
|
data/web/views/morgue.erb
CHANGED
@@ -1,74 +1,65 @@
|
|
1
|
-
<
|
2
|
-
<
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
<% if @dead.size > 0 %>
|
10
|
-
<form action="<%= root_path %>morgue" method="post">
|
11
|
-
<%= csrf_tag %>
|
12
|
-
<div class="table_container">
|
13
|
-
<table class="table table-striped table-bordered table-hover">
|
14
|
-
<thead>
|
15
|
-
<tr>
|
16
|
-
<th class="table-checkbox checkbox-column">
|
17
|
-
<label>
|
18
|
-
<input type="checkbox" class="check_all" />
|
19
|
-
</label>
|
20
|
-
</th>
|
21
|
-
<th><%= t('LastRetry') %></th>
|
22
|
-
<th><%= t('Queue') %></th>
|
23
|
-
<th><%= t('Job') %></th>
|
24
|
-
<th><%= t('Arguments') %></th>
|
25
|
-
<th><%= t('Error') %></th>
|
26
|
-
</tr>
|
27
|
-
</thead>
|
28
|
-
<% @dead.each do |entry| %>
|
29
|
-
<tr>
|
30
|
-
<td class="table-checkbox">
|
31
|
-
<label>
|
32
|
-
<input type='checkbox' name='key[]' value='<%= job_params(entry.item, entry.score) %>' class='shift_clickable' />
|
33
|
-
</label>
|
34
|
-
</td>
|
35
|
-
<td>
|
36
|
-
<a href="<%= root_path %>morgue/<%= job_params(entry.item, entry.score) %>"><%= relative_time(entry.at) %></a>
|
37
|
-
</td>
|
38
|
-
<td>
|
39
|
-
<a href="<%= root_path %>queues/<%= entry.queue %>"><%= entry.queue %></a>
|
40
|
-
</td>
|
41
|
-
<td>
|
42
|
-
<%= entry.display_class %>
|
43
|
-
<%= display_tags(entry, "dead") %>
|
44
|
-
</td>
|
45
|
-
<td>
|
46
|
-
<div class="args"><%= display_args(entry.display_args) %></div>
|
47
|
-
</td>
|
48
|
-
<td>
|
49
|
-
<% if entry.error? %>
|
50
|
-
<div><%= h truncate("#{entry['error_class']}: #{entry['error_message']}", 200) %></div>
|
51
|
-
<% end %>
|
52
|
-
</td>
|
53
|
-
</tr>
|
54
|
-
<% end %>
|
55
|
-
</table>
|
56
|
-
</div>
|
57
|
-
<input class="btn btn-primary pull-left flip" type="submit" name="retry" value="<%= t('RetryNow') %>" />
|
58
|
-
<input class="btn btn-danger pull-left flip" type="submit" name="delete" value="<%= t('Delete') %>" />
|
59
|
-
</form>
|
1
|
+
<section>
|
2
|
+
<header>
|
3
|
+
<h1><%= t('DeadJobs') %></h1>
|
4
|
+
<% if @dead.size > 0 && @total_size > @count %>
|
5
|
+
<%= erb :_paging, locals: { url: "#{root_path}morgue" } %>
|
6
|
+
<% end %>
|
7
|
+
<%= filtering('morgue') %>
|
8
|
+
</header>
|
60
9
|
|
61
|
-
<%
|
62
|
-
<form action="<%= root_path %>morgue
|
63
|
-
<%= csrf_tag %>
|
64
|
-
<input class="btn btn-danger pull-right flip" type="submit" name="delete" value="<%= t('DeleteAll') %>" data-confirm="<%= t('AreYouSure') %>" />
|
65
|
-
</form>
|
66
|
-
<form action="<%= root_path %>morgue/all/retry" method="post">
|
10
|
+
<% if @dead.size > 0 %>
|
11
|
+
<form action="<%= root_path %>morgue" method="post">
|
67
12
|
<%= csrf_tag %>
|
68
|
-
<
|
13
|
+
<div class="table_container">
|
14
|
+
<table>
|
15
|
+
<thead>
|
16
|
+
<tr>
|
17
|
+
<th>
|
18
|
+
<label>
|
19
|
+
<input type="checkbox" class="check_all" />
|
20
|
+
</label>
|
21
|
+
</th>
|
22
|
+
<th><%= t('LastRetry') %></th>
|
23
|
+
<th><%= t('Queue') %></th>
|
24
|
+
<th><%= t('Job') %></th>
|
25
|
+
<th><%= t('Arguments') %></th>
|
26
|
+
<th><%= t('Error') %></th>
|
27
|
+
</tr>
|
28
|
+
</thead>
|
29
|
+
<% @dead.each do |entry| %>
|
30
|
+
<tr>
|
31
|
+
<td>
|
32
|
+
<label>
|
33
|
+
<input type='checkbox' name='key[]' value='<%= job_params(entry.item, entry.score) %>' class='shift_clickable' />
|
34
|
+
</label>
|
35
|
+
</td>
|
36
|
+
<td>
|
37
|
+
<a href="<%= root_path %>morgue/<%= job_params(entry.item, entry.score) %>"><%= relative_time(entry.at) %></a>
|
38
|
+
</td>
|
39
|
+
<td>
|
40
|
+
<a href="<%= root_path %>queues/<%= entry.queue %>"><%= entry.queue %></a>
|
41
|
+
</td>
|
42
|
+
<td>
|
43
|
+
<%= entry.display_class %>
|
44
|
+
<%= display_tags(entry, "morgue") %>
|
45
|
+
</td>
|
46
|
+
<td>
|
47
|
+
<div class="args"><%= display_args(entry.display_args) %></div>
|
48
|
+
</td>
|
49
|
+
<td>
|
50
|
+
<% if entry.error? %>
|
51
|
+
<div><a href="<%= root_path %>morgue/<%= job_params(entry.item, entry.score) %>"><%= h truncate("#{entry['error_class']}: #{entry['error_message']}", 200) %></a></div>
|
52
|
+
<% end %>
|
53
|
+
</td>
|
54
|
+
</tr>
|
55
|
+
<% end %>
|
56
|
+
</table>
|
57
|
+
</div>
|
58
|
+
<input class="btn btn-primary pull-left flip" type="submit" name="retry" value="<%= t('RetryNow') %>" />
|
59
|
+
<input class="btn btn-danger pull-left flip" type="submit" name="delete" value="<%= t('Delete') %>" />
|
69
60
|
</form>
|
70
|
-
<% end %>
|
71
61
|
|
72
|
-
<% else %>
|
73
|
-
|
74
|
-
<% end %>
|
62
|
+
<% else %>
|
63
|
+
<div class="alert alert-success"><%= t('NoDeadJobsFound') %></div>
|
64
|
+
<% end %>
|
65
|
+
</section>
|
@@ -0,0 +1,43 @@
|
|
1
|
+
<section>
|
2
|
+
<header>
|
3
|
+
<h1>
|
4
|
+
<%= t('Profiles') %>
|
5
|
+
<a target="blank" href="https://github.com/sidekiq/sidekiq/wiki/Profiling"><span class="info-circle" title="Click to learn more about profiling">?</span></a>
|
6
|
+
</h1>
|
7
|
+
</header>
|
8
|
+
|
9
|
+
<% @profiles = Sidekiq::ProfileSet.new %>
|
10
|
+
<% if @profiles.size > 0 %>
|
11
|
+
<div class="table_container">
|
12
|
+
<table>
|
13
|
+
<thead>
|
14
|
+
<th><%= t('CreatedAt') %></th>
|
15
|
+
<th><%= t('Type') %></th>
|
16
|
+
<th><%= t('JID') %></th>
|
17
|
+
<th><%= t('Token') %></th>
|
18
|
+
<th><%= t('Size') %></th>
|
19
|
+
<th><%= t('ElapsedTime') %></th>
|
20
|
+
<th> </th>
|
21
|
+
</thead>
|
22
|
+
<% @profiles.each do |record| %>
|
23
|
+
<tr>
|
24
|
+
<td><%= relative_time(record.started_at) %></td>
|
25
|
+
<td><%= record.type %> </td>
|
26
|
+
<td><%= record.jid %> </td>
|
27
|
+
<td><%= record.token %> </td>
|
28
|
+
<td><%= format_memory(record.size / 1024) %> </td>
|
29
|
+
<td><%= number_with_delimiter(record.elapsed, precision: 2) %> </td>
|
30
|
+
<td>
|
31
|
+
<% if config[:profile_store_url] %>
|
32
|
+
<a target="_blank" class="btn" href="<%= root_path %>profiles/<%= CGI.escape(record.key) %>"><%= t("View") %></a>
|
33
|
+
<% end %>
|
34
|
+
<a class="btn" href="<%= root_path %>profiles/<%= CGI.escape(record.key) %>/data"><%= t("Data") %></a>
|
35
|
+
</td>
|
36
|
+
</tr>
|
37
|
+
<% end %>
|
38
|
+
</table>
|
39
|
+
</div>
|
40
|
+
<% else %>
|
41
|
+
<div class="alert alert-success"><%= t('NoDataFound') %></div>
|
42
|
+
<% end %>
|
43
|
+
</section>
|
data/web/views/queue.erb
CHANGED
@@ -1,55 +1,57 @@
|
|
1
|
-
<
|
2
|
-
<
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
1
|
+
<section>
|
2
|
+
<header>
|
3
|
+
<h1><%= t('CurrentMessagesInQueue', :queue => h(@name)) %>
|
4
|
+
<% if @queue.paused? %>
|
5
|
+
<span class="label label-danger"><%= t('Paused') %></span>
|
6
|
+
<% end %>
|
7
|
+
<span class="badge badge-secondary"><%= number_with_delimiter(@total_size) %></span>
|
8
|
+
</h1>
|
9
|
+
<%= erb :_paging, locals: { url: "#{root_path}queues/#{CGI.escape(@name)}" } %>
|
10
|
+
</header>
|
10
11
|
|
11
|
-
<div class="table_container">
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
<% else %>
|
25
|
-
<td><%= @total_size - (@count * (@current_page - 1) + index) %></td>
|
26
|
-
<% end %>
|
27
|
-
<td>
|
28
|
-
<%= h(job.display_class) %>
|
29
|
-
<%= display_tags(job, nil) %>
|
30
|
-
</td>
|
31
|
-
<td>
|
32
|
-
<% a = job.display_args %>
|
33
|
-
<% if a.inspect.size > 100 %>
|
34
|
-
<span id="job_<%= index %>"><%= h(a.inspect[0..100]) + "... " %></span>
|
35
|
-
<button data-toggle="job_<%= index %>_full" class="btn btn-default btn-xs"><%= t('ShowAll') %></button>
|
36
|
-
<div class="toggle" id="job_<%= index %>_full"><%= display_args(a) %></div>
|
12
|
+
<div class="table_container">
|
13
|
+
<table>
|
14
|
+
<thead>
|
15
|
+
<th><a href="<%= url %>?direction=<%= url_params("direction") == 'asc' ? 'desc' : 'asc' %>"># <%= sort_direction_label %></a></th>
|
16
|
+
<th><%= t('Job') %></th>
|
17
|
+
<th><%= t('Arguments') %></th>
|
18
|
+
<th><%= t('Context') %></th>
|
19
|
+
<th><%= t('Actions') %></th>
|
20
|
+
</thead>
|
21
|
+
<% @jobs.each_with_index do |job, index| %>
|
22
|
+
<tr title="<%= job.jid %>">
|
23
|
+
<% if url_params("direction") == 'asc' %>
|
24
|
+
<td><%= @count * (@current_page - 1) + index + 1 %></td>
|
37
25
|
<% else %>
|
38
|
-
|
26
|
+
<td><%= @total_size - (@count * (@current_page - 1) + index) %></td>
|
39
27
|
<% end %>
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
<%=
|
28
|
+
<td>
|
29
|
+
<%= h(job.display_class) %>
|
30
|
+
<%= display_tags(job, nil) %>
|
31
|
+
</td>
|
32
|
+
<td>
|
33
|
+
<% a = job.display_args %>
|
34
|
+
<% if a.inspect.size > 100 %>
|
35
|
+
<span id="job_<%= index %>"><%= h(a.inspect[0..100]) + "... " %></span>
|
36
|
+
<button data-toggle="job_<%= index %>_full" class="btn btn-default btn-xs"><%= t('ShowAll') %></button>
|
37
|
+
<div class="toggle" id="job_<%= index %>_full"><%= display_args(a) %></div>
|
38
|
+
<% else %>
|
39
|
+
<code><%= display_args(job.display_args) %></code>
|
40
|
+
<% end %>
|
41
|
+
</td>
|
42
|
+
<td>
|
43
|
+
<%= h(job["cattr"].inspect) if job["cattr"]&.any? %>
|
44
|
+
</td>
|
45
|
+
<td>
|
46
|
+
<form action="<%= root_path %>queues/<%= CGI.escape(@name) %>/delete" method="post">
|
47
|
+
<%= csrf_tag %>
|
48
|
+
<input name="key_val" value="<%= h job.value %>" type="hidden" />
|
49
|
+
<input class="btn btn-danger" type="submit" name="delete" value="<%= t('Delete') %>" data-confirm="<%= t('AreYouSure') %>" />
|
50
|
+
</form>
|
51
|
+
</td>
|
52
|
+
</tr>
|
53
|
+
<% end %>
|
54
|
+
</table>
|
55
|
+
</div>
|
56
|
+
<%= erb :_paging, locals: { url: "#{root_path}queues/#{CGI.escape(@name)}" } %>
|
57
|
+
</section>
|