solid_queue_interface 0.2.0 → 0.3.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.
Files changed (24) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +17 -1
  3. data/app/assets/stylesheets/solid_queue_interface/application.css +21 -2
  4. data/app/assets/stylesheets/solid_queue_interface/overrides.css +6 -0
  5. data/app/views/layouts/solid_queue_interface/application.html.erb +1 -1
  6. data/app/views/solid_queue_interface/jobs/blocked.html.erb +19 -19
  7. data/app/views/solid_queue_interface/jobs/claimed.html.erb +13 -13
  8. data/app/views/solid_queue_interface/jobs/failed.html.erb +19 -19
  9. data/app/views/solid_queue_interface/jobs/index.html.erb +25 -25
  10. data/app/views/solid_queue_interface/jobs/ready.html.erb +15 -15
  11. data/app/views/solid_queue_interface/jobs/recurring.html.erb +15 -15
  12. data/app/views/solid_queue_interface/jobs/scheduled.html.erb +17 -17
  13. data/app/views/solid_queue_interface/jobs/show.html.erb +15 -15
  14. data/app/views/solid_queue_interface/processes/index.html.erb +21 -21
  15. data/app/views/solid_queue_interface/queues/index.html.erb +13 -13
  16. data/app/views/solid_queue_interface/queues/paused.html.erb +11 -11
  17. data/lib/generators/solid_queue_interface/override_css/USAGE +8 -0
  18. data/lib/generators/solid_queue_interface/override_css/override_css_generator.rb +14 -0
  19. data/lib/generators/solid_queue_interface/override_layout_and_navbar/USAGE +8 -0
  20. data/lib/generators/solid_queue_interface/override_layout_and_navbar/override_layout_and_navbar_generator.rb +13 -0
  21. data/lib/generators/solid_queue_interface/override_views/USAGE +20 -0
  22. data/lib/generators/solid_queue_interface/override_views/override_views_generator.rb +13 -0
  23. data/lib/solid_queue_interface/version.rb +1 -1
  24. metadata +9 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 145550af5ed2f2795a44c5123c08e7c610acfd6ce920c80ea7203aa210a31711
4
- data.tar.gz: 64b11ef356a32e509cfa5c4054d434ddd1f0144dbf149df37cbceb3b2b44d57d
3
+ metadata.gz: c2f1030315cba7e5ae6e5651afd357afc5a70767a8ef3003d43706399e698142
4
+ data.tar.gz: 5dde197063e2c8f8c5bd8aee8e71ba730ce29cde54c215d32ed62bcf3a2fe619
5
5
  SHA512:
