good_job 2.12.2 → 2.13.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8d56e35eff62e8575f9096bcbc763978c0803d675232bf7aa939a0603434f6c6
4
- data.tar.gz: aec46224383849afe2b9ba93d245f70674f4af85765bfd804bb23f528229fd6d
3
+ metadata.gz: 1c154bb21bc4a390c8e7f488e3a110dace697b660585d67cf66fcc21a1ebbeeb
4
+ data.tar.gz: ba8d453f1eb4b9086534710a4bb7e5f29e2e497a1051e3be7aefa21b8c9a3164
5
5
  SHA512:
6
- metadata.gz: 1f6d42db1f03b01f19eef705ff88acff1a93d5f1802df2c6240109c2178fe39f68733b3648799ebe186375166c39ec1fe04388c4fe61d06708d52c520023e685
7
- data.tar.gz: 2b64a3237f6f77d3e1a890e040aa20daf48efc92c461960e0a005f27d734a3639b0a0a10cdc0b4793ec962bac0c68a988ddc89779a83e10210e977c901a30cd1
6
+ metadata.gz: f4344deb0fb76ad2ed78b1d0898aa7521fbab371c08ec6b59f2fd5dec4283723fc3cfe11d8af3acd891d7d6a44c586869c31e1f0106de6ca0ec09da1eee9e345
7
+ data.tar.gz: bfb185dc98b9cc33e4562b6b641f179a32d57dcedd92622ca2334e79566f4d6876d55771425a5760e9bb14f06bee6ddad37067f97df887659c12acb1f25d34fc
data/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## [v2.13.0](https://github.com/bensheldon/good_job/tree/v2.13.0) (2022-04-19)
4
+
5
+ [Full Changelog](https://github.com/bensheldon/good_job/compare/v2.12.2...v2.13.0)
6
+
7
+ **Implemented enhancements:**
8
+
9
+ - Dashboard UI updates: sticky navbar, statuses as tabs [\#572](https://github.com/bensheldon/good_job/pull/572) ([bkeepers](https://github.com/bkeepers))
10
+
11
+ **Closed issues:**
12
+
13
+ - Internationalize/I18n the Dashboard Engine [\#408](https://github.com/bensheldon/good_job/issues/408)
14
+
15
+ **Merged pull requests:**
16
+
17
+ - Fix Russian translation linting [\#573](https://github.com/bensheldon/good_job/pull/573) ([bensheldon](https://github.com/bensheldon))
18
+
3
19
  ## [v2.12.2](https://github.com/bensheldon/good_job/tree/v2.12.2) (2022-04-18)
4
20
 
5
21
  [Full Changelog](https://github.com/bensheldon/good_job/compare/v2.12.1...v2.12.2)
@@ -24,7 +24,9 @@
24
24
  height: 200px;
25
25
  }
26
26
 
27
- body {
28
- /* Make room for the sticky footer */
29
- margin-bottom: 100px;
27
+ /* Break out of a container */
28
+ .break-out {
29
+ width:100vw;
30
+ position:relative;
31
+ left:calc(-1 * (100vw - 100%)/2);
30
32
  }
@@ -1,4 +1,6 @@
1
- <h1 class="mb-3">Cron Entry Key: <code><%= @cron_entry.id %></code></h1>
1
+ <% title = capture do %>
2
+ Cron Entry Key: <code><%= @cron_entry.id %></code>
3
+ <% end %>
2
4
 
3
- <%= render 'good_job/shared/filter', filter: @jobs_filter %>
5
+ <%= render 'good_job/shared/filter', title: title, filter: @jobs_filter %>
4
6
  <%= render 'good_job/jobs/table', jobs: @jobs_filter.records %>
@@ -1,6 +1,6 @@
1
- <div class="card my-3" data-gj-poll-replace id="executions-table">
1
+ <div class="my-3" data-gj-poll-replace id="executions-table">
2
2
  <div class="table-responsive">
3
- <table class="table card-table table-bordered table-hover table-sm mb-0" id="executions_index_table">
3
+ <table class="table table-hover table-sm mb-0" id="executions_index_table">
4
4
  <thead>
5
5
  <tr>
6
6
  <th>ActiveJob ID</th>
@@ -1,9 +1,5 @@
1
- <div class="card my-3 p-6" data-gj-poll-replace id="executions-chart">
2
- <%= render 'good_job/shared/chart', chart_data: GoodJob::ScheduledByQueueChart.new(@filter).data %>
3
- </div>
4
-
5
- <%= render 'good_job/shared/filter', filter: @filter %>
6
-
1
+ <%= render 'good_job/shared/filter', title: "Executions", filter: @filter %>
2
+ <%= render 'good_job/shared/chart', chart_data: GoodJob::ScheduledByQueueChart.new(@filter).data %>
7
3
  <%= render 'good_job/executions/table', executions: @filter.records %>
8
4
 
9
5
  <% if @filter.records.present? %>
@@ -1,6 +1,6 @@
1
- <div class="card my-3" data-gj-poll-replace id="jobs-table">
1
+ <div class="my-3" data-gj-poll-replace id="jobs-table">
2
2
  <div class="table-responsive">
3
- <table class="table card-table table-bordered table-hover table-sm mb-0">
3
+ <table class="table table-hover table-sm mb-0">
4
4
  <thead>
5
5
  <tr>
6
6
  <th>ActiveJob ID</th>
@@ -1,13 +1,5 @@
1
- <div class="my-3 flex">
2
- <h2>All Jobs</h2>
3
- </div>
4
-
5
- <div class="card my-3 p-6" data-gj-poll-replace id="jobs-chart">
6
- <%= render 'good_job/shared/chart', chart_data: GoodJob::ScheduledByQueueChart.new(@filter).data %>
7
- </div>
8
-
9
- <%= render 'good_job/shared/filter', filter: @filter %>
10
-
1
+ <%= render 'good_job/shared/filter', title: "Jobs", filter: @filter %>
2
+ <%= render 'good_job/shared/chart', chart_data: GoodJob::ScheduledByQueueChart.new(@filter).data %>
11
3
  <%= render 'good_job/jobs/table', jobs: @filter.records %>
12
4
 
13
5
  <% if @filter.records.present? %>
@@ -1,3 +1,5 @@
1
- <div class="chart-wrapper">
2
- <canvas class="chart" data-json="<%= chart_data.to_json %>"></canvas>
1
+ <div class="py-4" data-gj-poll-replace id="chart">
2
+ <div class="chart-wrapper container-fluid">
3
+ <canvas class="chart" data-json="<%= chart_data.to_json %>"></canvas>
4
+ </div>
3
5
  </div>
@@ -1,59 +1,67 @@
1
- <%= form_with(url: "", method: :get, local: true, id: "filter_form") do |form| %>
2
- <%= hidden_field_tag :poll, value: params[:poll] %>
3
- <div class="d-flex flex-row w-100">
4
- <div class="me-2">
5
- <label for="job_class_filter">Job class</label>
6
- <select name="job_class" id="job_class_filter" class="form-select">
7
- <option value="" <%= "selected='selected'" if params[:job_class].blank? %>>All jobs</option>
8
-
9
- <% filter.job_classes.each do |name, count| %>
10
- <option value="<%= name.to_param %>" <%= "selected='selected'" if params[:job_class] == name %>><%= name %> (<%= count %>)</option>
11
- <% end %>
12
- </select>
13
- </div>
1
+ <div data-gj-poll-replace id="filter">
2
+ <div class="bg-light break-out">
3
+ <h2 class="container-fluid pt-3 pb-2"><%= title %></h2>
14
4
 
15
- <div class="me-2">
16
- <label for="job_state_filter">State</label>
17
- <select name="state" id="job_state_filter" class="form-select">
18
- <option value="" <%= "selected='selected'" if params[:state].blank? %>>All states</option>
5
+ <ul class="nav nav-tabs bg-light px-3 mb-3">
6
+ <li class="nav-item">
7
+ <%= link_to "All", url_for(state: nil), class: "nav-link #{"active" unless params[:state]}" %>
8
+ </li>
19
9
 
20
- <% filter.states.each do |name, count| %>
21
- <option value="<%= name.to_param %>" <%= "selected='selected'" if params[:state] == name %>><%= name %> (<%= count %>)</option>
22
- <% end %>
23
- </select>
24
- </div>
10
+ <% filter.states.each do |name, count| %>
11
+ <li class="nav-item">
12
+ <%= link_to url_for({state: name}), class: "nav-link #{"active" if params[:state] == name}" do %>
13
+ <%= name.titleize %>
14
+ <span class="badge bg-primary rounded-pill <%= "bg-secondary" if count == 0 %>"><%= count %></span>
15
+ <% end %>
16
+ </li>
17
+ <% end %>
18
+ </ul>
19
+ </div>
25
20
 
26
- <div class="me-2">
27
- <label for="job_queue_filter">Queue</label>
28
- <select name="queue_name" id="job_queue_filter" class="form-select">
29
- <option value="" <%= "selected='selected'" if params[:queue_name].blank? %>>All queues</option>
21
+ <%= form_with(url: "", method: :get, local: true, id: "filter_form", class: "container-fluid") do |form| %>
22
+ <%= hidden_field_tag :poll, params[:poll] %>
23
+ <%= hidden_field_tag :state, params[:state] %>
24
+ <div class="d-flex flex-row w-100">
25
+ <div class="me-2">
26
+ <select name="job_class" id="job_class_filter" class="form-select form-select-sm">
27
+ <option value="" <%= "selected='selected'" if params[:job_class].blank? %>>All jobs</option>
30
28
 
31
- <% filter.queues.each do |name, count| %>
32
- <option value="<%= name.to_param %>" <%= "selected='selected'" if params[:queue_name] == name %>><%= name %> (<%= count %>)</option>
33
- <% end %>
34
- </select>
35
- </div>
29
+ <% filter.job_classes.each do |name, count| %>
30
+ <option value="<%= name.to_param %>" <%= "selected='selected'" if params[:job_class] == name %>><%= name %> (<%= count %>)</option>
31
+ <% end %>
32
+ </select>
33
+ </div>
36
34
 
37
- <div class="me-2 flex-fill d-flex flex-col align-items-end">
38
- <label class="visually-hidden" for="query" aria-label="Search by class, job id, job params, and error text.">Search by class, job id, job params, and error text.</label>
39
- <%= search_field_tag "query", params[:query], class: "form-control", placeholder: "Search by class, job id, job params, and error text." %>
40
- </div>
35
+ <div class="me-2">
36
+ <select name="queue_name" id="job_queue_filter" class="form-select form-select-sm">
37
+ <option value="" <%= "selected='selected'" if params[:queue_name].blank? %>>All queues</option>
41
38
 
42
- <div class="d-flex flex-col align-items-end">
43
- <div>
44
- <%= form.submit "Search", name: nil, class: "btn btn-primary" %>
45
- <%= link_to "Clear all", filter.to_params(job_class: nil, state: nil, queue_name: nil, query: nil), class: "btn btn-secondary" %>
39
+ <% filter.queues.each do |name, count| %>
40
+ <option value="<%= name.to_param %>" <%= "selected='selected'" if params[:queue_name] == name %>><%= name %> (<%= count %>)</option>
41
+ <% end %>
42
+ </select>
43
+ </div>
44
+
45
+ <div class="me-2 flex-fill">
46
+ <%= search_field_tag "query", params[:query], class: "form-control form-control-sm", placeholder: "Search by class, job id, job params, and error text." %>
47
+ </div>
48
+
49
+ <div class="d-flex flex-col align-items-end">
50
+ <div>
51
+ <%= form.submit "Search", name: nil, class: "btn btn-primary btn-sm" %>
52
+ <%= link_to "Clear all", filter.to_params(job_class: nil, state: nil, queue_name: nil, query: nil), class: "btn btn-secondary btn-sm" %>
53
+ </div>
46
54
  </div>
47
55
  </div>
48
- </div>
49
- <% end %>
50
-
51
- <%= javascript_tag nonce: true do %>
52
- document.addEventListener("DOMContentLoaded", () => {
53
- document.querySelectorAll("#job_class_filter, #job_state_filter, #job_queue_filter").forEach((filter) => {
54
- filter.addEventListener("change", () => {
55
- document.querySelector("#filter_form").submit();
56
- });
56
+ <% end %>
57
+
58
+ <%= javascript_tag nonce: true do %>
59
+ document.addEventListener("DOMContentLoaded", () => {
60
+ document.querySelectorAll("#job_class_filter, #job_queue_filter").forEach((filter) => {
61
+ filter.addEventListener("change", () => {
62
+ document.querySelector("#filter_form").submit();
63
+ });
64
+ })
57
65
  })
58
- })
59
- <% end %>
66
+ <% end %>
67
+ </div>
@@ -1,10 +1,8 @@
1
- <footer class="footer mt-auto py-3 bg-light fixed-bottom" id="footer" data-gj-poll-replace>
1
+ <footer class="footer mt-auto py-3 bg-light border-top text-muted small" id="footer" data-gj-poll-replace>
2
2
  <div class="container-fluid">
3
3
  <div class="row">
4
4
  <div class="col-6">
5
- <span class="text-muted">
6
- <%= t(".last_update_html", time: Time.current.utc.iso8601) %>
7
- </span>
5
+ <%= t(".last_update_html", time: Time.current.utc.iso8601) %>
8
6
  </div>
9
7
 
10
8
  <div class="col-6 text-end">
@@ -1,4 +1,4 @@
1
- <nav class="navbar navbar-expand-lg navbar-light bg-light">
1
+ <nav class="navbar navbar-expand-lg navbar-light border-bottom bg-white sticky-top shadow-sm">
2
2
  <div class="container-fluid">
3
3
  <%= link_to t(".name"), root_path, class: "navbar-brand mb-0 h1" %>
4
4
  <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
@@ -8,16 +8,16 @@
8
8
  <div class="collapse navbar-collapse" id="navbarSupportedContent">
9
9
  <ul class="navbar-nav me-auto">
10
10
  <li class="nav-item">
11
- <%= link_to t(".executions"), root_path, class: ["nav-link", ("active" if current_page?(root_path))] %>
11
+ <%= link_to t(".executions"), root_path, class: ["nav-link", ("active" if controller_name == 'executions')] %>
12
12
  </li>
13
13
  <li class="nav-item">
14
- <%= link_to t(".jobs"), jobs_path, class: ["nav-link", ("active" if current_page?(jobs_path))] %>
14
+ <%= link_to t(".jobs"), jobs_path, class: ["nav-link", ("active" if controller_name == 'jobs')] %>
15
15
  </li>
16
16
  <li class="nav-item">
17
- <%= link_to t(".cron_schedules"), cron_entries_path, class: ["nav-link", ("active" if current_page?(cron_entries_path))] %>
17
+ <%= link_to t(".cron_schedules"), cron_entries_path, class: ["nav-link", ("active" if controller_name == 'cron_entries')] %>
18
18
  </li>
19
19
  <li class="nav-item">
20
- <%= link_to t(".processes"), processes_path, class: ["nav-link", ("active" if current_page?(processes_path))] %>
20
+ <%= link_to t(".processes"), processes_path, class: ["nav-link", ("active" if controller_name == 'processes')] %>
21
21
  </li>
22
22
  </ul>
23
23
  <div class="nav-item pe-2">
@@ -18,14 +18,16 @@
18
18
  <%= javascript_include_tag rails_ujs_url(format: :js, v: GoodJob::VERSION), nonce: true %>
19
19
  </head>
20
20
  <body>
21
- <%= render "good_job/shared/navbar" %>
21
+ <div class="d-flex flex-column min-vh-100">
22
+ <%= render "good_job/shared/navbar" %>
22
23
 
23
- <div class="container-fluid">
24
- <%= render "good_job/shared/alert" %>
24
+ <div class="container-fluid flex-grow-1">
25
+ <%= render "good_job/shared/alert" %>
25
26
 
26
- <%= yield %>
27
- </div>
27
+ <%= yield %>
28
+ </div>
28
29
 
29
30
  <%= render "good_job/shared/footer" %>
31
+ </div>
30
32
  </body>
31
33
  </html>
@@ -45,9 +45,9 @@ en:
45
45
  last_update_html: Last updated <time id="page-updated-at" datetime="%{time}">%{time}</time>
46
46
  wording: Remember, you're doing a Good Job too!
47
47
  navbar:
48
- cron_schedules: Cron Schedules
49
- executions: All Executions
50
- jobs: All Jobs
48
+ cron_schedules: Cron
49
+ executions: Executions
50
+ jobs: Jobs
51
51
  live_poll: Live Poll
52
52
  name: "GoodJob 👍"
53
53
  processes: Processes
@@ -45,7 +45,7 @@ es:
45
45
  last_update_html: Última actualización <time id="page-updated-at" datetime="%{time}">%{time}</time>
46
46
  wording: "¡Recuerda, también tú estás haciendo un buen trabajo!"
47
47
  navbar:
48
- cron_schedules: Tareas Programadas
48
+ cron_schedules: Cron
49
49
  executions: Ejecuciones
50
50
  jobs: Tareas
51
51
  live_poll: En vivo
@@ -45,9 +45,9 @@ nl:
45
45
  last_update_html: Laatst bijgewerkt <time id="page-updated-at" datetime="%{time}">%{time}</time>
46
46
  wording: 'Onthoud: jij levert ook goed werk!'
47
47
  navbar:
48
- cron_schedules: Cron Schema
49
- executions: Alle Uitvoeringen
50
- jobs: Alle Taken
48
+ cron_schedules: Cron
49
+ executions: Uitvoeringen
50
+ jobs: Taken
51
51
  live_poll: Live Poll
52
52
  name: "GoodJob 👍"
53
53
  processes: Processen
@@ -3,40 +3,64 @@ ru:
3
3
  datetime:
4
4
  distance_in_words:
5
5
  about_x_hours:
6
+ few: около %{count} часов
7
+ many: около %{count} часов
6
8
  one: около 1 часа
7
- other: около %{count} часов
9
+ other: около %{count} часа
8
10
  about_x_months:
11
+ few: около %{count} месяцев
12
+ many: около %{count} месяцев
9
13
  one: около 1 месяца
10
- other: около %{count} месяцев
14
+ other: около %{count} месяца
11
15
  about_x_years:
16
+ few: около %{count} лет
17
+ many: около %{count} лет
12
18
  one: около 1 года
13
19
  other: около %{count} лет
14
20
  almost_x_years:
21
+ few: почти %{count} года
22
+ many: почти %{count} лет
15
23
  one: почти 1 год
16
- other: почти %{count} года
17
- half_a_minute: пол минуты
24
+ other: почти %{count} лет
25
+ half_a_minute: полминуты
18
26
  less_than_x_minutes:
27
+ few: меньше %{count} минут
28
+ many: меньше %{count} минут
19
29
  one: меньше 1 минуты
20
- other: меньше %{count} минут
30
+ other: меньше %{count} минуты
21
31
  less_than_x_seconds:
32
+ few: меньше %{count} секунд
33
+ many: меньше %{count} секунд
22
34
  one: меньше 1 секунды
23
- other: меньше %{count} секунд
35
+ other: меньше %{count} секунды
24
36
  over_x_years:
37
+ few: больше %{count} лет
38
+ many: больше %{count} лет
25
39
  one: больше 1 года
26
40
  other: больше %{count} лет
27
41
  x_days:
42
+ few: "%{count} дня"
43
+ many: "%{count} дней"
28
44
  one: 1 день
29
- other: "%{count} дней"
45
+ other: "%{count} дня"
30
46
  x_minutes:
31
- one: 1 минута
32
- other: "%{count} минут"
47
+ few: "%{count} минуты"
48
+ many: "%{count} минут"
49
+ one: 1 минуту
50
+ other: "%{count} минуты"
33
51
  x_months:
52
+ few: "%{count} месяца"
53
+ many: "%{count} месяцев"
34
54
  one: 1 месяц
35
55
  other: "%{count} месяца"
36
56
  x_seconds:
37
- one: 1 секунда
38
- other: "%{count} секунд"
57
+ few: "%{count} секунды"
58
+ many: "%{count} секунд"
59
+ one: 1 секунду
60
+ other: "%{count} секунды"
39
61
  x_years:
62
+ few: "%{count} года"
63
+ many: "%{count} лет"
40
64
  one: 1 год
41
65
  other: "%{count} года"
42
66
  good_job:
@@ -45,9 +69,9 @@ ru:
45
69
  last_update_html: Последнее обновление <time id="page-updated-at" datetime="%{time}">%{time}</time>
46
70
  wording: Запомни, ты делаешь Good Job тоже!
47
71
  navbar:
48
- cron_schedules: Cron Расписания
49
- executions: Все Исполнения
50
- jobs: Все Задачи
72
+ cron_schedules: Cron
73
+ executions: Исполнения
74
+ jobs: Задачи
51
75
  live_poll: Живой Опрос
52
76
  name: "GoodJob 👍"
53
77
  processes: Процессы
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
  module GoodJob
3
3
  # GoodJob gem version.
4
- VERSION = '2.12.2'
4
+ VERSION = '2.13.0'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: good_job
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.12.2
4
+ version: 2.13.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ben Sheldon
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-04-18 00:00:00.000000000 Z
11
+ date: 2022-04-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activejob