good_job 2.5.0 → 2.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (30) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -0
  3. data/README.md +1 -1
  4. data/engine/app/assets/vendor/rails_ujs.js +747 -0
  5. data/engine/app/controllers/good_job/assets_controller.rb +4 -0
  6. data/engine/app/controllers/good_job/cron_entries_controller.rb +19 -0
  7. data/engine/app/filters/good_job/base_filter.rb +6 -5
  8. data/engine/app/filters/good_job/executions_filter.rb +1 -1
  9. data/engine/app/filters/good_job/jobs_filter.rb +1 -1
  10. data/engine/app/views/good_job/cron_entries/index.html.erb +51 -0
  11. data/engine/app/views/good_job/cron_entries/show.html.erb +4 -0
  12. data/engine/app/views/good_job/{shared/_executions_table.erb → executions/_table.erb} +1 -1
  13. data/engine/app/views/good_job/executions/index.html.erb +1 -1
  14. data/engine/app/views/good_job/{shared/_jobs_table.erb → jobs/_table.erb} +3 -3
  15. data/engine/app/views/good_job/jobs/index.html.erb +1 -1
  16. data/engine/app/views/good_job/jobs/show.html.erb +2 -2
  17. data/engine/app/views/good_job/shared/_filter.erb +9 -10
  18. data/engine/app/views/good_job/shared/icons/_play.html.erb +4 -0
  19. data/engine/app/views/layouts/good_job/base.html.erb +2 -1
  20. data/engine/config/routes.rb +8 -1
  21. data/{engine/app/models → lib}/good_job/active_job_job.rb +0 -0
  22. data/lib/good_job/configuration.rb +1 -1
  23. data/lib/good_job/cron_entry.rb +75 -4
  24. data/lib/good_job/cron_manager.rb +1 -5
  25. data/lib/good_job/current_thread.rb +26 -8
  26. data/lib/good_job/execution.rb +15 -13
  27. data/lib/good_job/version.rb +1 -1
  28. metadata +14 -11
  29. data/engine/app/controllers/good_job/cron_schedules_controller.rb +0 -9
  30. data/engine/app/views/good_job/cron_schedules/index.html.erb +0 -72
@@ -1,72 +0,0 @@
1
- <% if @cron_entries.present? %>
2
- <div class="card my-3">
3
- <div class="table-responsive">
4
- <table class="table card-table table-bordered table-hover table-sm mb-0">
5
- <thead>
6
- <th>Cron Job Name</th>
7
- <th>Configuration</th>
8
- <th>
9
- Set&nbsp;
10
- <%= tag.button "Toggle", type: "button", class: "btn btn-sm btn-outline-primary", role: "button",
11
- data: { bs_toggle: "collapse", bs_target: ".job-properties" },
12
- aria: { expanded: false, controls: @cron_entries.map { |cron_entry| dom_id(cron_entry, 'properties') }.join(" ") }
13
- %>
14
- </th>
15
- <th>
16
- Args&nbsp;
17
- <%= tag.button "Toggle", type: "button", class: "btn btn-sm btn-outline-primary", role: "button",
18
- data: { bs_toggle: "collapse", bs_target: ".job-args" },
19
- aria: { expanded: false, controls: @cron_entries.map { |cron_entry| dom_id(cron_entry, 'args') }.join(" ") }
20
- %>
21
- </th>
22
- <th>Class</th>
23
- <th>Description</th>
24
- <th>Next scheduled</th>
25
- </thead>
26
- <tbody>
27
- <% @cron_entries.each do |cron_entry| %>
28
- <tr>
29
- <td class="font-monospace"><%= cron_entry.key %></td>
30
- <td class="font-monospace"><%= cron_entry.cron %></td>
31
- <td>
32
- <%=
33
- case cron_entry.set
34
- when NilClass
35
- "None"
36
- when Proc
37
- "Lambda/Callable"
38
- when Hash
39
- tag.button("Preview", type: "button", class: "btn btn-sm btn-outline-primary", role: "button",
40
- data: { bs_toggle: "collapse", bs_target: "##{dom_id(cron_entry, 'properties')}" },
41
- aria: { expanded: false, controls: dom_id(cron_entry, 'properties') }) +
42
- tag.pre(JSON.pretty_generate(cron_entry.set), id: dom_id(cron_entry, 'properties'), class: "collapse job-properties")
43
- end
44
- %>
45
- </td>
46
- <td>
47
- <%=
48
- case cron_entry.args
49
- when NilClass
50
- "None"
51
- when Proc
52
- "Lambda/Callable"
53
- when Hash
54
- tag.button("Preview", type: "button", class: "btn btn-sm btn-outline-primary", role: "button",
55
- data: { bs_toggle: "collapse", bs_target: "##{dom_id(cron_entry, 'args')}" },
56
- aria: { expanded: false, controls: dom_id(cron_entry, 'args') }) +
57
- tag.pre(JSON.pretty_generate(cron_entry.args), id: dom_id(cron_entry, 'args'), class: "collapse job-args")
58
- end
59
- %>
60
- </td>
61
- <td class="font-monospace"><%= cron_entry.job_class %></td>
62
- <td><%= cron_entry.description %></td>
63
- <td><%= cron_entry.next_at %></td>
64
- </tr>
65
- <% end %>
66
- </tbody>
67
- </table>
68
- </div>
69
- </div>
70
- <% else %>
71
- <em>No cron jobs present.</em>
72
- <% end %>