solid_queue_interface 0.1.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +17 -3
- data/app/assets/stylesheets/solid_queue_interface/application.css +74 -1
- data/app/assets/stylesheets/solid_queue_interface/overrides.css +6 -0
- data/app/controllers/solid_queue_interface/application_controller.rb +1 -0
- data/app/controllers/solid_queue_interface/jobs_controller.rb +7 -7
- data/app/helpers/solid_queue_interface/application_helper.rb +1 -0
- data/app/views/layouts/solid_queue_interface/_navbar.html.erb +3 -1
- data/app/views/layouts/solid_queue_interface/application.html.erb +3 -0
- data/app/views/solid_queue_interface/jobs/blocked.html.erb +22 -20
- data/app/views/solid_queue_interface/jobs/claimed.html.erb +16 -14
- data/app/views/solid_queue_interface/jobs/failed.html.erb +22 -20
- data/app/views/solid_queue_interface/jobs/index.html.erb +28 -26
- data/app/views/solid_queue_interface/jobs/ready.html.erb +18 -16
- data/app/views/solid_queue_interface/jobs/recurring.html.erb +18 -16
- data/app/views/solid_queue_interface/jobs/scheduled.html.erb +20 -18
- data/app/views/solid_queue_interface/jobs/show.html.erb +15 -15
- data/app/views/solid_queue_interface/processes/index.html.erb +21 -21
- data/app/views/solid_queue_interface/queues/index.html.erb +13 -13
- data/app/views/solid_queue_interface/queues/paused.html.erb +11 -11
- data/lib/generators/solid_queue_interface/override_css/USAGE +8 -0
- data/lib/generators/solid_queue_interface/override_css/override_css_generator.rb +14 -0
- data/lib/generators/solid_queue_interface/override_layout_and_navbar/USAGE +8 -0
- data/lib/generators/solid_queue_interface/override_layout_and_navbar/override_layout_and_navbar_generator.rb +13 -0
- data/lib/generators/solid_queue_interface/override_views/USAGE +20 -0
- data/lib/generators/solid_queue_interface/override_views/override_views_generator.rb +13 -0
- data/lib/solid_queue_interface/engine.rb +2 -0
- data/lib/solid_queue_interface/version.rb +1 -1
- metadata +24 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c2f1030315cba7e5ae6e5651afd357afc5a70767a8ef3003d43706399e698142
|
4
|
+
data.tar.gz: 5dde197063e2c8f8c5bd8aee8e71ba730ce29cde54c215d32ed62bcf3a2fe619
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 15e91622f1408e83905440648a23e3fa622e29f83cea1e79952ac6829c9f34d612f8210d517ae10b6f24a313724bf4a868f1f6a2f5705fabdbd4f5874343dbaa
|
7
|
+
data.tar.gz: 970874a42e77bebf4ed13c5431a78e07a978ed04f147885755a73dede61e272b5b51e73ea51a7e01f9f32d40ad7f66419099454d54052cd98cf8982a2d2a2385
|
data/README.md
CHANGED
@@ -24,12 +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
|
-
* Pagination with `pagy` gem
|
29
|
-
* Basic styling support
|
30
44
|
* Sorting on columns
|
31
45
|
* Searching on columns
|
32
|
-
*
|
46
|
+
* Authorization
|
33
47
|
|
34
48
|
## Contributing
|
35
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,4 +12,77 @@
|
|
12
12
|
*
|
13
13
|
*= require_tree .
|
14
14
|
*= require_self
|
15
|
-
|
15
|
+
*= require 'solid_queue_interface/overrides'
|
16
|
+
*/
|
17
|
+
body {
|
18
|
+
font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
|
19
|
+
}
|
20
|
+
/* Table styling */
|
21
|
+
#solid_queue_interface table {
|
22
|
+
border-collapse: collapse;
|
23
|
+
border-spacing: 0;
|
24
|
+
text-align: left;
|
25
|
+
width: 100%;
|
26
|
+
}
|
27
|
+
/* Show alternate striped table rows */
|
28
|
+
#solid_queue_interface table thead tr,
|
29
|
+
#solid_queue_interface table tbody tr:nth-of-type(even) {
|
30
|
+
background: #f7f8f9;
|
31
|
+
}
|
32
|
+
/* Highlight hovered table row */
|
33
|
+
#solid_queue_interface table tbody tr:hover {
|
34
|
+
background: #eef0f3;
|
35
|
+
}
|
36
|
+
/* Table TD styling */
|
37
|
+
#solid_queue_interface table td {
|
38
|
+
border-bottom: .05rem solid #dadee4;
|
39
|
+
padding: .6rem .4rem;
|
40
|
+
vertical-align: top;
|
41
|
+
}
|
42
|
+
/* Table TH styling */
|
43
|
+
#solid_queue_interface table th {
|
44
|
+
border-top: .1rem solid #dadee4;
|
45
|
+
border-bottom: .1rem solid #dadee4;
|
46
|
+
padding: .6rem .4rem;
|
47
|
+
vertical-align: top;
|
48
|
+
}
|
49
|
+
|
50
|
+
/* Navbar styling */
|
51
|
+
#solid_queue_interface .navbar {
|
52
|
+
align-items: stretch;
|
53
|
+
display: -ms-flexbox;
|
54
|
+
display: flex;
|
55
|
+
-ms-flex-align: stretch;
|
56
|
+
-ms-flex-pack: justify;
|
57
|
+
-ms-flex-wrap: wrap;
|
58
|
+
flex-wrap: wrap;
|
59
|
+
justify-content: space-between;
|
60
|
+
}
|
61
|
+
/* Navbar Logo */
|
62
|
+
#solid_queue_interface .navbar .navbar-brand {
|
63
|
+
font-weight: bold;
|
64
|
+
text-decoration: none;
|
65
|
+
}
|
66
|
+
/* Navbar Link */
|
67
|
+
#solid_queue_interface .navbar .navbar-link {
|
68
|
+
padding: 0 0.5em;
|
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` */
|
@@ -1,31 +1,31 @@
|
|
1
1
|
module SolidQueueInterface
|
2
2
|
class JobsController < ApplicationController
|
3
3
|
def index
|
4
|
-
@jobs = SolidQueue::Job.order(created_at: :desc)
|
4
|
+
@pagy, @jobs = pagy(SolidQueue::Job.order(created_at: :desc))
|
5
5
|
end
|
6
6
|
|
7
7
|
def scheduled
|
8
|
-
@jobs = SolidQueue::ScheduledExecution.order(created_at: :desc)
|
8
|
+
@pagy, @jobs = pagy(SolidQueue::ScheduledExecution.order(created_at: :desc))
|
9
9
|
end
|
10
10
|
|
11
11
|
def failed
|
12
|
-
@jobs = SolidQueue::FailedExecution.order(created_at: :desc)
|
12
|
+
@pagy, @jobs = pagy(SolidQueue::FailedExecution.order(created_at: :desc))
|
13
13
|
end
|
14
14
|
|
15
15
|
def blocked
|
16
|
-
@jobs = SolidQueue::BlockedExecution.order(created_at: :desc)
|
16
|
+
@pagy, @jobs = pagy(SolidQueue::BlockedExecution.order(created_at: :desc))
|
17
17
|
end
|
18
18
|
|
19
19
|
def claimed
|
20
|
-
@jobs = SolidQueue::ClaimedExecution.order(created_at: :desc)
|
20
|
+
@pagy, @jobs = pagy(SolidQueue::ClaimedExecution.order(created_at: :desc))
|
21
21
|
end
|
22
22
|
|
23
23
|
def ready
|
24
|
-
@jobs = SolidQueue::ReadyExecution.order(created_at: :desc)
|
24
|
+
@pagy, @jobs = pagy(SolidQueue::ReadyExecution.order(created_at: :desc))
|
25
25
|
end
|
26
26
|
|
27
27
|
def recurring
|
28
|
-
@jobs = SolidQueue::RecurringExecution.order(created_at: :desc)
|
28
|
+
@pagy, @jobs = pagy(SolidQueue::RecurringExecution.order(created_at: :desc))
|
29
29
|
end
|
30
30
|
|
31
31
|
def show
|
@@ -1,5 +1,7 @@
|
|
1
1
|
<header class='navbar'>
|
2
|
-
<%= link_to
|
2
|
+
<%= link_to root_path, class: 'navbar-brand' do %>
|
3
|
+
<b>SolidQueueInterface</b>
|
4
|
+
<% end %>
|
3
5
|
<%= link_to 'Processes', solid_queue_interface_processes_path, class: 'navbar-link' %>
|
4
6
|
<%= link_to 'All Queues', solid_queue_interface_queues_path, class: 'navbar-link' %>
|
5
7
|
<%= link_to 'Paused Queues', paused_solid_queue_interface_queues_path, class: 'navbar-link' %>
|
@@ -5,6 +5,9 @@
|
|
5
5
|
<%= csrf_meta_tags %>
|
6
6
|
<%= csp_meta_tag %>
|
7
7
|
|
8
|
+
<style type="text/css">
|
9
|
+
<%== Pagy.root.join('stylesheets', 'pagy.css').read %>
|
10
|
+
</style>
|
8
11
|
<%= stylesheet_link_tag "solid_queue_interface/application", media: "all" %>
|
9
12
|
</head>
|
10
13
|
<body id='solid_queue_interface' class='solid_queue_interface-<%= controller_name %>-<%= action_name %>'>
|
@@ -1,27 +1,29 @@
|
|
1
1
|
<h1>Blocked Executions</h1>
|
2
|
-
<table
|
3
|
-
<thead
|
4
|
-
<tr
|
5
|
-
<th
|
6
|
-
<th
|
7
|
-
<th
|
8
|
-
<th
|
9
|
-
<th
|
10
|
-
<th
|
11
|
-
<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
|
14
|
+
<tbody>
|
15
15
|
<% @jobs.each do |job| %>
|
16
|
-
<tr
|
17
|
-
<td
|
18
|
-
<td
|
19
|
-
<td
|
20
|
-
<td
|
21
|
-
<td
|
22
|
-
<td
|
23
|
-
<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>
|
27
|
-
</table>
|
27
|
+
</table>
|
28
|
+
<%== pagy_info(@pagy) %>
|
29
|
+
<%== pagy_nav(@pagy) %>
|
@@ -1,21 +1,23 @@
|
|
1
1
|
<h1>Claimed Executions</h1>
|
2
|
-
<table
|
3
|
-
<thead
|
4
|
-
<tr
|
5
|
-
<th
|
6
|
-
<th
|
7
|
-
<th
|
8
|
-
<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
|
11
|
+
<tbody>
|
12
12
|
<% @jobs.each do |job| %>
|
13
|
-
<tr
|
14
|
-
<td
|
15
|
-
<td
|
16
|
-
<td
|
17
|
-
<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>
|
21
|
-
</table>
|
21
|
+
</table>
|
22
|
+
<%== pagy_info(@pagy) %>
|
23
|
+
<%== pagy_nav(@pagy) %>
|
@@ -1,27 +1,29 @@
|
|
1
1
|
<h1>Failed Executions</h1>
|
2
|
-
<table
|
3
|
-
<thead
|
4
|
-
<tr
|
5
|
-
<th
|
6
|
-
<th
|
7
|
-
<th
|
8
|
-
<th
|
9
|
-
<th
|
10
|
-
<th
|
11
|
-
<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
|
14
|
+
<tbody>
|
15
15
|
<% @jobs.each do |job| %>
|
16
|
-
<tr
|
17
|
-
<td
|
18
|
-
<td
|
19
|
-
<td
|
20
|
-
<td
|
21
|
-
<td
|
22
|
-
<td
|
23
|
-
<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>
|
27
|
-
</table>
|
27
|
+
</table>
|
28
|
+
<%== pagy_info(@pagy) %>
|
29
|
+
<%== pagy_nav(@pagy) %>
|
@@ -1,33 +1,35 @@
|
|
1
1
|
<h1>All Jobs</h1>
|
2
|
-
<table
|
3
|
-
<thead
|
4
|
-
<tr
|
5
|
-
<th
|
6
|
-
<th
|
7
|
-
<th
|
8
|
-
<th
|
9
|
-
<th
|
10
|
-
<th
|
11
|
-
<th
|
12
|
-
<th
|
13
|
-
<th
|
14
|
-
<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
|
17
|
+
<tbody>
|
18
18
|
<% @jobs.each do |job| %>
|
19
|
-
<tr
|
20
|
-
<td
|
21
|
-
<td
|
22
|
-
<td
|
23
|
-
<td
|
24
|
-
<td
|
25
|
-
<td
|
26
|
-
<td
|
27
|
-
<td
|
28
|
-
<td
|
29
|
-
<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>
|
33
|
-
</table>
|
33
|
+
</table>
|
34
|
+
<%== pagy_info(@pagy) %>
|
35
|
+
<%== pagy_nav(@pagy) %>
|
@@ -1,23 +1,25 @@
|
|
1
1
|
<h1>Ready Executions</h1>
|
2
|
-
<table
|
3
|
-
<thead
|
4
|
-
<tr
|
5
|
-
<th
|
6
|
-
<th
|
7
|
-
<th
|
8
|
-
<th
|
9
|
-
<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
|
12
|
+
<tbody>
|
13
13
|
<% @jobs.each do |job| %>
|
14
|
-
<tr
|
15
|
-
<td
|
16
|
-
<td
|
17
|
-
<td
|
18
|
-
<td
|
19
|
-
<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>
|
23
|
-
</table>
|
23
|
+
</table>
|
24
|
+
<%== pagy_info(@pagy) %>
|
25
|
+
<%== pagy_nav(@pagy) %>
|
@@ -1,23 +1,25 @@
|
|
1
1
|
<h1>Recurring Executions</h1>
|
2
|
-
<table
|
3
|
-
<thead
|
4
|
-
<tr
|
5
|
-
<th
|
6
|
-
<th
|
7
|
-
<th
|
8
|
-
<th
|
9
|
-
<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
|
12
|
+
<tbody>
|
13
13
|
<% @jobs.each do |job| %>
|
14
|
-
<tr
|
15
|
-
<td
|
16
|
-
<td
|
17
|
-
<td
|
18
|
-
<td
|
19
|
-
<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>
|
23
|
-
</table>
|
23
|
+
</table>
|
24
|
+
<%== pagy_info(@pagy) %>
|
25
|
+
<%== pagy_nav(@pagy) %>
|
@@ -1,25 +1,27 @@
|
|
1
1
|
<h1>Scheduled Executions</h1>
|
2
|
-
<table
|
3
|
-
<thead
|
4
|
-
<tr
|
5
|
-
<th
|
6
|
-
<th
|
7
|
-
<th
|
8
|
-
<th
|
9
|
-
<th
|
10
|
-
<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
|
13
|
+
<tbody>
|
14
14
|
<% @jobs.each do |job| %>
|
15
|
-
<tr
|
16
|
-
<td
|
17
|
-
<td
|
18
|
-
<td
|
19
|
-
<td
|
20
|
-
<td
|
21
|
-
<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>
|
25
|
-
</table>
|
25
|
+
</table>
|
26
|
+
<%== pagy_info(@pagy) %>
|
27
|
+
<%== pagy_nav(@pagy) %>
|
@@ -1,26 +1,26 @@
|
|
1
1
|
<h1>Failed Executions Details For #<%= @job.id %></h1>
|
2
|
-
<table
|
3
|
-
<thead
|
4
|
-
<tr
|
5
|
-
<th
|
6
|
-
<th
|
2
|
+
<table>
|
3
|
+
<thead>
|
4
|
+
<tr>
|
5
|
+
<th>Attribute</th>
|
6
|
+
<th>Details</th>
|
7
7
|
</tr>
|
8
8
|
</thead>
|
9
|
-
<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
|
13
|
-
<td
|
14
|
-
<td
|
12
|
+
<tr>
|
13
|
+
<td><b><%= title %></b></td>
|
14
|
+
<td><%= @job.send(method) %></td>
|
15
15
|
</tr>
|
16
16
|
<% end %>
|
17
|
-
<tr
|
18
|
-
<td
|
19
|
-
<td
|
17
|
+
<tr>
|
18
|
+
<td><b>Backtrace</b></td>
|
19
|
+
<td><%= @job.backtrace.join("<br>").html_safe %></td>
|
20
20
|
</tr>
|
21
|
-
<tr
|
22
|
-
<td
|
23
|
-
<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
|
3
|
-
<thead
|
4
|
-
<tr
|
5
|
-
<th
|
6
|
-
<th
|
7
|
-
<th
|
8
|
-
<th
|
9
|
-
<th
|
10
|
-
<th
|
11
|
-
<th
|
12
|
-
<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
|
15
|
+
<tbody>
|
16
16
|
<% @processes.each do |process| %>
|
17
|
-
<tr
|
18
|
-
<td
|
19
|
-
<td
|
20
|
-
<td
|
21
|
-
<td
|
22
|
-
<td
|
23
|
-
<td
|
24
|
-
<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
|
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
|
3
|
-
<thead
|
4
|
-
<tr
|
5
|
-
<th
|
6
|
-
<th
|
7
|
-
<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
|
10
|
+
<tbody>
|
11
11
|
<% @queues.each do |queue| %>
|
12
|
-
<tr
|
13
|
-
<td
|
14
|
-
<td
|
15
|
-
<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
|
3
|
-
<thead
|
4
|
-
<tr
|
5
|
-
<th
|
6
|
-
<th
|
7
|
-
<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
|
10
|
+
<tbody>
|
11
11
|
<% @queues.each do |queue| %>
|
12
|
-
<tr
|
13
|
-
<td
|
14
|
-
<td
|
15
|
-
<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
|
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.
|
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-
|
11
|
+
date: 2024-04-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 0.3.0
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: pagy
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '8.1'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '8.1'
|
41
55
|
description: UI for monitoring solid_queue
|
42
56
|
email:
|
43
57
|
- aquis.tech@gmail.com
|
@@ -51,6 +65,7 @@ files:
|
|
51
65
|
- app/assets/config/solid_queue_interface_manifest.js
|
52
66
|
- app/assets/javascripts/solid_queue_interface/application.js
|
53
67
|
- app/assets/stylesheets/solid_queue_interface/application.css
|
68
|
+
- app/assets/stylesheets/solid_queue_interface/overrides.css
|
54
69
|
- app/controllers/solid_queue_interface/application_controller.rb
|
55
70
|
- app/controllers/solid_queue_interface/jobs_controller.rb
|
56
71
|
- app/controllers/solid_queue_interface/processes_controller.rb
|
@@ -79,6 +94,12 @@ files:
|
|
79
94
|
- app/views/solid_queue_interface/queues/paused.html.erb
|
80
95
|
- app/views/solid_queue_interface/semaphores/index.html.erb
|
81
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
|
82
103
|
- lib/solid_queue_interface.rb
|
83
104
|
- lib/solid_queue_interface/engine.rb
|
84
105
|
- lib/solid_queue_interface/version.rb
|
@@ -105,7 +126,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
105
126
|
- !ruby/object:Gem::Version
|
106
127
|
version: '0'
|
107
128
|
requirements: []
|
108
|
-
rubygems_version: 3.
|
129
|
+
rubygems_version: 3.4.6
|
109
130
|
signing_key:
|
110
131
|
specification_version: 4
|
111
132
|
summary: UI for monitoring solid_queue
|