good_job 2.11.3 → 2.12.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1c804e28bcaae78b4af5a654da6cacd9fba979159fb57cbbcfb4bcb348b947fa
4
- data.tar.gz: cbd920c5050bcf5da2e328a3aa5c3bb638b5a077a3f67e6dbbf76202a38ec723
3
+ metadata.gz: 8d56e35eff62e8575f9096bcbc763978c0803d675232bf7aa939a0603434f6c6
4
+ data.tar.gz: aec46224383849afe2b9ba93d245f70674f4af85765bfd804bb23f528229fd6d
5
5
  SHA512:
6
- metadata.gz: cef26c910377e43dc66facdb2ccbde95ace6b38c8a1a6672100496919573f3ce07f0e59cd68ee22f195f72590313ff66757086123be3beee07f0801ecf258bf8
7
- data.tar.gz: ee5553f45df7ea0bb4eb7abb870a879556292a7b25247db8d40700347f639b98bfdc758105588a8059a07ac4d7a5d7ccc6e0ba5543daf5cae4e035431f021174
6
+ metadata.gz: 1f6d42db1f03b01f19eef705ff88acff1a93d5f1802df2c6240109c2178fe39f68733b3648799ebe186375166c39ec1fe04388c4fe61d06708d52c520023e685
7
+ data.tar.gz: 2b64a3237f6f77d3e1a890e040aa20daf48efc92c461960e0a005f27d734a3639b0a0a10cdc0b4793ec962bac0c68a988ddc89779a83e10210e977c901a30cd1
data/CHANGELOG.md CHANGED
@@ -1,5 +1,56 @@
1
1
  # Changelog
2
2
 
