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.
Files changed (100) hide show
  1. checksums.yaml +4 -4
  2. data/Changes.md +30 -0
  3. data/README.md +16 -13
  4. data/bin/sidekiqload +10 -10
  5. data/bin/webload +69 -0
  6. data/lib/active_job/queue_adapters/sidekiq_adapter.rb +5 -18
  7. data/lib/sidekiq/api.rb +108 -36
  8. data/lib/sidekiq/capsule.rb +1 -1
  9. data/lib/sidekiq/cli.rb +15 -19
  10. data/lib/sidekiq/client.rb +13 -16
  11. data/lib/sidekiq/component.rb +30 -2
  12. data/lib/sidekiq/config.rb +18 -15
  13. data/lib/sidekiq/embedded.rb +1 -0
  14. data/lib/sidekiq/job/iterable.rb +3 -5
  15. data/lib/sidekiq/job_retry.rb +2 -2
  16. data/lib/sidekiq/job_util.rb +5 -1
  17. data/lib/sidekiq/launcher.rb +1 -1
  18. data/lib/sidekiq/logger.rb +6 -10
  19. data/lib/sidekiq/manager.rb +0 -1
  20. data/lib/sidekiq/metrics/query.rb +1 -3
  21. data/lib/sidekiq/middleware/current_attributes.rb +5 -17
  22. data/lib/sidekiq/paginator.rb +14 -1
  23. data/lib/sidekiq/processor.rb +21 -14
  24. data/lib/sidekiq/profiler.rb +59 -0
  25. data/lib/sidekiq/rails.rb +12 -2
  26. data/lib/sidekiq/redis_client_adapter.rb +0 -1
  27. data/lib/sidekiq/testing.rb +2 -2
  28. data/lib/sidekiq/version.rb +2 -2
  29. data/lib/sidekiq/web/action.rb +101 -85
  30. data/lib/sidekiq/web/application.rb +339 -333
  31. data/lib/sidekiq/web/config.rb +116 -0
  32. data/lib/sidekiq/web/helpers.rb +45 -20
  33. data/lib/sidekiq/web/router.rb +60 -76
  34. data/lib/sidekiq/web.rb +51 -156
  35. data/sidekiq.gemspec +6 -4
  36. data/web/assets/javascripts/application.js +6 -13
  37. data/web/assets/javascripts/base-charts.js +30 -18
  38. data/web/assets/javascripts/dashboard-charts.js +2 -0
  39. data/web/assets/javascripts/dashboard.js +6 -0
  40. data/web/assets/javascripts/metrics.js +1 -1
  41. data/web/assets/stylesheets/style.css +750 -0
  42. data/web/locales/ar.yml +1 -0
  43. data/web/locales/cs.yml +1 -0
  44. data/web/locales/da.yml +1 -0
  45. data/web/locales/de.yml +1 -0
  46. data/web/locales/el.yml +1 -0
  47. data/web/locales/en.yml +9 -0
  48. data/web/locales/es.yml +24 -2
  49. data/web/locales/fa.yml +1 -0
  50. data/web/locales/fr.yml +1 -0
  51. data/web/locales/gd.yml +1 -0
  52. data/web/locales/he.yml +1 -0
  53. data/web/locales/hi.yml +1 -0
  54. data/web/locales/it.yml +1 -0
  55. data/web/locales/ja.yml +1 -0
  56. data/web/locales/ko.yml +1 -0
  57. data/web/locales/lt.yml +1 -0
  58. data/web/locales/nb.yml +1 -0
  59. data/web/locales/nl.yml +1 -0
  60. data/web/locales/pl.yml +1 -0
  61. data/web/locales/{pt-br.yml → pt-BR.yml} +2 -1
  62. data/web/locales/pt.yml +1 -0
  63. data/web/locales/ru.yml +1 -0
  64. data/web/locales/sv.yml +1 -0
  65. data/web/locales/ta.yml +1 -0
  66. data/web/locales/tr.yml +1 -0
  67. data/web/locales/uk.yml +1 -0
  68. data/web/locales/ur.yml +1 -0
  69. data/web/locales/vi.yml +1 -0
  70. data/web/locales/{zh-cn.yml → zh-CN.yml} +85 -73
  71. data/web/locales/{zh-tw.yml → zh-TW.yml} +2 -1
  72. data/web/views/_footer.erb +31 -34
  73. data/web/views/_job_info.erb +91 -89
  74. data/web/views/_metrics_period_select.erb +1 -1
  75. data/web/views/_nav.erb +14 -21
  76. data/web/views/_paging.erb +23 -21
  77. data/web/views/_poll_link.erb +2 -2
  78. data/web/views/_summary.erb +16 -16
  79. data/web/views/busy.erb +124 -122
  80. data/web/views/dashboard.erb +62 -64
  81. data/web/views/dead.erb +31 -27
  82. data/web/views/filtering.erb +3 -3
  83. data/web/views/layout.erb +5 -21
  84. data/web/views/metrics.erb +83 -80
  85. data/web/views/metrics_for_job.erb +39 -42
  86. data/web/views/morgue.erb +61 -70
  87. data/web/views/profiles.erb +43 -0
  88. data/web/views/queue.erb +54 -52
  89. data/web/views/queues.erb +43 -41
  90. data/web/views/retries.erb +66 -75
  91. data/web/views/retry.erb +32 -27
  92. data/web/views/scheduled.erb +58 -54
  93. data/web/views/scheduled_job_info.erb +1 -1
  94. metadata +46 -22
  95. data/web/assets/stylesheets/application-dark.css +0 -147
  96. data/web/assets/stylesheets/application-rtl.css +0 -163
  97. data/web/assets/stylesheets/application.css +0 -759
  98. data/web/assets/stylesheets/bootstrap-rtl.min.css +0 -9
  99. data/web/assets/stylesheets/bootstrap.css +0 -5
  100. data/web/views/_status.erb +0 -4
