good_job 3.14.1 → 3.15.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +31 -0
- data/README.md +1 -1
- data/app/controllers/good_job/application_controller.rb +1 -0
- data/app/controllers/good_job/cron_entries_controller.rb +4 -4
- data/app/controllers/good_job/jobs_controller.rb +4 -4
- data/app/filters/good_job/base_filter.rb +1 -1
- data/app/helpers/good_job/application_helper.rb +11 -2
- data/app/models/good_job/base_execution.rb +44 -0
- data/app/models/good_job/execution.rb +3 -12
- data/app/models/good_job/job.rb +1 -34
- data/app/views/good_job/batches/_jobs.erb +18 -18
- data/app/views/good_job/batches/_table.erb +15 -15
- data/app/views/good_job/batches/index.html.erb +3 -3
- data/app/views/good_job/batches/show.html.erb +4 -4
- data/app/views/good_job/cron_entries/index.html.erb +15 -15
- data/app/views/good_job/cron_entries/show.html.erb +1 -1
- data/app/views/good_job/jobs/_executions.erb +7 -7
- data/app/views/good_job/jobs/_table.erb +29 -29
- data/app/views/good_job/jobs/index.html.erb +3 -3
- data/app/views/good_job/jobs/show.html.erb +14 -14
- data/app/views/good_job/processes/index.html.erb +8 -8
- data/app/views/good_job/shared/_filter.erb +12 -12
- data/app/views/good_job/shared/_navbar.erb +5 -4
- data/config/locales/de.yml +219 -0
- data/config/locales/en.yml +137 -0
- data/config/locales/es.yml +152 -5
- data/config/locales/fr.yml +140 -3
- data/config/locales/nl.yml +138 -1
- data/config/locales/ru.yml +140 -1
- data/config/locales/ua.yml +172 -57
- data/lib/good_job/version.rb +1 -1
- metadata +5 -4
- data/app/models/good_job/active_job_job.rb +0 -11
@@ -1,5 +1,5 @@
|
|
1
1
|
<div class="border-bottom">
|
2
|
-
<h2 class="pt-3 pb-2"
|
2
|
+
<h2 class="pt-3 pb-2"><%= t ".title" %></h2>
|
3
3
|
</div>
|
4
4
|
|
5
5
|
<div class="card my-3">
|
@@ -7,16 +7,16 @@
|
|
7
7
|
<header class="list-group-item bg-light">
|
8
8
|
<div class="row small text-muted text-uppercase align-items-center">
|
9
9
|
<div class="col-12 col-lg-2"></div>
|
10
|
-
<div class="col-6 col-lg-2 d-none d-lg-block"
|
11
|
-
<div class="col-6 col-lg-2 d-none d-lg-block"
|
12
|
-
<div class="col-6 col-lg-2 d-none d-lg-block"
|
13
|
-
<div class="col-6 col-lg-2 d-none d-lg-block"
|
10
|
+
<div class="col-6 col-lg-2 d-none d-lg-block"><%= t "good_job.models.cron.class" %></div>
|
11
|
+
<div class="col-6 col-lg-2 d-none d-lg-block"><%= t "good_job.models.cron.schedule" %></div>
|
12
|
+
<div class="col-6 col-lg-2 d-none d-lg-block"><%= t "good_job.models.cron.next_scheduled" %></div>
|
13
|
+
<div class="col-6 col-lg-2 d-none d-lg-block"><%= t "good_job.models.cron.last_run" %></div>
|
14
14
|
<div class="col text-end">
|
15
15
|
<%= tag.button type: "button", class: "btn btn-sm text-muted", role: "button",
|
16
16
|
data: { bs_toggle: "collapse", bs_target: ".cron-entry-properties" },
|
17
17
|
aria: { expanded: false, controls: @cron_entries.map { |cron_entry| "##{dom_id(cron_entry, 'properties')}" }.join(" ") } do %>
|
18
18
|
<%= render_icon "info" %>
|
19
|
-
<span class="visually-hidden"
|
19
|
+
<span class="visually-hidden"><%= t "good_job.actions.inspect" %></span>
|
20
20
|
<% end %>
|
21
21
|
</div>
|
22
22
|
</div>
|
@@ -30,40 +30,40 @@
|
|
30
30
|
</div>
|
31
31
|
<div class="col-12 col-lg-2 text-wrap"><%= tag.span tag.code(cron_entry.job_class), class: "fs-5 mb-0" %></div>
|
32
32
|
<div class="col-6 col-lg-2 text-wrap">
|
33
|
-
<div class="d-lg-none small text-muted mt-1"
|
33
|
+
<div class="d-lg-none small text-muted mt-1"><%= t "good_job.models.cron.schedule" %></div>
|
34
34
|
<span class="font-monospace fw-bold"><%= cron_entry.schedule %></span>
|
35
35
|
</div>
|
36
36
|
<div class="col-6 col-lg-2 text-wrap small">
|
37
|
-
<div class="d-lg-none small text-muted mt-1"
|
37
|
+
<div class="d-lg-none small text-muted mt-1"><%= t "good_job.models.cron.next_scheduled" %></div>
|
38
38
|
<%= relative_time cron_entry.next_at %>
|
39
39
|
</div>
|
40
40
|
<div class="col-6 col-lg-2 text-wrap small">
|
41
41
|
<% if cron_entry.last_job.present? %>
|
42
|
-
<div class="d-lg-none small text-muted mt-1"
|
42
|
+
<div class="d-lg-none small text-muted mt-1"><%= t "good_job.models.cron.last_run" %></div>
|
43
43
|
<%= link_to relative_time(cron_entry.last_at), cron_entry_path(cron_entry), title: "Job #{cron_entry.last_job.id}" %>
|
44
44
|
<% end %>
|
45
45
|
</div>
|
46
46
|
<div class="col d-flex gap-3 justify-content-end">
|
47
|
-
<%= button_to enqueue_cron_entry_path(cron_entry), method: :post, class: "btn btn-sm btn-outline-primary", form_class: "d-inline-block", aria: { label: "
|
47
|
+
<%= button_to enqueue_cron_entry_path(cron_entry), method: :post, class: "btn btn-sm btn-outline-primary", form_class: "d-inline-block", aria: { label: t("good_job.cron_entries.actions.enqueue") }, title: t("good_job.cron_entries.actions.enqueue"), data: { confirm: t("good_job.cron_entries.actions.confirm_enqueue") } do %>
|
48
48
|
<%= render_icon "skip_forward" %>
|
49
49
|
<% end %>
|
50
50
|
|
51
51
|
<% if cron_entry.enabled? %>
|
52
|
-
<%= button_to disable_cron_entry_path(cron_entry), method: :put, class: "btn btn-sm btn-outline-primary", form_class: "d-inline-block", aria: { label: "
|
52
|
+
<%= button_to disable_cron_entry_path(cron_entry), method: :put, class: "btn btn-sm btn-outline-primary", form_class: "d-inline-block", aria: { label: t("good_job.cron_entries.actions.disable") }, title: t("good_job.cron_entries.actions.disable"), data: { confirm: t("good_job.cron_entries.actions.confirm_disable") } do %>
|
53
53
|
<%= render_icon "pause" %>
|
54
54
|
<% end %>
|
55
55
|
<% else %>
|
56
|
-
<%= button_to enable_cron_entry_path(cron_entry), method: :put, class: "btn btn-sm btn-outline-primary", form_class: "d-inline-block", aria: { label: "
|
56
|
+
<%= button_to enable_cron_entry_path(cron_entry), method: :put, class: "btn btn-sm btn-outline-primary", form_class: "d-inline-block", aria: { label: t("good_job.cron_entries.actions.enable") }, title: t("good_job.cron_entries.actions.enable"), data: { confirm: t("good_job.cron_entries.actions.confirm_enable") } do %>
|
57
57
|
<%= render_icon "play" %>
|
58
58
|
<% end %>
|
59
59
|
<% end %>
|
60
60
|
|
61
61
|
<%= tag.button type: "button", class: "btn btn-sm text-muted", role: "button",
|
62
|
-
title: "
|
62
|
+
title: t("good_job.actions.inspect"),
|
63
63
|
data: { bs_toggle: "collapse", bs_target: "##{dom_id(cron_entry, 'properties')}" },
|
64
64
|
aria: { expanded: false, controls: dom_id(cron_entry, "properties") } do %>
|
65
65
|
<%= render_icon "info" %>
|
66
|
-
<span class="visually-hidden"
|
66
|
+
<span class="visually-hidden"><%= t "good_job.actions.inspect" %></span>
|
67
67
|
<% end %>
|
68
68
|
</div>
|
69
69
|
</div>
|
@@ -74,7 +74,7 @@
|
|
74
74
|
<% end %>
|
75
75
|
<% if @cron_entries.empty? %>
|
76
76
|
<div class="list-group-item py-4 text-center text-muted">
|
77
|
-
|
77
|
+
<%= t ".no_cron_schedules_found" %>
|
78
78
|
</div>
|
79
79
|
<% end %>
|
80
80
|
</div>
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<h5
|
1
|
+
<h5><%=t ".title" %></h5>
|
2
2
|
<div class="card mb-4" data-live-poll-region="executions-table">
|
3
3
|
<div class="list-group list-group-flush">
|
4
4
|
<% executions.each do |execution| %>
|
@@ -10,32 +10,32 @@
|
|
10
10
|
</div>
|
11
11
|
<div class="col-md-2 small">
|
12
12
|
<% if execution.queue_latency %>
|
13
|
-
<%= format_duration execution.queue_latency %> <span class="text-muted"
|
13
|
+
<%= format_duration execution.queue_latency %> <span class="text-muted"><%=t ".in_queue" %></span>
|
14
14
|
<% end %>
|
15
15
|
</div>
|
16
16
|
<div class="col-md-2 small">
|
17
17
|
<% if execution.runtime_latency %>
|
18
|
-
<%= format_duration execution.runtime_latency %> <span class="text-muted"
|
18
|
+
<%= format_duration execution.runtime_latency %> <span class="text-muted"><%=t ".runtime" %></span>
|
19
19
|
<% end %>
|
20
20
|
</div>
|
21
21
|
<div class="col">
|
22
22
|
<div class="d-flex gap-3 align-items-center justify-content-end">
|
23
23
|
<%= tag.span relative_time(execution.last_status_at, include_seconds: true), class: "small" %>
|
24
24
|
<%= status_badge execution.status %>
|
25
|
-
|
25
|
+
|
26
26
|
<%= tag.button type: "button", class: "btn btn-sm text-muted", role: "button",
|
27
|
-
title: "
|
27
|
+
title: t("good_job.actions.inspect"),
|
28
28
|
data: { bs_toggle: "collapse", bs_target: "##{dom_id(execution, 'params')}" },
|
29
29
|
aria: { expanded: false, controls: dom_id(execution, "params") } do %>
|
30
30
|
<%= render_icon "info" %>
|
31
|
-
<span class="visually-hidden"
|
31
|
+
<span class="visually-hidden"><%=t "good_job.actions.inspect" %></span>
|
32
32
|
<% end %>
|
33
33
|
</div>
|
34
34
|
</div>
|
35
35
|
</div>
|
36
36
|
<% if execution.error %>
|
37
37
|
<div class="mt-3 small">
|
38
|
-
<strong class="small"
|
38
|
+
<strong class="small"><%=t ".error" %>:</strong>
|
39
39
|
<code class="text-wrap text-break m-0 text-black"><%= execution.error %></code>
|
40
40
|
</div>
|
41
41
|
<% end %>
|
@@ -4,43 +4,43 @@
|
|
4
4
|
<header class="list-group-item bg-light">
|
5
5
|
<div class="row small text-muted text-uppercase align-items-center">
|
6
6
|
<div class="col-lg-4 d-flex gap-2 flex-wrap">
|
7
|
-
<%= label_tag('toggle_job_ids', "
|
7
|
+
<%= label_tag('toggle_job_ids', t(".toggle_all_jobs"), class: "visually-hidden") %>
|
8
8
|
<%= check_box_tag('toggle_job_ids', "1", false, data: { "checkbox-toggle-all": "job_ids" }) %>
|
9
9
|
|
10
|
-
<%= form.button type: 'submit', name: 'mass_action', value: 'reschedule', class: 'ms-1 btn btn-sm btn-outline-secondary', title: "
|
11
|
-
<span class="me-1"><%= render_icon "skip_forward" %></span>
|
10
|
+
<%= form.button type: 'submit', name: 'mass_action', value: 'reschedule', class: 'ms-1 btn btn-sm btn-outline-secondary', title: t(".actions.reschedule_all"), data: { confirm: t(".actions.confirm_reschedule_all"), disable: true } do %>
|
11
|
+
<span class="me-1"><%= render_icon "skip_forward" %></span> <%=t "good_job.actions.reschedule" %>
|
12
12
|
<% end %>
|
13
13
|
|
14
|
-
<%= form.button type: 'submit', name: 'mass_action', value: 'retry', class: 'btn btn-sm btn-outline-secondary', title: "
|
15
|
-
<span class="me-1"><%= render_icon "arrow_clockwise" %></span>
|
14
|
+
<%= form.button type: 'submit', name: 'mass_action', value: 'retry', class: 'btn btn-sm btn-outline-secondary', title: t(".actions.retry_all"), data: { confirm: t(".actions.confirm_retry_all"), disable: true } do %>
|
15
|
+
<span class="me-1"><%= render_icon "arrow_clockwise" %></span> <%=t "good_job.actions.retry" %>
|
16
16
|
<% end %>
|
17
17
|
|
18
18
|
<div class="btn-group" role="group">
|
19
|
-
<%= form.button type: 'submit', name: 'mass_action', value: 'discard', class: 'btn btn-sm btn-outline-secondary', title: "
|
20
|
-
<span class="me-1"><%= render_icon "stop" %></span>
|
19
|
+
<%= form.button type: 'submit', name: 'mass_action', value: 'discard', class: 'btn btn-sm btn-outline-secondary', title: t(".actions.discard_all"), data: { confirm: t(".actions.confirm_discard_all"), disable: true } do %>
|
20
|
+
<span class="me-1"><%= render_icon "stop" %></span> <%=t "good_job.actions.discard" %>
|
21
21
|
<% end %>
|
22
22
|
<button id="destroy-dropdown-toggle" type="button" class="btn btn-sm btn-outline-secondary dropdown-toggle dropdown-toggle-split" data-bs-toggle="dropdown" aria-expanded="false">
|
23
|
-
<span class="visually-hidden"
|
23
|
+
<span class="visually-hidden"><%=t ".toggle_actions" %></span>
|
24
24
|
</button>
|
25
25
|
<div class="dropdown-menu" aria-labelledby="destroy-dropdown-toggle">
|
26
26
|
<li>
|
27
|
-
<%= form.button type: 'submit', name: 'mass_action', value: 'destroy', class: 'btn', title: "
|
28
|
-
<span class="me-1"><%= render_icon "trash" %></span>
|
27
|
+
<%= form.button type: 'submit', name: 'mass_action', value: 'destroy', class: 'btn', title: t(".actions.destroy_all"), data: { confirm: t(".actions.confirm_destroy_all"), disable: true } do %>
|
28
|
+
<span class="me-1"><%= render_icon "trash" %></span> <%=t "good_job.actions.destroy" %>
|
29
29
|
<% end %>
|
30
30
|
</li>
|
31
31
|
</div>
|
32
32
|
</div>
|
33
33
|
|
34
34
|
</div>
|
35
|
-
<div class="d-none d-lg-block col-lg-1 text-lg-center"
|
36
|
-
<div class="d-none d-lg-block col-lg-1 text-lg-end"
|
37
|
-
<div class="d-none d-lg-block col-lg-1 text-lg-end"
|
35
|
+
<div class="d-none d-lg-block col-lg-1 text-lg-center"><%=t "good_job.models.job.queue" %></div>
|
36
|
+
<div class="d-none d-lg-block col-lg-1 text-lg-end"><%=t "good_job.models.job.priority" %></div>
|
37
|
+
<div class="d-none d-lg-block col-lg-1 text-lg-end"><%=t "good_job.models.job.attempts" %></div>
|
38
38
|
<div class="col text-end">
|
39
39
|
<%= tag.button type: "button", class: "btn btn-sm text-muted", role: "button",
|
40
40
|
data: { bs_toggle: "collapse", bs_target: ".job-params" },
|
41
41
|
aria: { expanded: false, controls: jobs.map { |job| "##{dom_id(job, "params")}" }.join(" ") } do %>
|
42
42
|
<%= render_icon "info" %>
|
43
|
-
<span class="visually-hidden"
|
43
|
+
<span class="visually-hidden"><%=t "good_job.actions.inspect" %></span>
|
44
44
|
<% end %>
|
45
45
|
</div>
|
46
46
|
</div>
|
@@ -51,7 +51,7 @@
|
|
51
51
|
<%= check_box_tag "all_job_ids", 1, false, disabled: true, data: { "checkbox-toggle-show": "job_ids"} %>
|
52
52
|
</div>
|
53
53
|
<div class="col-auto">
|
54
|
-
|
54
|
+
<%=t ".actions.apply_to_all", count: filter.filtered_count %>
|
55
55
|
</div>
|
56
56
|
</div>
|
57
57
|
</label>
|
@@ -68,15 +68,15 @@
|
|
68
68
|
</div>
|
69
69
|
</div>
|
70
70
|
<div class="col-4 col-lg-1 text-lg-center">
|
71
|
-
<div class="d-lg-none small text-muted mt-1"
|
71
|
+
<div class="d-lg-none small text-muted mt-1"><%=t "good_job.models.job.queue" %></div>
|
72
72
|
<span class="badge bg-primary bg-opacity-25 text-dark font-monospace"><%= job.queue_name %></span>
|
73
73
|
</div>
|
74
74
|
<div class="col-4 col-lg-1 text-lg-end">
|
75
|
-
<div class="d-lg-none small text-muted mt-1"
|
75
|
+
<div class="d-lg-none small text-muted mt-1"><%=t "good_job.models.job.priority" %></div>
|
76
76
|
<%= job.priority %>
|
77
77
|
</div>
|
78
78
|
<div class="col-4 col-lg-1 text-lg-end">
|
79
|
-
<div class="d-lg-none small text-muted mt-1"
|
79
|
+
<div class="d-lg-none small text-muted mt-1"><%=t "good_job.models.job.attempts" %></div>
|
80
80
|
<% if job.executions_count > 0 && job.status != :succeeded %>
|
81
81
|
<%= tag.span job.executions_count, class: "badge rounded-pill bg-danger", data: {
|
82
82
|
bs_toggle: "popover",
|
@@ -96,33 +96,33 @@
|
|
96
96
|
<div class="dropdown float-end">
|
97
97
|
<button class="d-flex align-items-center btn btn-sm" type="button" id="<%= dom_id(job, :actions) %>" data-bs-toggle="dropdown" aria-expanded="false">
|
98
98
|
<%= render "good_job/shared/icons/dots" %>
|
99
|
-
<span class="visually-hidden"
|
99
|
+
<span class="visually-hidden"><%=t ".actions.title" %></span>
|
100
100
|
</button>
|
101
101
|
<ul class="dropdown-menu shadow" aria-labelledby="<%= dom_id(job, :actions) %>">
|
102
102
|
<li>
|
103
103
|
<% job_reschedulable = job.status.in? [:scheduled, :retried, :queued] %>
|
104
|
-
<%= link_to reschedule_job_path(job.id), method: :put, class: "dropdown-item #{'disabled' unless job_reschedulable}", title: "
|
104
|
+
<%= link_to reschedule_job_path(job.id), method: :put, class: "dropdown-item #{'disabled' unless job_reschedulable}", title: t("good_job.jobs.actions.reschedule"), data: { confirm: t("good_job.jobs.actions.confirm_reschedule"), disable: true } do %>
|
105
105
|
<%= render "good_job/shared/icons/skip_forward" %>
|
106
|
-
|
106
|
+
<%=t "good_job.actions.reschedule" %>
|
107
107
|
<% end %>
|
108
108
|
</li>
|
109
109
|
<li>
|
110
110
|
<% job_discardable = job.status.in? [:scheduled, :retried, :queued] %>
|
111
|
-
<%= link_to discard_job_path(job.id), method: :put, class: "dropdown-item #{'disabled' unless job_discardable}", title: "
|
111
|
+
<%= link_to discard_job_path(job.id), method: :put, class: "dropdown-item #{'disabled' unless job_discardable}", title: t("good_job.jobs.actions.discard"), data: { confirm: t("good_job.jobs.actions.confirm_discard"), disable: true } do %>
|
112
112
|
<%= render "good_job/shared/icons/stop" %>
|
113
|
-
|
113
|
+
<%=t "good_job.actions.discard" %>
|
114
114
|
<% end %>
|
115
115
|
</li>
|
116
116
|
<li>
|
117
|
-
<%= link_to retry_job_path(job.id), method: :put, class: "dropdown-item #{'disabled' unless job.status == :discarded}", title: "
|
117
|
+
<%= link_to retry_job_path(job.id), method: :put, class: "dropdown-item #{'disabled' unless job.status == :discarded}", title: t("good_job.jobs.actions.retry"), data: { confirm: t("good_job.jobs.actions.confirm_retry"), disable: true } do %>
|
118
118
|
<%= render "good_job/shared/icons/arrow_clockwise" %>
|
119
|
-
|
119
|
+
<%=t "good_job.actions.retry" %>
|
120
120
|
<% end %>
|
121
121
|
</li>
|
122
122
|
<li>
|
123
|
-
<%= link_to job_path(job.id), method: :delete, class: "dropdown-item #{'disabled' unless job.status.in? [:discarded, :succeeded]}", title: "
|
123
|
+
<%= link_to job_path(job.id), method: :delete, class: "dropdown-item #{'disabled' unless job.status.in? [:discarded, :succeeded]}", title: t("good_job.jobs.actions.destroy"), data: { confirm: t("good_job.jobs.actions.confirm_destroy"), disable: true } do %>
|
124
124
|
<%= render_icon "trash" %>
|
125
|
-
|
125
|
+
<%=t "good_job.actions.destroy" %>
|
126
126
|
<% end %>
|
127
127
|
</li>
|
128
128
|
|
@@ -132,7 +132,7 @@
|
|
132
132
|
data: { bs_toggle: "collapse" },
|
133
133
|
aria: { expanded: false, controls: dom_id(job, "params") } do %>
|
134
134
|
<%= render_icon "info" %>
|
135
|
-
|
135
|
+
<%=t "good_job.actions.inspect" %>
|
136
136
|
<% end %>
|
137
137
|
</li>
|
138
138
|
</ul>
|
@@ -147,7 +147,7 @@
|
|
147
147
|
<% end %>
|
148
148
|
<% else %>
|
149
149
|
<div class="list-group-item py-4 text-center text-muted">
|
150
|
-
|
150
|
+
<%=t ".no_jobs_found" %>
|
151
151
|
</div>
|
152
152
|
<% end %>
|
153
153
|
</div>
|
@@ -1,14 +1,14 @@
|
|
1
|
-
<%= render 'good_job/shared/filter', title: "
|
1
|
+
<%= render 'good_job/shared/filter', title: t("good_job.shared.navbar.jobs"), filter: @filter %>
|
2
2
|
<%= render 'good_job/shared/chart', chart_data: GoodJob::ScheduledByQueueChart.new(@filter).data %>
|
3
3
|
|
4
4
|
<div data-live-poll-region="jobs-table">
|
5
5
|
<%= render 'good_job/jobs/table', jobs: @filter.records, filter: @filter %>
|
6
6
|
<% if @filter.records.present? %>
|
7
|
-
<nav aria-label="
|
7
|
+
<nav aria-label="<%= t ".job_pagination" %>" class="mt-3">
|
8
8
|
<ul class="pagination">
|
9
9
|
<li class="page-item">
|
10
10
|
<%= link_to(@filter.to_params(after_scheduled_at: (@filter.last.scheduled_at || @filter.last.created_at), after_id: @filter.last.id), class: "page-link") do %>
|
11
|
-
|
11
|
+
<%= t ".older_jobs" %> <span aria-hidden="true">»</span>
|
12
12
|
<% end %>
|
13
13
|
</li>
|
14
14
|
</ul>
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<div class="pt-2">
|
3
3
|
<nav aria-label="breadcrumb">
|
4
4
|
<ol class="breadcrumb small mb-0">
|
5
|
-
<li class="breadcrumb-item"><%= link_to "
|
5
|
+
<li class="breadcrumb-item"><%= link_to t(".jobs"), jobs_path %></li>
|
6
6
|
<li class="breadcrumb-item active" aria-current="page"><%= tag.code @job.id, class: "text-muted" %></li>
|
7
7
|
</ol>
|
8
8
|
</nav>
|
@@ -11,13 +11,13 @@
|
|
11
11
|
<h2 class="mb-2 mb-md-0"><%= tag.code @job.job_class %></h2>
|
12
12
|
</div>
|
13
13
|
<div class="col-6 col-md-2">
|
14
|
-
<div class="small text-muted text-uppercase"
|
14
|
+
<div class="small text-muted text-uppercase"><%= t "good_job.models.job.queue" %></div>
|
15
15
|
<div class="badge bg-primary bg-opacity-25 text-dark font-monospace my-2">
|
16
16
|
<%= tag.strong @job.queue_name %>
|
17
17
|
</div>
|
18
18
|
</div>
|
19
19
|
<div class="col-6 col-md-2">
|
20
|
-
<div class="small text-muted text-uppercase"
|
20
|
+
<div class="small text-muted text-uppercase"><%= t "good_job.models.job.priority" %></div>
|
21
21
|
<div class="font-monospace fw-bold small my-2"><%= tag.strong @job.priority %></div>
|
22
22
|
</div>
|
23
23
|
<div class="col text-end">
|
@@ -25,32 +25,32 @@
|
|
25
25
|
<%= button_to reschedule_job_path(@job.id), method: :put,
|
26
26
|
class: "btn btn-sm btn-outline-primary",
|
27
27
|
form_class: "d-inline-block",
|
28
|
-
aria: { label: "
|
29
|
-
title: "
|
30
|
-
data: { confirm: "
|
28
|
+
aria: { label: t("good_job.jobs.actions.reschedule") },
|
29
|
+
title: t("good_job.jobs.actions.reschedule"),
|
30
|
+
data: { confirm: t("good_job.jobs.actions.confirm_reschedule") } do %>
|
31
31
|
<%= render_icon "skip_forward" %>
|
32
|
-
|
32
|
+
<%= t "good_job.actions.reschedule" %>
|
33
33
|
<% end %>
|
34
34
|
<% end %>
|
35
35
|
|
36
36
|
<% if @job.status.in? [:scheduled, :retried, :queued] %>
|
37
|
-
<%= button_to discard_job_path(@job.id), method: :put, class: "btn btn-sm btn-outline-primary", form_class: "d-inline-block", aria: { label: "
|
37
|
+
<%= button_to discard_job_path(@job.id), method: :put, class: "btn btn-sm btn-outline-primary", form_class: "d-inline-block", aria: { label: t("good_job.jobs.actions.discard") }, title: t("good_job.jobs.actions.discard"), data: { confirm: t("good_job.jobs.actions.confirm_discard") } do %>
|
38
38
|
<%= render_icon "stop" %>
|
39
|
-
|
39
|
+
<%= t "good_job.actions.discard" %>
|
40
40
|
<% end %>
|
41
41
|
<% end %>
|
42
42
|
|
43
43
|
<% if @job.status == :discarded %>
|
44
|
-
<%= button_to retry_job_path(@job.id), method: :put, class: "btn btn-sm btn-outline-primary", form_class: "d-inline-block", aria: { label: "
|
44
|
+
<%= button_to retry_job_path(@job.id), method: :put, class: "btn btn-sm btn-outline-primary", form_class: "d-inline-block", aria: { label: t("good_job.jobs.actions.retry") }, title: t("good_job.jobs.actions.retry"), data: { confirm: t("good_job.jobs.actions.confirm_retry") } do %>
|
45
45
|
<%= render_icon "arrow_clockwise" %>
|
46
|
-
|
46
|
+
<%= t "good_job.actions.retry" %>
|
47
47
|
<% end %>
|
48
48
|
<% end %>
|
49
49
|
|
50
50
|
<% if @job.status.in? [:discarded, :succeeded] %>
|
51
|
-
<%= button_to job_path(@job.id), method: :delete, class: "btn btn-sm btn-outline-primary", form_class: "d-inline-block", aria: { label: "
|
51
|
+
<%= button_to job_path(@job.id), method: :delete, class: "btn btn-sm btn-outline-primary", form_class: "d-inline-block", aria: { label: t("good_job.jobs.actions.destroy") }, title: t("good_job.jobs.actions.destroy"), data: { confirm: t("good_job.jobs.actions.confirm_destroy") } do %>
|
52
52
|
<%= render_icon "trash" %>
|
53
|
-
|
53
|
+
<%= t "good_job.actions.destroy" %>
|
54
54
|
<% end %>
|
55
55
|
<% end %>
|
56
56
|
</div>
|
@@ -59,7 +59,7 @@
|
|
59
59
|
</div>
|
60
60
|
|
61
61
|
<div class="my-4">
|
62
|
-
<h5
|
62
|
+
<h5><%= t "good_job.models.job.arguments" %></h5>
|
63
63
|
<%= tag.pre @job.serialized_params["arguments"].map(&:inspect).join(', '), class: 'text-wrap text-break' %>
|
64
64
|
</div>
|
65
65
|
|
@@ -1,22 +1,22 @@
|
|
1
1
|
<div class="border-bottom">
|
2
|
-
<h2 class="pt-3 pb-2"
|
2
|
+
<h2 class="pt-3 pb-2"><%= t ".title" %></h2>
|
3
3
|
</div>
|
4
4
|
|
5
5
|
<div class="card my-3" data-live-poll-region="processes">
|
6
6
|
<div class="list-group list-group-flush text-nowrap" role="table">
|
7
7
|
<header class="list-group-item bg-light">
|
8
8
|
<div class="row small text-muted text-uppercase align-items-center">
|
9
|
-
<div class="col"
|
10
|
-
<div class="col"
|
9
|
+
<div class="col"><%= t ".process" %></div>
|
10
|
+
<div class="col"><%= t ".schedulers" %></div>
|
11
11
|
<div class="col-2 d-flex gap-2">
|
12
|
-
<span
|
12
|
+
<span><%= t ".started" %></span>
|
13
13
|
</div>
|
14
14
|
<div class="col-auto">
|
15
15
|
<%= tag.button type: "button", class: "btn btn-sm text-muted ms-auto", role: "button",
|
16
16
|
data: { bs_toggle: "collapse", bs_target: ".process-state" },
|
17
17
|
aria: { expanded: false, controls: @processes.map { |process| "##{dom_id(process, 'state')}" }.join(" ") } do %>
|
18
18
|
<%= render_icon "info" %>
|
19
|
-
<span class="visually-hidden"
|
19
|
+
<span class="visually-hidden"><%= t "good_job.actions.inspect" %></span>
|
20
20
|
<% end %>
|
21
21
|
</div>
|
22
22
|
</div>
|
@@ -44,11 +44,11 @@
|
|
44
44
|
<div class="col-2 small"><%= relative_time(process.created_at) %></div>
|
45
45
|
<div class="col-auto">
|
46
46
|
<%= tag.button type: "button", class: "btn btn-sm text-muted ms-auto", role: "button",
|
47
|
-
title: "
|
47
|
+
title: t("good_job.actions.inspect"),
|
48
48
|
data: { bs_toggle: "collapse", bs_target: "##{dom_id(process, 'state')}" },
|
49
49
|
aria: { expanded: false, controls: dom_id(process, "state") } do %>
|
50
50
|
<%= render_icon "info" %>
|
51
|
-
<span class="visually-hidden"
|
51
|
+
<span class="visually-hidden"><%= t "good_job.actions.inspect" %></span>
|
52
52
|
<% end %>
|
53
53
|
</div>
|
54
54
|
</div>
|
@@ -59,7 +59,7 @@
|
|
59
59
|
<% end %>
|
60
60
|
<% if @processes.empty? %>
|
61
61
|
<div class="list-group-item py-4 text-center text-muted">
|
62
|
-
|
62
|
+
<%= t ".no_good_job_processes_found" %>
|
63
63
|
</div>
|
64
64
|
<% end %>
|
65
65
|
</div>
|
@@ -10,37 +10,37 @@
|
|
10
10
|
<%= hidden_field_tag :locale, params[:locale] if params[:locale] %>
|
11
11
|
<div class="d-md-flex flex-row w-100">
|
12
12
|
<div class="me-md-2 mb-2 mb-md-0">
|
13
|
-
<%= label_tag "job_queue_filter", "
|
13
|
+
<%= label_tag "job_queue_filter", t(".queue_name"), class: "visually-hidden" %>
|
14
14
|
<select name="queue_name" id="job_queue_filter" class="form-select form-select-sm">
|
15
|
-
<option value="" <%= "selected='selected'" if params[:queue_name].blank?
|
15
|
+
<option value="" <%= "selected='selected'" if params[:queue_name].blank? %>><%=t ".all_queues" %></option>
|
16
16
|
|
17
17
|
<% filter.queues.each do |name, count| %>
|
18
|
-
<option value="<%= name.to_param %>" <%= "selected='selected'" if params[:queue_name] == name %>><%= name %> (<%= number_with_delimiter(count,
|
18
|
+
<option value="<%= name.to_param %>" <%= "selected='selected'" if params[:queue_name] == name %>><%= name %> (<%= number_with_delimiter(count, translate_hash('good_job.number.format')) %>)</option>
|
19
19
|
<% end %>
|
20
20
|
</select>
|
21
21
|
</div>
|
22
22
|
|
23
23
|
<div class="me-md-2 mb-2 mb-md-0">
|
24
|
-
<%= label_tag "job_class_filter", "
|
24
|
+
<%= label_tag "job_class_filter", t(".job_name"), class: "visually-hidden" %>
|
25
25
|
<select name="job_class" id="job_class_filter" class="form-select form-select-sm">
|
26
|
-
<option value="" <%= "selected='selected'" if params[:job_class].blank?
|
26
|
+
<option value="" <%= "selected='selected'" if params[:job_class].blank? %>><%=t ".all_jobs" %></option>
|
27
27
|
|
28
28
|
<% filter.job_classes.each do |name, count| %>
|
29
|
-
<option value="<%= name.to_param %>" <%= "selected='selected'" if params[:job_class] == name %>><%= name %> (<%= number_with_delimiter(count,
|
29
|
+
<option value="<%= name.to_param %>" <%= "selected='selected'" if params[:job_class] == name %>><%= name %> (<%= number_with_delimiter(count, translate_hash('good_job.number.format')) %>)</option>
|
30
30
|
<% end %>
|
31
31
|
</select>
|
32
32
|
</div>
|
33
33
|
|
34
34
|
<div class="me-md-2 mb-2 mb-md-0 flex-fill">
|
35
|
-
<%= label_tag "query", "
|
36
|
-
<%= search_field_tag "query", params[:query], class: "form-control form-control-sm", placeholder: "
|
35
|
+
<%= label_tag "query", t(".search"), class: "visually-hidden" %>
|
36
|
+
<%= search_field_tag "query", params[:query], class: "form-control form-control-sm", placeholder: t(".placeholder") %>
|
37
37
|
</div>
|
38
38
|
|
39
39
|
<div class="d-flex flex-col align-items-end">
|
40
40
|
<div>
|
41
|
-
<%= form.submit "
|
41
|
+
<%= form.submit t(".search"), name: nil, class: "btn btn-primary btn-sm" %>
|
42
42
|
<%= link_to filter.to_params(job_class: nil, state: nil, queue_name: nil, query: nil), class: "btn btn-secondary btn-sm" do %>
|
43
|
-
|
43
|
+
<%=t ".clear" %>
|
44
44
|
<% end %>
|
45
45
|
</div>
|
46
46
|
</div>
|
@@ -49,13 +49,13 @@
|
|
49
49
|
|
50
50
|
<ul class="nav nav-tabs my-3">
|
51
51
|
<li class="nav-item">
|
52
|
-
<%= link_to "
|
52
|
+
<%= link_to t(".all"), filter.to_params(state: nil), class: "nav-link #{"active" unless params[:state].present?}" %>
|
53
53
|
</li>
|
54
54
|
|
55
55
|
<% filter.states.each do |name, count| %>
|
56
56
|
<li class="nav-item">
|
57
57
|
<%= link_to filter.to_params(state: name), class: "nav-link #{"active" if params[:state] == name}" do %>
|
58
|
-
<%= t(name, scope: 'good_job.status') %>
|
58
|
+
<%= t(name, scope: 'good_job.status', count: count) %>
|
59
59
|
<span class="badge bg-primary rounded-pill <%= "bg-secondary" if count == 0 %>"><%= number_with_delimiter(count, t('good_job.number.format')) %></span>
|
60
60
|
<% end %>
|
61
61
|
</li>
|
@@ -11,14 +11,14 @@
|
|
11
11
|
<%= link_to jobs_path, class: ["nav-link", ("active" if controller_name == 'jobs')] do %>
|
12
12
|
<%= t(".jobs") %>
|
13
13
|
<% jobs_count = GoodJob::Job.count %>
|
14
|
-
<span class="badge bg-secondary rounded-pill"><%= number_to_human(jobs_count, **
|
14
|
+
<span class="badge bg-secondary rounded-pill"><%= number_to_human(jobs_count, **translate_hash("good_job.number.human.decimal_units")) %></span>
|
15
15
|
<% end %>
|
16
16
|
</li>
|
17
17
|
<li class="nav-item">
|
18
18
|
<%= link_to batches_path, class: ["nav-link", ("active" if controller_name == 'batches')] do %>
|
19
|
-
<%= "
|
19
|
+
<%=t ".batches" %>
|
20
20
|
<% batches_count = GoodJob::BatchRecord.migrated? ? GoodJob::BatchRecord.all.size : 0 %>
|
21
|
-
<span class="badge bg-secondary rounded-pill"><%= number_to_human(batches_count,
|
21
|
+
<span class="badge bg-secondary rounded-pill"><%= number_to_human(batches_count, **translate_hash("good_job.number.human.decimal_units")) %></span>
|
22
22
|
<% end %>
|
23
23
|
</li>
|
24
24
|
<li class="nav-item">
|
@@ -49,7 +49,8 @@
|
|
49
49
|
</a>
|
50
50
|
|
51
51
|
<ul class="dropdown-menu" aria-labelledby="localeOptions">
|
52
|
-
<% I18n.
|
52
|
+
<% possible_locales = I18n.enforce_available_locales ? (good_job_available_locales & I18n.available_locales) : good_job_available_locales %>
|
53
|
+
<% possible_locales.reject { |locale| locale == I18n.locale }.each do |locale| %>
|
53
54
|
<li><%= link_to locale, url_for(locale: locale), class: "dropdown-item" %></li>
|
54
55
|
<% end %>
|
55
56
|
</ul>
|