3
+ ## [v2.12.2](https://github.com/bensheldon/good_job/tree/v2.12.2) (2022-04-18)
4
+
5
+ [Full Changelog](https://github.com/bensheldon/good_job/compare/v2.12.1...v2.12.2)
6
+
7
+ **Merged pull requests:**
8
+
9
+ - Dashboard: added NL translations [\#568](https://github.com/bensheldon/good_job/pull/568) ([eelcoj](https://github.com/eelcoj))
10
+ - Un-deprecate Adapter's `execution_mode` argument [\#567](https://github.com/bensheldon/good_job/pull/567) ([bensheldon](https://github.com/bensheldon))
11
+
12
+ ## [v2.12.1](https://github.com/bensheldon/good_job/tree/v2.12.1) (2022-04-18)
13
+
14
+ [Full Changelog](https://github.com/bensheldon/good_job/compare/v2.12.0...v2.12.1)
15
+
16
+ **Implemented enhancements:**
17
+
18
+ - Dashboard: adding Russian translation [\#565](https://github.com/bensheldon/good_job/pull/565) ([skatkov](https://github.com/skatkov))
19
+
20
+ **Fixed bugs:**
21
+
22
+ - I18n::InvalidLocale \(:en is not a valid locale\): [\#549](https://github.com/bensheldon/good_job/issues/549)
23
+ - FIX: make 'default\_url\_options' method private [\#562](https://github.com/bensheldon/good_job/pull/562) ([friendlyantz](https://github.com/friendlyantz))
24
+
25
+ **Closed issues:**
26
+
27
+ - Exponential backoff by default? [\#563](https://github.com/bensheldon/good_job/issues/563)
28
+ - Finished without Error [\#552](https://github.com/bensheldon/good_job/issues/552)
29
+ - Track processes in the database [\#421](https://github.com/bensheldon/good_job/issues/421)
30
+
31
+ **Merged pull requests:**
32
+
33
+ - Remove WIP comments from dashboard [\#566](https://github.com/bensheldon/good_job/pull/566) ([bkeepers](https://github.com/bkeepers))
34
+ - Add i18n-tasks to linter, add binstub and move config to project root [\#559](https://github.com/bensheldon/good_job/pull/559) ([bensheldon](https://github.com/bensheldon))
35
+
36
+ ## [v2.12.0](https://github.com/bensheldon/good_job/tree/v2.12.0) (2022-04-05)
37
+
38
+ [Full Changelog](https://github.com/bensheldon/good_job/compare/v2.11.3...v2.12.0)
39
+
40
+ **Closed issues:**
41
+
42
+ - TimeTask timeouts are now ignored as these were not able to be implemented correctly [\#555](https://github.com/bensheldon/good_job/issues/555)
43
+ - undefined method `relative\_time' when include\_all\_helpers is false [\#550](https://github.com/bensheldon/good_job/issues/550)
44
+ - ArgumentError: wrong number of arguments \(given 1, expected 0; required keyword: schedule\) - cron [\#546](https://github.com/bensheldon/good_job/issues/546)
45
+
46
+ **Merged pull requests:**
47
+
48
+ - Deprecate Adapter configuration of job execution/cron [\#558](https://github.com/bensheldon/good_job/pull/558) ([bensheldon](https://github.com/bensheldon))
49
+ - Remove usage of Concurrent::TimerTask's timeout\_interval [\#557](https://github.com/bensheldon/good_job/pull/557) ([bensheldon](https://github.com/bensheldon))
50
+ - Include locale in html lang attribute [\#556](https://github.com/bensheldon/good_job/pull/556) ([bensheldon](https://github.com/bensheldon))
51
+ - Rename `GoodJob::BaseController` to `GoodJob::ApplicationController` [\#553](https://github.com/bensheldon/good_job/pull/553) ([shouichi](https://github.com/shouichi))
52
+ - Internationalize/I18n the Dashboard Engine [\#497](https://github.com/bensheldon/good_job/pull/497) ([JuanVqz](https://github.com/JuanVqz))
53
+
3
54
  ## [v2.11.3](https://github.com/bensheldon/good_job/tree/v2.11.3) (2022-03-30)
4
55
 
5
56
  [Full Changelog](https://github.com/bensheldon/good_job/compare/v2.11.2...v2.11.3)
@@ -10,7 +61,6 @@
10
61
 
11
62
  **Closed issues:**
12
63
 
13
- - ArgumentError: wrong number of arguments \(given 1, expected 0; required keyword: schedule\) - cron [\#546](https://github.com/bensheldon/good_job/issues/546)
14
64
  - How to run clean up preserved jobs in cron? [\#541](https://github.com/bensheldon/good_job/issues/541)
15
65
  - Erroring with "Too many open files" when good\_job tries reconnecting to database [\#530](https://github.com/bensheldon/good_job/issues/530)
16
66
  - Can't cast Array [\#529](https://github.com/bensheldon/good_job/issues/529)
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  module GoodJob
3
- class BaseController < ActionController::Base # rubocop:disable Rails/ApplicationController
3
+ class ApplicationController < ActionController::Base
4
4
  protect_from_forgery with: :exception
5
5
 
6
6
  around_action :switch_locale
@@ -26,8 +26,26 @@ module GoodJob
26
26
 
27
27
  private
28
28
 
29
+ def default_url_options(options = {})
30
+ { locale: I18n.locale }.merge(options)
31
+ end
32
+
29
33
  def switch_locale(&action)
30
- I18n.with_locale(:en, &action)
34
+ I18n.with_locale(current_locale, &action)
35
+ end
36
+
37
+ def current_locale
38
+ if params[:locale]
39
+ params[:locale]
40
+ elsif good_job_available_locales.exclude?(I18n.default_locale) && I18n.available_locales.include?(:en)
41
+ :en
42
+ else
43
+ I18n.default_locale
44
+ end
45
+ end
46
+
47
+ def good_job_available_locales
48
+ @_good_job_available_locales ||= GoodJob::Engine.root.join("config/locales").glob("*.yml").map { |path| File.basename(path, ".yml").to_sym }.uniq
31
49
  end
32
50
  end
33
51
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  module GoodJob
3
- class CronEntriesController < GoodJob::BaseController
3
+ class CronEntriesController < GoodJob::ApplicationController
4
4
  def index
5
5
  @cron_entries = CronEntry.all
6
6
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  module GoodJob
3
- class ExecutionsController < GoodJob::BaseController
3
+ class ExecutionsController < GoodJob::ApplicationController
4
4
  def index
5
5
  @filter = ExecutionsFilter.new(params)
6
6
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  module GoodJob
3
- class JobsController < GoodJob::BaseController
3
+ class JobsController < GoodJob::ApplicationController
4
4
  rescue_from GoodJob::ActiveJobJob::AdapterNotGoodJobError,
5
5
  GoodJob::ActiveJobJob::ActionForStateMismatchError,
6
6
  with: :redirect_on_error
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  module GoodJob
3
- class ProcessesController < GoodJob::BaseController
3
+ class ProcessesController < GoodJob::ApplicationController
4
4
  def index
5
5
  @processes = GoodJob::Process.active.order(created_at: :desc) if GoodJob::Process.migrated?
6
6
  end
@@ -0,0 +1,13 @@
1
+ <% if notice %>
2
+ <div class="alert alert-success alert-dismissible fade show d-flex align-items-center offset-md-3 col-6" role="alert">
3
+ <%= render "good_job/shared/icons/check", class: "flex-shrink-0 me-2" %>
4
+ <div><%= notice %></div>
5
+ <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
6
+ </div>
7
+ <% elsif alert %>
8
+ <div class="alert alert-warning alert-dismissible fade show d-flex align-items-center offset-md-3 col-6" role="alert">
9
+ <%= render "good_job/shared/icons/exclamation", class: "flex-shrink-0 me-2" %>
10
+ <div><%= alert %></div>
11
+ <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
12
+ </div>
13
+ <% end %>
@@ -0,0 +1,15 @@
1
+ <footer class="footer mt-auto py-3 bg-light fixed-bottom" id="footer" data-gj-poll-replace>
2
+ <div class="container-fluid">
3
+ <div class="row">
4
+ <div class="col-6">
5
+ <span class="text-muted">
6
+ <%= t(".last_update_html", time: Time.current.utc.iso8601) %>
7
+ </span>
8
+ </div>
9
+
10
+ <div class="col-6 text-end">
11
+ <%= t(".wording") %>
12
+ </div>
13
+ </div>
14
+ </div>
15
+ </footer>
@@ -0,0 +1,44 @@
1
+ <nav class="navbar navbar-expand-lg navbar-light bg-light">
2
+ <div class="container-fluid">
3
+ <%= link_to t(".name"), root_path, class: "navbar-brand mb-0 h1" %>
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">
5
+ <span class="navbar-toggler-icon"></span>
6
+ </button>
7
+
8
+ <div class="collapse navbar-collapse" id="navbarSupportedContent">
9
+ <ul class="navbar-nav me-auto">
10
+ <li class="nav-item">
11
+ <%= link_to t(".executions"), root_path, class: ["nav-link", ("active" if current_page?(root_path))] %>
12
+ </li>
13
+ <li class="nav-item">
14
+ <%= link_to t(".jobs"), jobs_path, class: ["nav-link", ("active" if current_page?(jobs_path))] %>
15
+ </li>
16
+ <li class="nav-item">
17
+ <%= link_to t(".cron_schedules"), cron_entries_path, class: ["nav-link", ("active" if current_page?(cron_entries_path))] %>
18
+ </li>
19
+ <li class="nav-item">
20
+ <%= link_to t(".processes"), processes_path, class: ["nav-link", ("active" if current_page?(processes_path))] %>
21
+ </li>
22
+ </ul>
23
+ <div class="nav-item pe-2">
24
+ <div class="form-check">
25
+ <input type="checkbox" id="toggle-poll" name="toggle-poll" data-gj-action='change#togglePoll' <%= 'checked' if params[:poll].present? %>>
26
+ <label for="toggle-poll"><%= t(".live_poll") %></label>
27
+ </div>
28
+ </div>
29
+ <ul class="navbar-nav">
30
+ <li class="nav-item dropdown">
31
+ <a href="#" class="nav-link dropdown-toggle" type="button" id="localeOptions" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
32
+ <%= I18n.locale %>
33
+ </a>
34
+
35
+ <ul class="dropdown-menu" aria-labelledby="localeOptions">
36
+ <% I18n.available_locales.reject { |locale| locale == I18n.locale }.each do |locale| %>
37
+ <li><%= link_to locale, url_for(locale: locale), class: "dropdown-item" %></li>
38
+ <% end %>
39
+ </ul>
40
+ </li>
41
+ </ul>
42
+ </div>
43
+ </div>
44
+ </nav>
@@ -0,0 +1,31 @@
1
+ <!DOCTYPE html>
2
+ <html lang="<%= I18n.locale %>">
3
+ <head>
4
+ <title>Good Job Dashboard</title>
5
+ <meta charset="utf-8">
6
+ <meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport">
7
+ <%= csrf_meta_tags %>
8
+ <%= csp_meta_tag %>
9
+
10
+ <%# Assets must use *_url route helpers to avoid being overriden by config.asset_host %>
11
+ <%= stylesheet_link_tag bootstrap_url(format: :css, v: GoodJob::VERSION), skip_pipeline: true %>
12
+ <%= stylesheet_link_tag style_url(format: :css, v: GoodJob::VERSION) %>
13
+
14
+ <%= javascript_include_tag bootstrap_url(format: :js, v: GoodJob::VERSION), nonce: true %>
15
+ <%= javascript_include_tag chartjs_url(format: :js, v: GoodJob::VERSION), nonce: true %>
16
+ <%= javascript_include_tag scripts_url(format: :js, v: GoodJob::VERSION), nonce: true %>
17
+
18
+ <%= javascript_include_tag rails_ujs_url(format: :js, v: GoodJob::VERSION), nonce: true %>
19
+ </head>
20
+ <body>
21
+ <%= render "good_job/shared/navbar" %>
22
+
23
+ <div class="container-fluid">
24
+ <%= render "good_job/shared/alert" %>
25
+
26
+ <%= yield %>
27
+ </div>
28
+
29
+ <%= render "good_job/shared/footer" %>
30
+ </body>
31
+ </html>
@@ -0,0 +1,53 @@
1
+ ---
2
+ en:
3
+ datetime:
4
+ distance_in_words:
5
+ about_x_hours:
6
+ one: about 1 hour
7
+ other: about %{count} hours
8
+ about_x_months:
9
+ one: about 1 month
10
+ other: about %{count} months
11
+ about_x_years:
12
+ one: about 1 year
13
+ other: about %{count} years
14
+ almost_x_years:
15
+ one: almost 1 year
16
+ other: almost %{count} years
17
+ half_a_minute: half a minute
18
+ less_than_x_minutes:
19
+ one: less than a minute
20
+ other: less than %{count} minutes
21
+ less_than_x_seconds:
22
+ one: less than 1 second
23
+ other: less than %{count} seconds
24
+ over_x_years:
25
+ one: over 1 year
26
+ other: over %{count} years
27
+ x_days:
28
+ one: 1 day
29
+ other: "%{count} days"
30
+ x_minutes:
31
+ one: 1 minute
32
+ other: "%{count} minutes"
33
+ x_months:
34
+ one: 1 month
35
+ other: "%{count} months"
36
+ x_seconds:
37
+ one: 1 second
38
+ other: "%{count} seconds"
39
+ x_years:
40
+ one: 1 year
41
+ other: "%{count} years"
42
+ good_job:
43
+ shared:
44
+ footer:
45
+ last_update_html: Last updated <time id="page-updated-at" datetime="%{time}">%{time}</time>
46
+ wording: Remember, you're doing a Good Job too!
47
+ navbar:
48
+ cron_schedules: Cron Schedules
49
+ executions: All Executions
50
+ jobs: All Jobs
51
+ live_poll: Live Poll
52
+ name: "GoodJob 👍"
53
+ processes: Processes
@@ -0,0 +1,53 @@
1
+ ---
2
+ es:
3
+ datetime:
4
+ distance_in_words:
5
+ about_x_hours:
6
+ one: alrededor de 1 hora
7
+ other: alrededor de %{count} horas
8
+ about_x_months:
9
+ one: alrededor de 1 mes
10
+ other: alrededor de %{count} meses
11
+ about_x_years:
12
+ one: alrededor de 1 año
13
+ other: alrededor de %{count} años
14
+ almost_x_years:
15
+ one: casi 1 año
16
+ other: casi %{count} años
17
+ half_a_minute: medio minuto
18
+ less_than_x_minutes:
19
+ one: menos de un minuto
20
+ other: menos de %{count} minutos
21
+ less_than_x_seconds:
22
+ one: menos de 1 segundo
23
+ other: menos de %{count} segundos
24
+ over_x_years:
25
+ one: más de 1 año
26
+ other: durante %{count} años
27
+ x_days:
28
+ one: 1 día
29
+ other: "%{count} días"
30
+ x_minutes:
31
+ one: 1 minuto
32
+ other: "%{count} minutos"
33
+ x_months:
34
+ one: 1 mes
35
+ other: "%{count} meses"
36
+ x_seconds:
37
+ one: 1 segundo
38
+ other: "%{count} segundos"
39
+ x_years:
40
+ one: 1 año
41
+ other: "%{count} años"
42
+ good_job:
43
+ shared:
44
+ footer:
45
+ last_update_html: Última actualización <time id="page-updated-at" datetime="%{time}">%{time}</time>
46
+ wording: "¡Recuerda, también tú estás haciendo un buen trabajo!"
47
+ navbar:
48
+ cron_schedules: Tareas Programadas
49
+ executions: Ejecuciones
50
+ jobs: Tareas
51
+ live_poll: En vivo
52
+ name: "GoodJob 👍"
53
+ processes: Procesos
@@ -0,0 +1,53 @@
1
+ ---
2
+ nl:
3
+ datetime:
4
+ distance_in_words:
5
+ about_x_hours:
6
+ one: ongeveer 1 uur
7
+ other: ongeveer %{count} uren
8
+ about_x_months:
9
+ one: ongeveer 1 maand
10
+ other: ongeveer %{count} maanden
11
+ about_x_years:
12
+ one: ongeveer 1 jaar
13
+ other: ongeveer %{count} jaren
14
+ almost_x_years:
15
+ one: bijna 1 jaar
16
+ other: bijna %{count} jaren
17
+ half_a_minute: halve minuut
18
+ less_than_x_minutes:
19
+ one: minder dan één minuut
20
+ other: minder dan %{count} minuten
21
+ less_than_x_seconds:
22
+ one: minder dan 1 seconde
23
+ other: minder dan %{count} seconden
24
+ over_x_years:
25
+ one: meer dan 1 jaar
26
+ other: meer dan %{count} jaren
27
+ x_days:
28
+ one: 1 dag
29
+ other: "%{count} dagen"
30
+ x_minutes:
31
+ one: 1 minuut
32
+ other: "%{count} minuten"
33
+ x_months:
34
+ one: 1 maand
35
+ other: "%{count} maanden"
36
+ x_seconds:
37
+ one: 1 seconde
38
+ other: "%{count} seconden"
39
+ x_years:
40
+ one: 1 jaar
41
+ other: "%{count} jaren"
42
+ good_job:
43
+ shared:
44
+ footer:
45
+ last_update_html: Laatst bijgewerkt <time id="page-updated-at" datetime="%{time}">%{time}</time>
46
+ wording: 'Onthoud: jij levert ook goed werk!'
47
+ navbar:
48
+ cron_schedules: Cron Schema
49
+ executions: Alle Uitvoeringen
50
+ jobs: Alle Taken
51
+ live_poll: Live Poll
52
+ name: "GoodJob 👍"
53
+ processes: Processen
@@ -0,0 +1,53 @@
1
+ ---
2
+ ru:
3
+ datetime:
4
+ distance_in_words:
5
+ about_x_hours:
6
+ one: около 1 часа
7
+ other: около %{count} часов
8
+ about_x_months:
9
+ one: около 1 месяца
10
+ other: около %{count} месяцев
11
+ about_x_years:
12
+ one: около 1 года
13
+ other: около %{count} лет
14
+ almost_x_years:
15
+ one: почти 1 год
16
+ other: почти %{count} года
17
+ half_a_minute: пол минуты
18
+ less_than_x_minutes:
19
+ one: меньше 1 минуты
20
+ other: меньше %{count} минут
21
+ less_than_x_seconds:
22
+ one: меньше 1 секунды
23
+ other: меньше %{count} секунд
24
+ over_x_years:
25
+ one: больше 1 года
26
+ other: больше %{count} лет
27
+ x_days:
28
+ one: 1 день
29
+ other: "%{count} дней"
30
+ x_minutes:
31
+ one: 1 минута
32
+ other: "%{count} минут"
33
+ x_months:
34
+ one: 1 месяц
35
+ other: "%{count} месяца"
36
+ x_seconds:
37
+ one: 1 секунда
38
+ other: "%{count} секунд"
39
+ x_years:
40
+ one: 1 год
41
+ other: "%{count} года"
42
+ good_job:
43
+ shared:
44
+ footer:
45
+ last_update_html: Последнее обновление <time id="page-updated-at" datetime="%{time}">%{time}</time>
46
+ wording: Запомни, ты делаешь Good Job тоже!
47
+ navbar:
48
+ cron_schedules: Cron Расписания
49
+ executions: Все Исполнения
50
+ jobs: Все Задачи
51
+ live_poll: Живой Опрос
52
+ name: "GoodJob 👍"
53
+ processes: Процессы
@@ -27,7 +27,13 @@ module GoodJob
27
27
  # @param queues [String, nil] determines which queues to execute jobs from when +execution_mode+ is set to +:async+. See {file:README.md#optimize-queues-threads-and-processes} for more details on the format of this string. You can also set this with the environment variable +GOOD_JOB_QUEUES+. Defaults to +"*"+.
28
28
  # @param poll_interval [Integer, nil] sets the number of seconds between polls for jobs when +execution_mode+ is set to +:async+. You can also set this with the environment variable +GOOD_JOB_POLL_INTERVAL+. Defaults to +1+.
29
29
  # @param start_async_on_initialize [Boolean] whether to start the async scheduler when the adapter is initialized.
30
- def initialize(execution_mode: nil, queues: nil, max_threads: nil, poll_interval: nil, start_async_on_initialize: GoodJob.async_ready?)
30
+ def initialize(execution_mode: nil, queues: nil, max_threads: nil, poll_interval: nil, start_async_on_initialize: nil)
31
+ if queues || max_threads || poll_interval || start_async_on_initialize
32
+ ActiveSupport::Deprecation.warn(
33
+ "GoodJob::Adapter's execution-related arguments (queues, max_threads, poll_interval, start_async_on_initialize) have been deprecated and will be removed in GoodJob v3. These options should be configured through GoodJob global configuration instead."
34
+ )
35
+ end
36
+
31
37
  @configuration = GoodJob::Configuration.new(
32
38
  {
33
39
  execution_mode: execution_mode,
@@ -39,7 +45,7 @@ module GoodJob
39
45
  @configuration.validate!
40
46
  self.class.instances << self
41
47
 
42
- start_async if start_async_on_initialize
48
+ start_async if start_async_on_initialize || GoodJob.async_ready?
43
49
  end
44
50
 
45
51
  # Enqueues the ActiveJob job to be performed.
@@ -6,13 +6,10 @@ module GoodJob # :nodoc:
6
6
  # Pollers regularly wake up execution threads to check for new work.
7
7
  #
8
8
  class Poller
9
- TIMEOUT_INTERVAL = 5
10
-
11
9
  # Defaults for instance of Concurrent::TimerTask.
12
10
  # The timer controls how and when sleeping threads check for new work.
13
11
  DEFAULT_TIMER_OPTIONS = {
14
12
  execution_interval: Configuration::DEFAULT_POLL_INTERVAL,
15
- timeout_interval: TIMEOUT_INTERVAL,
16
13
  run_now: true,
17
14
  }.freeze
18
15
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
  module GoodJob
3
3
  # GoodJob gem version.
4
- VERSION = '2.11.3'
4
+ VERSION = '2.12.2'
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.11.3
4
+ version: 2.12.2
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-03-30 00:00:00.000000000 Z
11
+ date: 2022-04-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activejob
@@ -367,8 +367,8 @@ files:
367
367
  - engine/app/assets/vendor/chartjs/chart.min.js
368
368
  - engine/app/assets/vendor/rails_ujs.js
369
369
  - engine/app/charts/good_job/scheduled_by_queue_chart.rb
370
+ - engine/app/controllers/good_job/application_controller.rb
370
371
  - engine/app/controllers/good_job/assets_controller.rb
371
- - engine/app/controllers/good_job/base_controller.rb
372
372
  - engine/app/controllers/good_job/cron_entries_controller.rb
373
373
  - engine/app/controllers/good_job/executions_controller.rb
374
374
  - engine/app/controllers/good_job/jobs_controller.rb
@@ -385,8 +385,11 @@ files:
385
385
  - engine/app/views/good_job/jobs/index.html.erb
386
386
  - engine/app/views/good_job/jobs/show.html.erb
387
387
  - engine/app/views/good_job/processes/index.html.erb
388
+ - engine/app/views/good_job/shared/_alert.erb
388
389
  - engine/app/views/good_job/shared/_chart.erb
389
390
  - engine/app/views/good_job/shared/_filter.erb
391
+ - engine/app/views/good_job/shared/_footer.erb
392
+ - engine/app/views/good_job/shared/_navbar.erb
390
393
  - engine/app/views/good_job/shared/icons/_arrow_clockwise.html.erb
391
394
  - engine/app/views/good_job/shared/icons/_check.html.erb
392
395
  - engine/app/views/good_job/shared/icons/_exclamation.html.erb
@@ -394,7 +397,11 @@ files:
394
397
  - engine/app/views/good_job/shared/icons/_skip_forward.html.erb
395
398
  - engine/app/views/good_job/shared/icons/_stop.html.erb
396
399
  - engine/app/views/good_job/shared/icons/_trash.html.erb
397
- - engine/app/views/layouts/good_job/base.html.erb
400
+ - engine/app/views/layouts/good_job/application.html.erb
401
+ - engine/config/locales/en.yml
402
+ - engine/config/locales/es.yml
403
+ - engine/config/locales/nl.yml
404
+ - engine/config/locales/ru.yml
398
405
  - engine/config/routes.rb
399
406
  - engine/lib/good_job/engine.rb
400
407
  - exe/good_job
@@ -1,96 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <title>Good Job Dashboard</title>
5
- <meta charset="utf-8">
6
- <meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport">
7
- <%= csrf_meta_tags %>
8
- <%= csp_meta_tag %>
9
-
10
- <%# Assets must use *_url route helpers to avoid being overriden by config.asset_host %>
11
- <%= stylesheet_link_tag bootstrap_url(format: :css, v: GoodJob::VERSION), skip_pipeline: true %>
12
- <%= stylesheet_link_tag style_url(format: :css, v: GoodJob::VERSION) %>
13
-
14
- <%= javascript_include_tag bootstrap_url(format: :js, v: GoodJob::VERSION), nonce: true %>
15
- <%= javascript_include_tag chartjs_url(format: :js, v: GoodJob::VERSION), nonce: true %>
16
- <%= javascript_include_tag scripts_url(format: :js, v: GoodJob::VERSION), nonce: true %>
17
-
18
- <%= javascript_include_tag rails_ujs_url(format: :js, v: GoodJob::VERSION), nonce: true %>
19
- </head>
20
- <body>
21
- <nav class="navbar navbar-expand-lg navbar-light bg-light">
22
- <div class="container-fluid">
23
- <%= link_to "GoodJob 👍", root_path, class: 'navbar-brand mb-0 h1' %>
24
- <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
25
- <span class="navbar-toggler-icon"></span>
26
- </button>
27
-
28
- <div class="collapse navbar-collapse" id="navbarSupportedContent">
29
- <ul class="navbar-nav me-auto">
30
- <li class="nav-item">
31
- <%= link_to "All Executions", root_path, class: ["nav-link", ("active" if current_page?(root_path))] %>
32
- </li>
33
- <li class="nav-item">
34
- <%= link_to "All Jobs", jobs_path, class: ["nav-link", ("active" if current_page?(jobs_path))] %>
35
- </li>
36
- <li class="nav-item">
37
- <%= link_to "Cron Schedules", cron_entries_path, class: ["nav-link", ("active" if current_page?(cron_entries_path))] %>
38
- </li>
39
- <li class="nav-item">
40
- <%= link_to "Processes", processes_path, class: ["nav-link", ("active" if current_page?(processes_path))] %>
41
- </li>
42
- <li class="nav-item">
43
- <div class="nav-link">
44
- <span class="badge bg-secondary">More views coming soon</span>
45
- </div>
46
- </li>
47
- </ul>
48
- <div>
49
- <input type="checkbox" id="toggle-poll" name="toggle-poll" data-gj-action='change#togglePoll' <%= 'checked' if params[:poll].present? %>>
50
- <label for="toggle-poll">Live Poll</label>
51
- </div>
52
- </div>
53
- </div>
54
- </nav>
55
-
56
- <div class="container-fluid">
57
- <div class="card border-warning text-dark my-3">
58
- <div class="card-body">
59
- <p class="card-text">🚧 GoodJob's dashboard is a work in progress. Please contribute ideas and code on <a href="https://github.com/bensheldon/good_job/issues" target="_blank" rel="nofollow noopener noreferrer">Github</a>.</p>
60
- </div>
61
- </div>
62
-
63
- <% if notice %>
64
- <div class="alert alert-success alert-dismissible fade show d-flex align-items-center offset-md-3 col-6" role="alert">
65
- <%= render "good_job/shared/icons/check", class: "flex-shrink-0 me-2" %>
66
- <div><%= notice %></div>
67
- <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
68
- </div>
69
- <% elsif alert %>
70
- <div class="alert alert-warning alert-dismissible fade show d-flex align-items-center offset-md-3 col-6" role="alert">
71
- <%= render "good_job/shared/icons/exclamation", class: "flex-shrink-0 me-2" %>
72
- <div><%= alert %></div>
73
- <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
74
- </div>
75
- <% end %>
76
-
77
- <%= yield %>
78
- </div>
79
-
80
- <footer class="footer mt-auto py-3 bg-light fixed-bottom" id="footer" data-gj-poll-replace>
81
- <div class="container-fluid">
82
- <div class="row">
83
- <div class="col-6">
84
- <span class="text-muted">
85
- Last updated: <time id="page-updated-at" datetime="<%= Time.current.utc.iso8601 %>"><%= Time.current %></time>
86
- </span>
87
- </div>
88
-
89
- <div class="col-6 text-end">
90
- Remember, you're doing a Good Job too!
91
- </div>
92
- </div>
93
- </div>
94
- </footer>
95
- </body>
96
- </html>