data/web/views/busy.erb CHANGED
@@ -1,148 +1,150 @@
1
- <div class="header-container">
2
- <h1><%= t('Status') %></h1>
3
- </div>
1
+ <section>
2
+ <header>
3
+ <h1><%= t('Status') %></h1>
4
+ </header>
4
5
 
5
- <div class="stats-wrapper">
6
- <div class="stats-container">
7
- <div class="stat">
6
+ <div class="cards-container">
7
+ <article>
8
8
  <h3><%= s = processes.size; number_with_delimiter(s) %></h3>
9
9
  <p><%= t('Processes') %></p>
10
- </div>
11
- <div class="stat">
10
+ </article>
11
+ <article>
12
12
  <h3><%= x = processes.total_concurrency; number_with_delimiter(x) %></h3>
13
13
  <p><%= t('Threads') %></p>
14
- </div>
15
- <div class="stat">
14
+ </article>
15
+ <article>
16
16
  <h3><%= ws = workset.size; number_with_delimiter(ws) %></h3>
17
17
  <p><%= t('Busy') %></p>
18
- </div>
19
- <div class="stat">
18
+ </article>
19
+ <article>
20
20
  <h3><%= x == 0 ? 0 : ((ws / x.to_f) * 100).round(0) %>%</h3>
21
21
  <p><%= t('Utilization') %></p>
22
- </div>
23
- <div class="stat">
22
+ </article>
23
+ <article>
24
24
  <h3><%= format_memory(processes.total_rss) %></h3>
25
25
  <p><%= t('RSS') %></p>
26
- </div>
26
+ </article>
27
27
  </div>
28
- </div>
28
+ </section>
29
29
 
