good_job 2.11.3 → 2.12.0

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: 398864eebf8f617924967bf2a73679bd0584493299570c20ea6dbc9598d23ff3
4
+ data.tar.gz: d781885d188ec4b3dab51f9609ba7a3935027426edf6cbf8147ae2b11a51ac72
5
5
  SHA512:
6
- metadata.gz: cef26c910377e43dc66facdb2ccbde95ace6b38c8a1a6672100496919573f3ce07f0e59cd68ee22f195f72590313ff66757086123be3beee07f0801ecf258bf8
7
- data.tar.gz: ee5553f45df7ea0bb4eb7abb870a879556292a7b25247db8d40700347f639b98bfdc758105588a8059a07ac4d7a5d7ccc6e0ba5543daf5cae4e035431f021174
6
+ metadata.gz: e9830078953d473bb48ec24cfcd4841029614be85c910b493d670eb1cfbbad287e95ce854a65aec609dd97954d6bb19f3a30c6a95cfd5d18c6913d777bab4d0f
7
+ data.tar.gz: ba0beb2c46d7f7044d1a7f2d5b1cb006ee67433432fb18e7bb04c7d4452df2e10ad45eff884c66bd7c1069ec47fee4fa18d776814dde4adf5b8a5bb4fb722904
data/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # Changelog
2
2
 