6
- metadata.gz: 415ad0eebd74f37e2ca00069760739bb4658bcd9ea737b7dc4213c55fd9979d558b83db90be89912320acc722b3aac1bdc9b323ca1ca83f4d5f48e4fdebdc960
7
- data.tar.gz: c97bce8bc95c1c8844de4b0964726ab8106c76b055703423b250b0da5e7f5d153c6f5f6033348f0a200ccbca696bae4eaecca9ab1d4e2d38416db7fb6a42792e
6
+ metadata.gz: 15e91622f1408e83905440648a23e3fa622e29f83cea1e79952ac6829c9f34d612f8210d517ae10b6f24a313724bf4a868f1f6a2f5705fabdbd4f5874343dbaa
7
+ data.tar.gz: 970874a42e77bebf4ed13c5431a78e07a978ed04f147885755a73dede61e272b5b51e73ea51a7e01f9f32d40ad7f66419099454d54052cd98cf8982a2d2a2385
data/README.md CHANGED
@@ -24,10 +24,26 @@ Update `config/routes.rb` to mount `SolidQueueInterface::Engine` like so:
24
24
  ```
25
25
  Now you can access SolidQueueInterface at `<YOUR_URL>/solid_queue_interface`
26
26
 
27
+ ## Customization
28
+ ### CSS/UI Styling
29
+ You can use `bin/rails g solid_queue_interface:override_css` which will create `overrides.css` in your project.
30
+ You can then add your styles to that file and it will get reflected on SolidQueueInterface portal.
31
+ You can even overrides default styles of navbar, tables or pagy (pagination) for the portal.
32
+ You can refer to default styles are present in [solid_queue_interface/application.css](https://github.com/AquisTech/solid_queue_interface/blob/main/app/assets/stylesheets/solid_queue_interface/application.css)
33
+ For easy customization, `<body>` of the portal is assigned with `id` as `solid_queue_interface`.
34
+ Also, `class` is assigned in format `solid_queue_interface-<controller_name>-<action_name>` so that you can customize styles on controller-action basis.
35
+ ### Views/UI
36
+ You can use `bin/rails g solid_queue_interface:override_views` to copy views to your project.
37
+ You can then customize view code as per your needs and it will get reflected on SolidQueueInterface portal.
38
+ You can keep only views that you need customization and you can delete other views so that they will be fetched from gem.
39
+ ### Layout and Navbar
40
+ You can use `bin/rails g solid_queue_interface:override_layout_and_navbar` to copy layout template and navbar partial to your project.
41
+ You can then customize layout and navbar code as per your needs and it will get reflected on SolidQueueInterface portal.
42
+
27
43
  ## ToDo
28
- * Generator to copy views to your project for overriding
29
44
  * Sorting on columns
30
45
  * Searching on columns
46
+ * Authorization
31
47
 
32
48
  ## Contributing
33
49
  Bug reports, feature requests and pull requests are welcome on GitHub at [https://github.com/aquistech/solid_queue_interface](https://github.com/aquistech/solid_queue_interface). This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/aquistech/solid_queue_interface/blob/main/CODE_OF_CONDUCT.md).
@@ -12,8 +12,8 @@
12
12
  *
13
13
  *= require_tree .
14
14
  *= require_self
15
- */
16
-
15
+ *= require 'solid_queue_interface/overrides'
16
+ */
17
17
  body {
18
18
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
19
19
  }
@@ -67,3 +67,22 @@ body {
67
67
  #solid_queue_interface .navbar .navbar-link {
68
68
  padding: 0 0.5em;
69
69
  }
70
+ /* Styling for action buttons */
71
+ #solid_queue_interface .btn {
72
+ border-width: 1px;
73
+ border-radius: 0.25rem;
74
+ border-style: solid;
75
+ color: white;
76
+ }
77
+ #solid_queue_interface .btn.retry-btn {
78
+ background: #198754;
79
+ border-color: #198754;
80
+ }
81
+ #solid_queue_interface .btn.pause-btn {
82
+ background: #dc3545;
83
+ border-color: #dc3545;
84
+ }
85
+ #solid_queue_interface .btn.resume-btn {
86
+ background: #198754;
87
+ border-color: #198754;
88
+ }
@@ -0,0 +1,6 @@
1
+ /* ************************** overrides.css ************************** */
2
+ /* This CSS file is just a placeholder in gem.
3
+ You can customize styles of elements by putting your styles in a file
4
+ `solid_queue_interface/overrides.css` in your project.
5
+ You can use rake task to copy this file to your project.
6
+ Use command `rails g solid_queue_interface:override_css` */
@@ -5,10 +5,10 @@
5
5
  <%= csrf_meta_tags %>
6
6
  <%= csp_meta_tag %>
7
7
 
8
- <%= stylesheet_link_tag "solid_queue_interface/application", media: "all" %>
9
8
  <style type="text/css">
10
9
  <%== Pagy.root.join('stylesheets', 'pagy.css').read %>
11
10
  </style>
11
+ <%= stylesheet_link_tag "solid_queue_interface/application", media: "all" %>
12
12
  </head>
13
13
  <body id='solid_queue_interface' class='solid_queue_interface-<%= controller_name %>-<%= action_name %>'>
14
14
  <%= render partial: 'layouts/solid_queue_interface/navbar' %>
@@ -1,26 +1,26 @@
1
1
  <h1>Blocked Executions</h1>
2
- <table class='table'>
3
- <thead class='thead'>
4
- <tr class='thead-tr'>
5
- <th class='thead-th'>ID</th>
6
- <th class='thead-th'>Job ID</th>
7
- <th class='thead-th'>Queue</th>
8
- <th class='thead-th'>Priority</th>
9
- <th class='thead-th'>Concurrency Key</th>
10
- <th class='thead-th'>Created</th>
11
- <th class='thead-th'>Expires</th>
2
+ <table>
3
+ <thead>
4
+ <tr>
5
+ <th>ID</th>
6
+ <th>Job ID</th>
7
+ <th>Queue</th>
8
+ <th>Priority</th>
9
+ <th>Concurrency Key</th>
10
+ <th>Created</th>
11
+ <th>Expires</th>
12
12
  </tr>
13
13
  </thead>
14
- <tbody class='tbody'>
14
+ <tbody>
15
15
  <% @jobs.each do |job| %>
16
- <tr class='tbody-tr'>
17
- <td class='tbody-td'><%= job.id %></td>
18
- <td class='tbody-td'><%= job.job_id %></td>
19
- <td class='tbody-td'><%= job.queue_name %></td>
20
- <td class='tbody-td'><%= job.priority %></td>
21
- <td class='tbody-td'><%= job.concurrency_key %></td>
22
- <td class='tbody-td'><%= job.created_at %></td>
23
- <td class='tbody-td'><%= job.expires_at %></td>
16
+ <tr>
17
+ <td><%= job.id %></td>
18
+ <td><%= job.job_id %></td>
19
+ <td><%= job.queue_name %></td>
20
+ <td><%= job.priority %></td>
21
+ <td><%= job.concurrency_key %></td>
22
+ <td><%= job.created_at %></td>
23
+ <td><%= job.expires_at %></td>
24
24
  </tr>
25
25
  <% end %>
26
26
  </tbody>
@@ -1,20 +1,20 @@
1
1
  <h1>Claimed Executions</h1>
2
- <table class='table'>
3
- <thead class='thead'>
4
- <tr class='thead-tr'>
5
- <th class='thead-th'>ID</th>
6
- <th class='thead-th'>Job ID</th>
7
- <th class='thead-th'>Process ID</th>
8
- <th class='thead-th'>Created</th>
2
+ <table>
3
+ <thead>
4
+ <tr>
5
+ <th>ID</th>
6
+ <th>Job ID</th>
7
+ <th>Process ID</th>
8
+ <th>Created</th>
9
9
  </tr>
10
10
  </thead>
11
- <tbody class='tbody'>
11
+ <tbody>
12
12
  <% @jobs.each do |job| %>
13
- <tr class='tbody-tr'>
14
- <td class='tbody-td'><%= job.id %></td>
15
- <td class='tbody-td'><%= job.job_id %></td>
16
- <td class='tbody-td'><%= job.process_id %></td>
17
- <td class='tbody-td'><%= job.created_at %></td>
13
+ <tr>
14
+ <td><%= job.id %></td>
15
+ <td><%= job.job_id %></td>
16
+ <td><%= job.process_id %></td>
17
+ <td><%= job.created_at %></td>
18
18
  </tr>
19
19
  <% end %>
20
20
  </tbody>
@@ -1,26 +1,26 @@
1
1
  <h1>Failed Executions</h1>
2
- <table class='table'>
3
- <thead class='thead'>
4
- <tr class='thead-tr'>
5
- <th class='thead-th'>ID</th>
6
- <th class='thead-th'>Job ID</th>
7
- <th class='thead-th'>Exception Class</th>
8
- <th class='thead-th'>Exception Message</th>
9
- <th class='thead-th'>Error Details</th>
10
- <th class='thead-th'>Created</th>
11
- <th class='thead-th'>Retry</th>
2
+ <table>
3
+ <thead>
4
+ <tr>
5
+ <th>ID</th>
6
+ <th>Job ID</th>
7
+ <th>Exception Class</th>
8
+ <th>Exception Message</th>
9
+ <th>Error Details</th>
10
+ <th>Created</th>
11
+ <th>Retry</th>
12
12
  </tr>
13
13
  </thead>
14
- <tbody class='tbody'>
14
+ <tbody>
15
15
  <% @jobs.each do |job| %>
16
- <tr class='tbody-tr'>
17
- <td class='tbody-td'><%= job.id %></td>
18
- <td class='tbody-td'><%= job.job_id %></td>
19
- <td class='tbody-td'><%= job.exception_class %></td>
20
- <td class='tbody-td'><%= job.message %></td>
21
- <td class='tbody-td'><%= link_to 'Backtrace', solid_queue_interface_job_path(job) %></td>
22
- <td class='tbody-td'><%= job.created_at %></td>
23
- <td class='tbody-td'><%= button_to "Retry Job", retry_solid_queue_interface_job_path(job) %></td>
16
+ <tr>
17
+ <td><%= job.id %></td>
18
+ <td><%= job.job_id %></td>
19
+ <td><%= job.exception_class %></td>
20
+ <td><%= job.message %></td>
21
+ <td><%= link_to 'Backtrace', solid_queue_interface_job_path(job) %></td>
22
+ <td><%= job.created_at %></td>
23
+ <td><%= button_to "Retry Job", retry_solid_queue_interface_job_path(job), class: 'btn retry-btn' %></td>
24
24
  </tr>
25
25
  <% end %>
26
26
  </tbody>
@@ -1,32 +1,32 @@
1
1
  <h1>All Jobs</h1>
2
- <table class='table'>
3
- <thead class='thead'>
4
- <tr class='thead-tr'>
5
- <th class='thead-th'>ID</th>
6
- <th class='thead-th'>Class</th>
7
- <th class='thead-th'>Queue</th>
8
- <th class='thead-th'>Arguments</th>
9
- <th class='thead-th'>Priority</th>
10
- <th class='thead-th'>Active Job ID</th>
11
- <th class='thead-th'>Concurrency Key</th>
12
- <th class='thead-th'>Created</th>
13
- <th class='thead-th'>Scheduled</th>
14
- <th class='thead-th'>Finished</th>
2
+ <table>
3
+ <thead>
4
+ <tr>
5
+ <th>ID</th>
6
+ <th>Class</th>
7
+ <th>Queue</th>
8
+ <th>Arguments</th>
9
+ <th>Priority</th>
10
+ <th>Active Job ID</th>
11
+ <th>Concurrency Key</th>
12
+ <th>Created</th>
13
+ <th>Scheduled</th>
14
+ <th>Finished</th>
15
15
  </tr>
16
16
  </thead>
17
- <tbody class='tbody'>
17
+ <tbody>
18
18
  <% @jobs.each do |job| %>
19
- <tr class='tbody-tr'>
20
- <td class='tbody-td'><%= job.id %></td>
21
- <td class='tbody-td'><%= job.class_name %></td>
22
- <td class='tbody-td'><%= job.queue_name %></td>
23
- <td class='tbody-td'><%= job.arguments %></td>
24
- <td class='tbody-td'><%= job.priority %></td>
25
- <td class='tbody-td'><%= job.active_job_id %></td>
26
- <td class='tbody-td'><%= job.concurrency_key %></td>
27
- <td class='tbody-td'><%= job.created_at %></td>
28
- <td class='tbody-td'><%= job.scheduled_at %></td>
29
- <td class='tbody-td'><%= job.finished_at %></td>
19
+ <tr>
20
+ <td><%= job.id %></td>
21
+ <td><%= job.class_name %></td>
22
+ <td><%= job.queue_name %></td>
23
+ <td><%= job.arguments %></td>
24
+ <td><%= job.priority %></td>
25
+ <td><%= job.active_job_id %></td>
26
+ <td><%= job.concurrency_key %></td>
27
+ <td><%= job.created_at %></td>
28
+ <td><%= job.scheduled_at %></td>
29
+ <td><%= job.finished_at %></td>
30
30
  </tr>
31
31
  <% end %>
32
32
  </tbody>
@@ -1,22 +1,22 @@
1
1
  <h1>Ready Executions</h1>
2
- <table class='table'>
3
- <thead class='thead'>
4
- <tr class='thead-tr'>
5
- <th class='thead-th'>ID</th>
6
- <th class='thead-th'>Job ID</th>
7
- <th class='thead-th'>Queue</th>
8
- <th class='thead-th'>Priority</th>
9
- <th class='thead-th'>Created</th>
2
+ <table>
3
+ <thead>
4
+ <tr>
5
+ <th>ID</th>
6
+ <th>Job ID</th>
7
+ <th>Queue</th>
8
+ <th>Priority</th>
9
+ <th>Created</th>
10
10
  </tr>
11
11
  </thead>
12
- <tbody class='tbody'>
12
+ <tbody>
13
13
  <% @jobs.each do |job| %>
14
- <tr class='tbody-tr'>
15
- <td class='tbody-td'><%= job.id %></td>
16
- <td class='tbody-td'><%= job.job_id %></td>
17
- <td class='tbody-td'><%= job.queue_name %></td>
18
- <td class='tbody-td'><%= job.priority %></td>
19
- <td class='tbody-td'><%= job.created_at %></td>
14
+ <tr>
15
+ <td><%= job.id %></td>
16
+ <td><%= job.job_id %></td>
17
+ <td><%= job.queue_name %></td>
18
+ <td><%= job.priority %></td>
19
+ <td><%= job.created_at %></td>
20
20
  </tr>
21
21
  <% end %>
22
22
  </tbody>
@@ -1,22 +1,22 @@
1
1
  <h1>Recurring Executions</h1>
2
- <table class='table'>
3
- <thead class='thead'>
4
- <tr class='thead-tr'>
5
- <th class='thead-th'>ID</th>
6
- <th class='thead-th'>Job ID</th>
7
- <th class='thead-th'>Task Key</th>
8
- <th class='thead-th'>Run At</th>
9
- <th class='thead-th'>Created</th>
2
+ <table>
3
+ <thead>
4
+ <tr>
5
+ <th>ID</th>
6
+ <th>Job ID</th>
7
+ <th>Task Key</th>
8
+ <th>Run At</th>
9
+ <th>Created</th>
10
10
  </tr>
11
11
  </thead>
12
- <tbody class='tbody'>
12
+ <tbody>
13
13
  <% @jobs.each do |job| %>
14
- <tr class='tbody-tr'>
15
- <td class='tbody-td'><%= job.id %></td>
16
- <td class='tbody-td'><%= job.job_id %></td>
17
- <td class='tbody-td'><%= job.task_key %></td>
18
- <td class='tbody-td'><%= job.run_at %></td>
19
- <td class='tbody-td'><%= job.created_at %></td>
14
+ <tr>
15
+ <td><%= job.id %></td>
16
+ <td><%= job.job_id %></td>
17
+ <td><%= job.task_key %></td>
18
+ <td><%= job.run_at %></td>
19
+ <td><%= job.created_at %></td>
20
20
  </tr>
21
21
  <% end %>
22
22
  </tbody>
@@ -1,24 +1,24 @@
1
1
  <h1>Scheduled Executions</h1>
2
- <table class='table'>
3
- <thead class='thead'>
4
- <tr class='thead-tr'>
5
- <th class='thead-th'>ID</th>
6
- <th class='thead-th'>Job ID</th>
7
- <th class='thead-th'>Queue</th>
8
- <th class='thead-th'>Priority</th>
9
- <th class='thead-th'>Created</th>
10
- <th class='thead-th'>Scheduled</th>
2
+ <table>
3
+ <thead>
4
+ <tr>
5
+ <th>ID</th>
6
+ <th>Job ID</th>
7
+ <th>Queue</th>
8
+ <th>Priority</th>
9
+ <th>Created</th>
10
+ <th>Scheduled</th>
11
11
  </tr>
12
12
  </thead>
13
- <tbody class='tbody'>
13
+ <tbody>
14
14
  <% @jobs.each do |job| %>
15
- <tr class='tbody-tr'>
16
- <td class='tbody-td'><%= job.id %></td>
17
- <td class='tbody-td'><%= job.job_id %></td>
18
- <td class='tbody-td'><%= job.queue_name %></td>
19
- <td class='tbody-td'><%= job.priority %></td>
20
- <td class='tbody-td'><%= job.created_at %></td>
21
- <td class='tbody-td'><%= job.scheduled_at %></td>
15
+ <tr>
16
+ <td><%= job.id %></td>
17
+ <td><%= job.job_id %></td>
18
+ <td><%= job.queue_name %></td>
19
+ <td><%= job.priority %></td>
20
+ <td><%= job.created_at %></td>
21
+ <td><%= job.scheduled_at %></td>
22
22
  </tr>
23
23
  <% end %>
24
24
  </tbody>
@@ -1,26 +1,26 @@
1
1
  <h1>Failed Executions Details For #<%= @job.id %></h1>
2
- <table class='table'>
3
- <thead class='thead'>
4
- <tr class='thead-tr'>
5
- <th class='thead-th'>Attribute</th>
6
- <th class='thead-th'>Details</th>
2
+ <table>
3
+ <thead>
4
+ <tr>
5
+ <th>Attribute</th>
6
+ <th>Details</th>
7
7
  </tr>
8
8
  </thead>
9
- <tbody class='tbody'>
9
+ <tbody>
10
10
  <% attributes = { id: 'ID', job_id: 'Job ID', created_at: 'Created', exception_class: 'Exception Class', message: 'Exception Message' } %>
11
11
  <% attributes.each do |method, title| %>
12
- <tr class='tbody-tr'>
13
- <td class='tbody-td'><b><%= title %></b></td>
14
- <td class='tbody-td'><%= @job.send(method) %></td>
12
+ <tr>
13
+ <td><b><%= title %></b></td>
14
+ <td><%= @job.send(method) %></td>
15
15
  </tr>
16
16
  <% end %>
17
- <tr class='tbody-tr'>
18
- <td class='tbody-td'><b>Backtrace</b></td>
19
- <td class='tbody-td'><%= @job.backtrace.join("<br>").html_safe %></td>
17
+ <tr>
18
+ <td><b>Backtrace</b></td>
19
+ <td><%= @job.backtrace.join("<br>").html_safe %></td>
20
20
  </tr>
21
- <tr class='tbody-tr'>
22
- <td class='tbody-td'><b>Action</b></td>
23
- <td class='tbody-td'><%= button_to "Retry Job", retry_solid_queue_interface_job_path(@job) %></td>
21
+ <tr>
22
+ <td><b>Action</b></td>
23
+ <td><%= button_to "Retry Job", retry_solid_queue_interface_job_path(@job), class: 'btn retry-btn' %></td>
24
24
  </tr>
25
25
  </tbody>
26
26
  </table>
@@ -1,34 +1,34 @@
1
1
  <h1>Processes</h1>
2
- <table class='table'>
3
- <thead class='thead'>
4
- <tr class='thead-tr'>
5
- <th class='thead-th'>ID</th>
6
- <th class='thead-th'>Kind</th>
7
- <th class='thead-th'>Last Heartbeat At</th>
8
- <th class='thead-th'>Supervisor</th>
9
- <th class='thead-th'>PID</th>
10
- <th class='thead-th'>Hostname</th>
11
- <th class='thead-th'>Metadata</th>
12
- <th class='thead-th'>Created</th>
2
+ <table>
3
+ <thead>
4
+ <tr>
5
+ <th>ID</th>
6
+ <th>Kind</th>
7
+ <th>Last Heartbeat At</th>
8
+ <th>Supervisor</th>
9
+ <th>PID</th>
10
+ <th>Hostname</th>
11
+ <th>Metadata</th>
12
+ <th>Created</th>
13
13
  </tr>
14
14
  </thead>
15
- <tbody class='tbody'>
15
+ <tbody>
16
16
  <% @processes.each do |process| %>
17
- <tr class='tbody-tr'>
18
- <td class='tbody-td'><%= process.id %></td>
19
- <td class='tbody-td'><%= process.kind %></td>
20
- <td class='tbody-td'><%= process.last_heartbeat_at %></td>
21
- <td class='tbody-td'><%= process.supervisor_id %></td>
22
- <td class='tbody-td'><%= process.pid %></td>
23
- <td class='tbody-td'><%= process.hostname %></td>
24
- <td class='tbody-td'>
17
+ <tr>
18
+ <td><%= process.id %></td>
19
+ <td><%= process.kind %></td>
20
+ <td><%= process.last_heartbeat_at %></td>
21
+ <td><%= process.supervisor_id %></td>
22
+ <td><%= process.pid %></td>
23
+ <td><%= process.hostname %></td>
24
+ <td>
25
25
  <ul>
26
26
  <% process.metadata.each do |setting, value| %>
27
27
  <li><%= setting %>: <%= value %></li>
28
28
  <% end %>
29
29
  </ul>
30
30
  </td>
31
- <td class='tbody-td'><%= process.created_at %></td>
31
+ <td><%= process.created_at %></td>
32
32
  </tr>
33
33
  <% end %>
34
34
  </tbody>
@@ -1,22 +1,22 @@
1
1
  <h1>All Queues</h1>
2
- <table class='table'>
3
- <thead class='thead'>
4
- <tr class='thead-tr'>
5
- <th class='thead-th'>Name</th>
6
- <th class='thead-th'>Size</th>
7
- <th class='thead-th'>Action</th>
2
+ <table>
3
+ <thead>
4
+ <tr>
5
+ <th>Name</th>
6
+ <th>Size</th>
7
+ <th>Action</th>
8
8
  </tr>
9
9
  </thead>
10
- <tbody class='tbody'>
10
+ <tbody>
11
11
  <% @queues.each do |queue| %>
12
- <tr class='tbody-tr'>
13
- <td class='tbody-td'><%= queue.name %></td>
14
- <td class='tbody-td'><%= queue.size %></td>
15
- <td class='tbody-td'>
12
+ <tr>
13
+ <td><%= queue.name %></td>
14
+ <td><%= queue.size %></td>
15
+ <td>
16
16
  <% if queue.paused? %>
17
- <%= button_to 'Resume', resume_solid_queue_interface_queue_path(queue.name) %>
17
+ <%= button_to 'Resume', resume_solid_queue_interface_queue_path(queue.name), class: 'btn resume-btn' %>
18
18
  <% else %>
19
- <%= button_to 'Pause', pause_solid_queue_interface_queue_path(queue.name) %>
19
+ <%= button_to 'Pause', pause_solid_queue_interface_queue_path(queue.name), class: 'btn pause-btn' %>
20
20
  <% end %>
21
21
  </td>
22
22
  </tr>
@@ -1,18 +1,18 @@
1
1
  <h1>Paused Queues</h1>
2
- <table class='table'>
3
- <thead class='thead'>
4
- <tr class='thead-tr'>
5
- <th class='thead-th'>#</th>
6
- <th class='thead-th'>Name</th>
7
- <th class='thead-th'>Created</th>
2
+ <table>
3
+ <thead>
4
+ <tr>
5
+ <th>#</th>
6
+ <th>Name</th>
7
+ <th>Created</th>
8
8
  </tr>
9
9
  </thead>
10
- <tbody class='tbody'>
10
+ <tbody>
11
11
  <% @queues.each do |queue| %>
12
- <tr class='tbody-tr'>
13
- <td class='tbody-td'><%= queue.id %></td>
14
- <td class='tbody-td'><%= queue.queue_name %></td>
15
- <td class='tbody-td'><%= queue.created_at %></td>
12
+ <tr>
13
+ <td><%= queue.id %></td>
14
+ <td><%= queue.queue_name %></td>
15
+ <td><%= queue.created_at %></td>
16
16
  </tr>
17
17
  <% end %>
18
18
  </tbody>
@@ -0,0 +1,8 @@
1
+ Description:
2
+ This generator is used to create `solid_queue_interface/overrides.css` in your project's `app/assets/stylesheets` folder where you can add custom styles to override default styles of tables, navbar and pagy for SolidQueueInterface portal.
3
+
4
+ Example:
5
+ bin/rails g solid_queue_interface:override_css
6
+
7
+ This will create:
8
+ `solid_queue_interface/overrides.css` in your project's `app/assets/stylesheets` folder
@@ -0,0 +1,14 @@
1
+ require 'rails/generators/base'
2
+
3
+ class SolidQueueInterface::OverrideCssGenerator < Rails::Generators::Base
4
+ source_root File.expand_path(".", __dir__)
5
+
6
+ desc <<-DESC
7
+ Creates blank `overrides.css` into your project.
8
+ You can add styles to that file to override default styling of table, navbar and pagy for SolidQueueInterface portal.
9
+ DESC
10
+
11
+ def copy_overrides_css_file
12
+ copy_file "../../../../app/assets/stylesheets/solid_queue_interface/overrides.css", "app/assets/stylesheets/solid_queue_interface/overrides.css"
13
+ end
14
+ end
@@ -0,0 +1,8 @@
1
+ Description:
2
+ This generator is used to copy solid_queue_interface layout template and navbar partial to your project where you can customize SolidQueueInterface portal as per your needs.
3
+
4
+ Example:
5
+ bin/rails g solid_queue_interface:override_layout_and_navbar
6
+
7
+ This will create:
8
+ Layout template `application.html.erb` and navbar partial `_navbar.html.erb` to `app/views/layouts/solid_queue_interface` of your project
@@ -0,0 +1,13 @@
1
+ require 'rails/generators/base'
2
+
3
+ class SolidQueueInterface::OverrideLayoutAndNavbarGenerator < Rails::Generators::Base
4
+ source_root File.expand_path(".", __dir__)
5
+
6
+ desc <<-DESC
7
+ This generator is used to copy solid_queue_interface layout template and navbar partial to your project where you can customize SolidQueueInterface portal as per your needs.
8
+ DESC
9
+
10
+ def copy_layout_and_navbar
11
+ directory "../../../../app/views/layouts/solid_queue_interface", "app/views/layouts/solid_queue_interface"
12
+ end
13
+ end
@@ -0,0 +1,20 @@
1
+ Description:
2
+ This generator is used to copy solid_queue_interface views to your project's `app/views` folder where you can customize SolidQueueInterface portal as per your needs.
3
+
4
+ Example:
5
+ bin/rails g solid_queue_interface:override_views
6
+
7
+ This will create:
8
+ Following files in your project's `app/views/solid_queue_interface` folder:
9
+ - jobs/blocked.html.erb
10
+ - jobs/claimed.html.erb
11
+ - jobs/failed.html.erb
12
+ - jobs/index.html.erb
13
+ - jobs/ready.html.erb
14
+ - jobs/recurring.html.erb
15
+ - jobs/scheduled.html.erb
16
+ - jobs/show.html.erb
17
+ - processes/index.html.erb
18
+ - queues/index.html.erb
19
+ - queues/paused.html.erb
20
+ - semaphores/index.html.erb
@@ -0,0 +1,13 @@
1
+ require 'rails/generators/base'
2
+
3
+ class SolidQueueInterface::OverrideViewsGenerator < Rails::Generators::Base
4
+ source_root File.expand_path(".", __dir__)
5
+
6
+ desc <<-DESC
7
+ This generator is used to copy solid_queue_interface views to your project's `app/views` folder where you can customize SolidQueueInterface portal as per your needs.
8
+ DESC
9
+
10
+ def copy_views
11
+ directory "../../../../app/views/solid_queue_interface", "app/views/solid_queue_interface"
12
+ end
13
+ end
@@ -1,3 +1,3 @@
1
1
  module SolidQueueInterface
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solid_queue_interface
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - AquisTech
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-04-15 00:00:00.000000000 Z
11
+ date: 2024-04-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -65,6 +65,7 @@ files:
65
65
  - app/assets/config/solid_queue_interface_manifest.js
66
66
  - app/assets/javascripts/solid_queue_interface/application.js
67
67
  - app/assets/stylesheets/solid_queue_interface/application.css
68
+ - app/assets/stylesheets/solid_queue_interface/overrides.css
68
69
  - app/controllers/solid_queue_interface/application_controller.rb
69
70
  - app/controllers/solid_queue_interface/jobs_controller.rb
70
71
  - app/controllers/solid_queue_interface/processes_controller.rb
@@ -93,6 +94,12 @@ files:
93
94
  - app/views/solid_queue_interface/queues/paused.html.erb
94
95
  - app/views/solid_queue_interface/semaphores/index.html.erb
95
96
  - config/routes.rb
97
+ - lib/generators/solid_queue_interface/override_css/USAGE
98
+ - lib/generators/solid_queue_interface/override_css/override_css_generator.rb
99
+ - lib/generators/solid_queue_interface/override_layout_and_navbar/USAGE
100
+ - lib/generators/solid_queue_interface/override_layout_and_navbar/override_layout_and_navbar_generator.rb
101
+ - lib/generators/solid_queue_interface/override_views/USAGE
102
+ - lib/generators/solid_queue_interface/override_views/override_views_generator.rb
96
103
  - lib/solid_queue_interface.rb
97
104
  - lib/solid_queue_interface/engine.rb
98
105
  - lib/solid_queue_interface/version.rb