30
- <div class="header-container">
31
- <h1><%= t('Processes') %></h1>
32
- <div>
33
- <form method="POST" class="warning-messages">
30
+ <section>
31
+ <header>
32
+ <h2><%= t('Processes') %></h2>
33
+ <form method="POST" class="filter warning-messages">
34
34
  <%= csrf_tag %>
35
35
  <div class="btn-group pull-right flip">
36
36
  <input class="btn btn-warn" type="submit" name="quiet" value="<%= t('QuietAll') %>" data-confirm="<%= t('AreYouSure') %>"/>
37
37
  <input class="btn btn-danger" type="submit" name="stop" value="<%= t('StopAll') %>" data-confirm="<%= t('AreYouSure') %>"/>
38
38
  </div>
39
39
  </form>
40
- </div>
41
- </div>
40
+ </header>
42
41
 
43
- <div class="table_container">
44
- <table class="processes table table-hover table-bordered table-striped">
45
- <thead>
46
- <th><%= t('Name') %></th>
47
- <th><%= t('Started') %></th>
48
- <th class="col-sm-1"><%= t('RSS') %><a target="blank" href="https://github.com/sidekiq/sidekiq/wiki/Memory#rss"><span class="info-circle" title="Click to learn more about RSS">?</span></a></th>
49
- <th class="col-sm-1"><%= t('Threads') %></th>
50
- <th class="col-sm-1"><%= t('Busy') %></th>
51
- <th>&nbsp;</th>
52
- </thead>
53
- <% lead = processes.leader %>
54
- <% sorted_processes.each do |process| %>
55
- <tr>
56
- <td class="box">
57
- <%= "#{process['hostname']}:#{process['pid']}" %>
58
- <span class="label label-success"><%= process.tag %></span>
59
- <% process.labels.each do |label| %>
60
- <span class="label label-info"><%= label %></span>
61
- <% end %>
62
- <% if process.embedded? %>
63
- <span class="label label-default">embedded</span>
64
- <% end %>
65
- <% if process.stopping? %>
66
- <span class="label label-danger">quiet</span>
67
- <% end %>
68
- <% if process.identity == lead %>
69
- <span class="label label-warning">leader</span>
70
- <% end %>
71
- <br>
72
- <b><%= "#{t('Queues')}: " %></b>
73
- <% if process.weights %>
74
- <%= busy_weights(process.weights) %>
75
- <% else %>
76
- <%= process.queues.sort.join(", ") %>
77
- <% end %>
78
- <% if process.version != Sidekiq::VERSION %>
42
+ <div class="table_container">
43
+ <table>
44
+ <thead>
45
+ <th><%= t('Name') %></th>
46
+ <th><%= t('Started') %></th>
47
+ <th class="col-sm-1"><%= t('RSS') %><a target="blank" href="https://github.com/sidekiq/sidekiq/wiki/Memory#rss"><span class="info-circle" title="Click to learn more about RSS">?</span></a></th>
48
+ <th class="col-sm-1"><%= t('Threads') %></th>
49
+ <th class="col-sm-1"><%= t('Busy') %></th>
50
+ <th>&nbsp;</th>
51
+ </thead>
52
+ <% lead = processes.leader %>
53
+ <% sorted_processes.each do |process| %>
54
+ <tr>
55
+ <td class="box">
56
+ <%= "#{process['hostname']}:#{process['pid']}" %>
57
+ <span class="label label-success"><%= process.tag %></span>
58
+ <% process.labels.each do |label| %>
59
+ <span class="label label-info"><%= label %></span>
60
+ <% end %>
61
+ <% if process.embedded? %>
62
+ <span class="label label-default">embedded</span>
63
+ <% end %>
64
+ <% if process.stopping? %>
65
+ <span class="label label-danger">quiet</span>
66
+ <% end %>
67
+ <% if process.identity == lead %>
68
+ <span class="label label-warning">leader</span>
69
+ <% end %>
79
70
  <br>