3
+ ## [v2.12.0](https://github.com/bensheldon/good_job/tree/v2.12.0) (2022-04-05)
4
+
5
+ [Full Changelog](https://github.com/bensheldon/good_job/compare/v2.11.3...v2.12.0)
6
+
7
+ **Closed issues:**
8
+
9
+ - TimeTask timeouts are now ignored as these were not able to be implemented correctly [\#555](https://github.com/bensheldon/good_job/issues/555)
10
+ - undefined method `relative\_time' when include\_all\_helpers is false [\#550](https://github.com/bensheldon/good_job/issues/550)
11
+ - ArgumentError: wrong number of arguments \(given 1, expected 0; required keyword: schedule\) - cron [\#546](https://github.com/bensheldon/good_job/issues/546)
12
+
13
+ **Merged pull requests:**
14
+
15
+ - Deprecate Adapter configuration of job execution/cron [\#558](https://github.com/bensheldon/good_job/pull/558) ([bensheldon](https://github.com/bensheldon))
16
+ - Remove usage of Concurrent::TimerTask's timeout\_interval [\#557](https://github.com/bensheldon/good_job/pull/557) ([bensheldon](https://github.com/bensheldon))
17
+ - Include locale in html lang attribute [\#556](https://github.com/bensheldon/good_job/pull/556) ([bensheldon](https://github.com/bensheldon))
18
+ - Rename `GoodJob::BaseController` to `GoodJob::ApplicationController` [\#553](https://github.com/bensheldon/good_job/pull/553) ([shouichi](https://github.com/shouichi))
19
+ - Internationalize/I18n the Dashboard Engine [\#497](https://github.com/bensheldon/good_job/pull/497) ([JuanVqz](https://github.com/JuanVqz))
20
+
3
21
  ## [v2.11.3](https://github.com/bensheldon/good_job/tree/v2.11.3) (2022-03-30)
4
22
 
5
23
  [Full Changelog](https://github.com/bensheldon/good_job/compare/v2.11.2...v2.11.3)
@@ -10,7 +28,6 @@
10
28
 
11
29
  **Closed issues:**
12
30
 
13
- - ArgumentError: wrong number of arguments \(given 1, expected 0; required keyword: schedule\) - cron [\#546](https://github.com/bensheldon/good_job/issues/546)
14
31
  - How to run clean up preserved jobs in cron? [\#541](https://github.com/bensheldon/good_job/issues/541)
15
32
  - Erroring with "Too many open files" when good\_job tries reconnecting to database [\#530](https://github.com/bensheldon/good_job/issues/530)
16
33
  - 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
@@ -24,10 +24,28 @@ module GoodJob
24
24
  request.content_security_policy_nonce_generator = ->(_request) { SecureRandom.base64(16) }
25
25
  end
26
26
 
27
+ def default_url_options(options = {})
28
+ { locale: I18n.locale }.merge(options)
29
+ end
30
+
27
31
  private
28
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,7 @@
1
+ <div class="card border-warning text-dark my-3">
2
+ <div class="card-body">
3
+ <p class="card-text">
4
+ <%= t(".work_in_progress_html") %>
5
+ </p>
6
+ </div>
7
+ </div>
@@ -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,49 @@
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
+ <li class="nav-item">
23
+ <div class="nav-link">
24
+ <span class="badge bg-secondary"><%= t(".coming_soon") %></span>
25
+ </div>
26
+ </li>
27
+ </ul>
28
+ <div class="nav-item pe-2">
29
+ <div class="form-check">
30
+ <input type="checkbox" id="toggle-poll" name="toggle-poll" data-gj-action='change#togglePoll' <%= 'checked' if params[:poll].present? %>>
31
+ <label for="toggle-poll"><%= t(".live_poll") %></label>
32
+ </div>
33
+ </div>
34
+ <ul class="navbar-nav">
35
+ <li class="nav-item dropdown">
36
+ <a href="#" class="nav-link dropdown-toggle" type="button" id="localeOptions" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
37
+ <%= I18n.locale %>
38
+ </a>
39
+
40
+ <ul class="dropdown-menu" aria-labelledby="localeOptions">
41
+ <% I18n.available_locales.reject { |locale| locale == I18n.locale }.each do |locale| %>
42
+ <li><%= link_to locale, url_for(locale: locale), class: "dropdown-item" %></li>
43
+ <% end %>
44
+ </ul>
45
+ </li>
46
+ </ul>
47
+ </div>
48
+ </div>
49
+ </nav>
@@ -0,0 +1,32 @@
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/announcement" %>
25
+ <%= render "good_job/shared/alert" %>
26
+
27
+ <%= yield %>
28
+ </div>
29
+
30
+ <%= render "good_job/shared/footer" %>
31
+ </body>
32
+ </html>
@@ -0,0 +1,56 @@
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
+ announcement:
45
+ work_in_progress_html: "🚧 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>."
46
+ footer:
47
+ last_update_html: Last updated <time id="page-updated-at" datetime="%{time}">%{time}</time>
48
+ wording: Remember, you're doing a Good Job too!
49
+ navbar:
50
+ coming_soon: More views coming soon
51
+ cron_schedules: Cron Schedules
52
+ executions: All Executions
53
+ jobs: All Jobs
54
+ live_poll: Live Poll
55
+ name: "GoodJob 👍"
56
+ processes: Processes
@@ -0,0 +1,56 @@
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
+ announcement:
45
+ work_in_progress_html: "🚧 GoodJob se encuentra en desarrollo. Por favor contribuya en <a href=\"https://github.com/bensheldon/good_job/issues\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">GoodJob</a> con ideas y código."
46
+ footer:
47
+ last_update_html: Última actualización <time id="page-updated-at" datetime="%{time}">%{time}</time>
48
+ wording: "¡Recuerda, también tú estás haciendo un buen trabajo!"
49
+ navbar:
50
+ coming_soon: Próximamente más vistas
51
+ cron_schedules: Tareas Programadas
52
+ executions: Ejecuciones
53
+ jobs: Tareas
54
+ live_poll: En vivo
55
+ name: "GoodJob 👍"
56
+ processes: Procesos
@@ -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 execution_mode || queues || max_threads || poll_interval || start_async_on_initialize
32
+ ActiveSupport::Deprecation.warn(
33
+ "The GoodJob::Adapter's initialization parameters 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.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.11.3
4
+ version: 2.12.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-03-30 00:00:00.000000000 Z
11
+ date: 2022-04-05 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,12 @@ 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
389
+ - engine/app/views/good_job/shared/_announcement.erb
388
390
  - engine/app/views/good_job/shared/_chart.erb
389
391
  - engine/app/views/good_job/shared/_filter.erb
392
+ - engine/app/views/good_job/shared/_footer.erb
393
+ - engine/app/views/good_job/shared/_navbar.erb
390
394
  - engine/app/views/good_job/shared/icons/_arrow_clockwise.html.erb
391
395
  - engine/app/views/good_job/shared/icons/_check.html.erb
392
396
  - engine/app/views/good_job/shared/icons/_exclamation.html.erb
@@ -394,7 +398,9 @@ files:
394
398
  - engine/app/views/good_job/shared/icons/_skip_forward.html.erb
395
399
  - engine/app/views/good_job/shared/icons/_stop.html.erb
396
400
  - engine/app/views/good_job/shared/icons/_trash.html.erb
397
- - engine/app/views/layouts/good_job/base.html.erb
401
+ - engine/app/views/layouts/good_job/application.html.erb
402
+ - engine/config/locales/en.yml
403
+ - engine/config/locales/es.yml
398
404
  - engine/config/routes.rb
399
405
  - engine/lib/good_job/engine.rb
400
406
  - 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>