80
- <b><%= "#{t('Version')}: " %></b>
81
- <% if process.version %>
82
- <%= process.version %>
71
+ <b><%= "#{t('Queues')}: " %></b>
72
+ <% if process.weights %>
73
+ <%= busy_weights(process.weights) %>
83
74
  <% else %>
84
- <%= t('Unknown') %>
75
+ <%= process.queues.sort.join(", ") %>
85
76
  <% end %>
86
- <% end %>
87
- </td>
88
- <td><%= relative_time(Time.at(process['started_at'])) %></td>
89
- <td class="num"><%= format_memory(process['rss'].to_i) %></td>
90
- <td class="num"><%= number_with_delimiter(process['concurrency']) %></td>
91
- <td class="num"><%= number_with_delimiter(process['busy']) %></td>
92
- <td>
93
- <% unless process.embedded? %>
94
- <form method="POST">
95
- <%= csrf_tag %>
96
- <input type="hidden" name="identity" value="<%= process['identity'] %>"/>
97
-
98
- <div class="btn-group pull-right flip">
99
- <% unless process.stopping? %><button class="btn btn-xs btn-warn" type="submit" name="quiet" value="1"><%= t('Quiet') %></button><% end %>
100
- <button class="btn btn-xs btn-danger" type="submit" name="stop" value="1"><%= t('Stop') %></button>
101
- </div>
102
- </form>
103
- <% end %>
104
- </td>
105
- </tr>
106
- <% end %>
107
- </table>
108
- </div>
77
+ <% if process.version != Sidekiq::VERSION %>
78
+ <br>
79
+ <b><%= "#{t('Version')}: " %></b>
80
+ <% if process.version %>
81
+ <%= process.version %>
82
+ <% else %>
83
+ <%= t('Unknown') %>
84
+ <% end %>
85
+ <% end %>
86
+ </td>
87
+ <td><%= relative_time(Time.at(process['started_at'])) %></td>
88
+ <td class="num"><%= format_memory(process['rss'].to_i) %></td>
89
+ <td class="num"><%= number_with_delimiter(process['concurrency']) %></td>
90
+ <td class="num"><%= number_with_delimiter(process['busy']) %></td>
91
+ <td>
92
+ <% unless process.embedded? %>
93
+ <form method="POST">
94
+ <%= csrf_tag %>
95
+ <input type="hidden" name="identity" value="<%= process['identity'] %>"/>
109
96
 
110
- <div class="header-container">
111
- <h1><%= t('Jobs') %></h1>
112
- <% if @workset.size > 0 && @total_size > @count %>
113
- <%= erb :_paging, locals: { url: "#{root_path}busy" } %>
114
- <% end %>
115
- </div>
97
+ <div class="btn-group">
98
+ <% unless process.stopping? %><button class="btn btn-warn" type="submit" name="quiet" value="1"><%= t('Quiet') %></button><% end %>
99
+ <button class="btn btn-danger" type="submit" name="stop" value="1"><%= t('Stop') %></button>
100
+ </div>
101
+ </form>
102
+ <% end %>
103
+ </td>
104
+ </tr>
105
+ <% end %>
106
+ </table>
107
+ </div>
108
+ </section>
116
109
 
117
- <div class="table_container">
118
- <table class="workers table table-hover table-bordered table-striped">
119
- <thead>
120
- <th><%= t('Process') %></th>
121
- <th><%= t('TID') %></th>
122
- <th><%= t('JID') %></th>
123
- <th><%= t('Queue') %></th>
124
- <th><%= t('Job') %></th>
125
- <th><%= t('Arguments') %></th>
126
- <th><%= t('Started') %></th>
127
- </thead>
128
- <% @workset.each do |process, thread, work| %>
129
- <% job = work.job %>
130
- <tr>
131
- <td><%= process %></td>
132
- <td><%= thread %></td>
133
- <td><%= job.jid %></td>
134
- <td>
135
- <a href="<%= root_path %>queues/<%= work.queue %>"><%= work.queue %></a>
136
- </td>
137
- <td>
138
- <%= job.display_class %>
139
- <%= display_tags(job, nil) %>
140
- </td>
141
- <td>
142
- <div class="args"><%= display_args(job.display_args) %></div>
143
- </td>
144
- <td><%= relative_time(work.run_at) %></td>
145
- </tr>
110
+ <section>
111
+ <header>
112
+ <h2><%= t('Jobs') %></h2>
113
+ <% if @workset.size > 0 && @total_size > @count %>
114
+ <%= erb :_paging, locals: { url: "#{root_path}busy" } %>
146
115
  <% end %>
147
- </table>
148
- </div>
116
+ </header>
117
+
118
+ <div class="table_container">
119
+ <table>
120
+ <thead>
121
+ <th><%= t('Process') %></th>
122
+ <th><%= t('TID') %></th>
123
+ <th><%= t('JID') %></th>
124
+ <th><%= t('Queue') %></th>
125
+ <th><%= t('Job') %></th>
126
+ <th><%= t('Arguments') %></th>
127
+ <th><%= t('Started') %></th>
128
+ </thead>
129
+ <% @workset.each do |process, thread, work| %>
130
+ <% job = work.job %>
131
+ <tr>
132
+ <td><%= process %></td>
133
+ <td><%= thread %></td>
134
+ <td><%= job.jid %></td>
135
+ <td>
136
+ <a href="<%= root_path %>queues/<%= work.queue %>"><%= work.queue %></a>
137
+ </td>
138
+ <td>
139
+ <%= job.display_class %>
140
+ <%= display_tags(job, nil) %>
141
+ </td>
142
+ <td>
143
+ <code><div class="args"><%= display_args(job.display_args) %></div></code>
144
+ </td>
145
+ <td><%= relative_time(work.run_at) %></td>
146
+ </tr>
147
+ <% end %>
148
+ </table>
149
+ </div>
150
+ </section>
@@ -1,48 +1,51 @@
1
1
  <script type="text/javascript" src="<%= root_path %>javascripts/dashboard.js" nonce="<%= csp_nonce %>"></script>
2
- <div class= "dashboard clearfix">
3
- <h3 >
4
- <%= t('Dashboard') %>
5
- <span id="beacon" class="beacon">
6
- <span class="ring"></span>
7
- <span class="dot"></span>
8
- </span>
9
- </h3>
10
- <div class="interval-slider ltr">
11
- <span class="interval-slider-label"><%= t('PollingInterval') %>:</span>
12
- <span id="sldr-text" class="current-interval">5 s</span>
13
- <br/>
14
- <input id="sldr" type="range" min="2000" max="20000" step="1000" value="5000"/>
15
- </div>
16
- </div>
17
2
 
18
- <div class="row chart">
19
- <canvas id="realtime-chart">
20
- <%= to_json({
21
- processedLabel: t('Processed'),
22
- failedLabel: t('Failed'),
23
- labels: Array.new(50, ""),
24
- processed: Array.new(50),
25
- failed: Array.new(50),
26
- updateUrl: "#{root_path}stats",
27
- }) %>
28
- </canvas>
3
+ <section>
4
+ <header>
5
+ <h1>
6
+ <%= t('Dashboard') %>
7
+ <span id="beacon" class="beacon"></span>
8
+ </h1>
9
+ <div class="filter interval-slider">
10
+ <span class="interval-slider-label"><%= t('PollingInterval') %>:</span>
11
+ <span id="sldr-text" class="current-interval">5 s</span>
12
+ <br/>
13
+ <input id="sldr" aria-label="<%= t("PollingIntervalMilliseconds") %>" role="slider" type="range" min="2000" max="20000" step="1000" value="5000"/>
14
+ </div>
15
+ </header>
29
16
 
30
- <!-- start with a space in the legend so the height doesn't change when we add content dynamically -->
31
- <div id="realtime-legend">&nbsp;</div>
32
- </div>
17
+ <div class="chart">
18
+ <span id="sr-last-dashboard-update-template" hidden="hidden"><%= t("LastDashboardUpdateTemplateLiteral") %></span>
19
+ <span id="sr-last-dashboard-update" class="sr-only" role="status"></span>
33
20
 
34
- <div class="row header">
35
- <div class="col-sm-4 pull-left flip">
36
- <h3><%= t('History') %></h3>
37
- </div>
38
- </div>
39
- <div class="row chart">
40
- <div>
41
- <a href="<%= root_path %>?days=7" class="history-graph <%= "active" if params[:days] == "7" %>"><%= t('OneWeek') %></a>
42
- <a href="<%= root_path %>" class="history-graph <%= "active" if params[:days].nil? || params[:days] == "30" %>"><%= t('OneMonth') %></a>
43
- <a href="<%= root_path %>?days=90" class="history-graph <%= "active" if params[:days] == "90" %>"><%= t('ThreeMonths') %></a>
44
- <a href="<%= root_path %>?days=180" class="history-graph <%= "active" if params[:days] == "180" %>"><%= t('SixMonths') %></a>
21
+ <canvas id="realtime-chart">
22
+ <%= to_json({
23
+ processedLabel: t('Processed'),
24
+ failedLabel: t('Failed'),
25
+ labels: Array.new(50, ""),
26
+ processed: Array.new(50),
27
+ failed: Array.new(50),
28
+ updateUrl: "#{root_path}stats",
29
+ }) %>
30
+ </canvas>
31
+
32
+ <!-- start with a space in the legend so the height doesn't change when we add content dynamically -->
33
+ <div id="realtime-legend">&nbsp;</div>
45
34
  </div>
35
+ </section>
36
+
37
+ <section>
38
+ <header>
39
+ <h2><%= t('History') %></h2>
40
+
41
+ <div class="filter">
42
+ <% d = url_params("days") %>
43
+ <a href="<%= root_path %>?days=7" class="history-graph <%= "active" if d == "7" %>"><%= t('OneWeek') %></a>
44
+ <a href="<%= root_path %>" class="history-graph <%= "active" if d.nil? || d == "30" %>"><%= t('OneMonth') %></a>
45
+ <a href="<%= root_path %>?days=90" class="history-graph <%= "active" if d == "90" %>"><%= t('ThreeMonths') %></a>
46
+ <a href="<%= root_path %>?days=180" class="history-graph <%= "active" if d == "180" %>"><%= t('SixMonths') %></a>
47
+ </div>
48
+ </header>
46
49
 
47
50
  <canvas id="history-chart">
48
51
  <%= to_json({
@@ -52,52 +55,47 @@
52
55
  failed: @failed_history.to_a.reverse,
53
56
  }) %>
54
57
  </canvas>
55
- </div>
58
+ </section>
56
59
 
57
- <br/>
58
- <div class="row header">
59
- <div class="col-sm-4 pull-left flip">
60
- <h3>Redis</h3>
61
- </div>
62
- </div>
63
- <div class="stats-wrapper">
64
- <div class="stats-container">
65
- <% if @redis_info.fetch("redis_version", nil) %>
66
- <div class="stat">
67
- <h3 id="redis_version"><%= @redis_info.fetch("redis_version") %></h3>
68
- <p><%= t('Version') %></p>
69
- </div>
70
- <% end %>
60
+ <section>
61
+ <header>
62
+ <h2><%= store_name %></h2>
63
+ </header>
64
+ <div class="cards-container">
65
+ <article>
66
+ <h3 id="redis_version"><%= store_version %></h3>
67
+ <p><%= t('Version') %></p>
68
+ </article>
71
69
 
72
70
  <% if @redis_info.fetch("uptime_in_days", nil) %>
73
- <div class="stat">
71
+ <article>
74
72
  <h3 id="uptime_in_days"><%= @redis_info.fetch("uptime_in_days") %></h3>
75
73
  <p><%= t('Uptime') %></p>
76
- </div>
74
+ </article>
77
75
  <% end %>
78
76
 
79
77
  <% if @redis_info.fetch("connected_clients", nil) %>
80
- <div class="stat">
78
+ <article>
81
79
  <h3 id="connected_clients"><%= @redis_info.fetch("connected_clients") %></h3>
82
80
  <p><%= t('Connections') %></p>
83
- </div>
81
+ </article>
84
82
  <% end %>
85
83
 
86
84
  <% if @redis_info.fetch("used_memory_human", nil) %>
87
- <div class="stat">
85
+ <article>
88
86
  <h3 id="used_memory_human"><%= @redis_info.fetch("used_memory_human") %></h3>
89
87
  <p><%= t('MemoryUsage') %></p>
90
- </div>
88
+ </article>
91
89
  <% end %>
92
90
 
93
91
  <% if @redis_info.fetch("used_memory_peak_human", nil) %>
94
- <div class="stat">
92
+ <article>
95
93
  <h3 id="used_memory_peak_human"><%= @redis_info.fetch("used_memory_peak_human") %></h3>
96
94
  <p><%= t('PeakMemoryUsage') %></p>
97
- </div>
95
+ </article>
98
96
  <% end %>
99
97
  </div>
100
- </div>
98
+ </section>
101
99
 
102
100
  <script type="text/javascript" src="<%= root_path %>javascripts/chart.min.js" nonce="<%= csp_nonce %>"></script>
103
101
  <script type="text/javascript" src="<%= root_path %>javascripts/chartjs-plugin-annotation.min.js" nonce="<%= csp_nonce %>"></script>
data/web/views/dead.erb CHANGED
@@ -1,34 +1,38 @@
1
1
  <%= erb :_job_info, locals: { job: @dead, type: :dead } %>
2
2
 
3
- <h3><%= t('Error') %></h3>
4
- <div class="table_container">
5
- <table class="error table table-bordered table-striped table-hover">
6
- <tbody>
7
- <tr>
8
- <th><%= t('ErrorClass') %></th>
9
- <td>
10
- <code><%= @dead['error_class'] %></code>
11
- </td>
12
- </tr>
13
- <tr>
14
- <th><%= t('ErrorMessage') %></th>
15
- <td><%= h(@dead['error_message']) %></td>
16
- </tr>
17
- <% if @dead.error_backtrace %>
3
+ <section>
4
+ <header>
5
+ <h1><%= t('Error') %></h1>
6
+ </header>
7
+ <div class="table_container">
8
+ <table>
9
+ <tbody>
18
10
  <tr>
19
- <th><%= t('ErrorBacktrace') %></th>
11
+ <th><%= t('ErrorClass') %></th>
20
12
  <td>
21
- <code><%= @dead.error_backtrace.join("<br/>") %></code>
13
+ <code><%= @dead['error_class'] %></code>
22
14
  </td>
23
15
  </tr>
24
- <% end %>
25
- </tbody>
26
- </table>
27
- </div>
16
+ <tr>
17
+ <th><%= t('ErrorMessage') %></th>
18
+ <td><%= h(@dead['error_message']) %></td>
19
+ </tr>
20
+ <% if @dead.error_backtrace %>
21
+ <tr>
22
+ <th><%= t('ErrorBacktrace') %></th>
23
+ <td>
24
+ <code><%= @dead.error_backtrace.join("<br/>") %></code>
25
+ </td>
26
+ </tr>
27
+ <% end %>
28
+ </tbody>
29
+ </table>
30
+ </div>
28
31
 
29
- <form class="form-horizontal" action="<%= root_path %>morgue/<%= job_params(@dead, @dead.score) %>" method="post">
30
- <%= csrf_tag %>
31
- <a class="btn btn-default" href="<%= root_path %>morgue"><%= t('GoBack') %></a>
32
- <input class="btn btn-primary" type="submit" name="retry" value="<%= t('RetryNow') %>" />
33
- <input class="btn btn-danger" type="submit" name="delete" value="<%= t('Delete') %>" />
34
- </form>
32
+ <form action="<%= root_path %>morgue/<%= job_params(@dead, @dead.score) %>" method="post">
33
+ <%= csrf_tag %>
34
+ <a class="btn btn-default" href="<%= root_path %>morgue"><%= t('GoBack') %></a>
35
+ <input class="btn btn-primary" type="submit" name="retry" value="<%= t('RetryNow') %>" />
36
+ <input class="btn btn-danger" type="submit" name="delete" value="<%= t('Delete') %>" />
37
+ </form>
38
+ </section>
@@ -1,6 +1,6 @@
1
- <div>
2
- <form method="get" class="form-inline" action='<%= root_path %><%= which %>'>
1
+ <div class="filter">
2
+ <form role="search" method="get" class="form-inline" action='<%= root_path %><%= which %>'>
3
3
  <label for="substr"><%= t('Filter') %></label>
4
- <input class="search form-control" type="search" name="substr" value="<%= h params[:substr] %>" placeholder="<%= t('AnyJobContent') %>"/>
4
+ <input class="form-control" type="search" name="substr" value="<%= h url_params("substr") %>" placeholder="<%= t('AnyJobContent') %>"/>
5
5
  </form>
6
6
  </div>
data/web/views/layout.erb CHANGED
@@ -5,16 +5,7 @@
5
5
  <meta charset="utf-8" />
6
6
  <meta name="viewport" content="width=device-width,initial-scale=1.0" />
7
7
 
8
- <link href="<%= root_path %>stylesheets/bootstrap.css" media="screen" rel="stylesheet" type="text/css" nonce="<%= csp_nonce %>" />
9
- <% if rtl? %>
10
- <link href="<%= root_path %>stylesheets/bootstrap-rtl.min.css" media="screen" rel="stylesheet" type="text/css" nonce="<%= csp_nonce %>"/>
11
- <% end %>
12
-
13
- <link href="<%= root_path %>stylesheets/application.css" media="screen" rel="stylesheet" type="text/css" nonce="<%= csp_nonce %>" />
14
- <link href="<%= root_path %>stylesheets/application-dark.css" media="screen and (prefers-color-scheme: dark)" rel="stylesheet" type="text/css" nonce="<%= csp_nonce %>" />
15
- <% if rtl? %>
16
- <link href="<%= root_path %>stylesheets/application-rtl.css" media="screen" rel="stylesheet" type="text/css" nonce="<%= csp_nonce %>" />
17
- <% end %>
8
+ <link href="<%= root_path %>stylesheets/style.css" media="screen" rel="stylesheet" type="text/css" nonce="<%= csp_nonce %>" />
18
9
 
19
10
  <link rel="apple-touch-icon" href="<%= root_path %>images/apple-touch-icon.png">
20
11
  <link rel="shortcut icon" type="image/ico" href="<%= root_path %>images/favicon.ico" />
@@ -24,19 +15,12 @@
24
15
  </head>
25
16
  <body class="admin" data-locale="<%= locale %>">
26
17
  <%= erb :_nav %>
27
- <div id="page">
18
+ <main id="page">
28
19
  <div class="container">
29
- <div class="row">
30
- <div class="col-sm-12 summary_bar">
31
- <%= erb :_summary %>
32
- </div>
33
-
34
- <div class="col-sm-12">
35
- <%= yield %>
36
- </div>
37
- </div>
20
+ <%= erb :_summary %>
21
+ <%= yield %>
38
22
  </div>
39
- </div>
23
+ </main>
40
24
  <%= erb :_footer %>
41
25
  </body>
42
26
  </html>