solid_queue_interface 0.1.0 → 0.2.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: f4867a44e6340fff2c02f6410ca2de07b19322dd0072f5817e3fbe6f5743f616
4
- data.tar.gz: 52dd205bc38a532bc788962c393ac5b0b903c4f4030bac851ab12ae623196f39
3
+ metadata.gz: 145550af5ed2f2795a44c5123c08e7c610acfd6ce920c80ea7203aa210a31711
4
+ data.tar.gz: 64b11ef356a32e509cfa5c4054d434ddd1f0144dbf149df37cbceb3b2b44d57d
5
5
  SHA512:
6
- metadata.gz: 69c518fab0517a039b8789036175779c0dc87274cb8a49942da42f905fb84d3e2648579d08384d1f1942e9d7c526834ee442375c69fb1caed3798e5bfe46b888
7
- data.tar.gz: 2f345acfbcee720a32d92b50b1f7319385cf2105c3f8d57b5b8ccc2ea13d26d5184fcf567b49a23c1ca27daa83a0b2e834d7b062472ab365b037090fefa7f930
6
+ metadata.gz: 415ad0eebd74f37e2ca00069760739bb4658bcd9ea737b7dc4213c55fd9979d558b83db90be89912320acc722b3aac1bdc9b323ca1ca83f4d5f48e4fdebdc960
7
+ data.tar.gz: c97bce8bc95c1c8844de4b0964726ab8106c76b055703423b250b0da5e7f5d153c6f5f6033348f0a200ccbca696bae4eaecca9ab1d4e2d38416db7fb6a42792e
data/README.md CHANGED
@@ -25,11 +25,9 @@ Update `config/routes.rb` to mount `SolidQueueInterface::Engine` like so:
25
25
  Now you can access SolidQueueInterface at `<YOUR_URL>/solid_queue_interface`
26
26
 
27
27
  ## ToDo
28
- * Pagination with `pagy` gem
29
- * Basic styling support
28
+ * Generator to copy views to your project for overriding
30
29
  * Sorting on columns
31
30
  * Searching on columns
32
- * Generator to copy views to your project for overriding
33
31
 
34
32
  ## Contributing
35
33
  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).
@@ -13,3 +13,57 @@
13
13
  *= require_tree .
14
14
  *= require_self
15
15
  */
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
+ }
@@ -1,4 +1,5 @@
1
1
  module SolidQueueInterface
2
2
  class ApplicationController < ActionController::Base
3
+ include Pagy::Backend
3
4
  end
4
5
  end
@@ -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,4 +1,5 @@
1
1
  module SolidQueueInterface
2
2
  module ApplicationHelper
3
+ include Pagy::Frontend
3
4
  end
4
5
  end
@@ -1,5 +1,7 @@
1
1
  <header class='navbar'>
2
- <%= link_to 'SolidQueueInterface', root_path, class: 'navbar-link' %>
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' %>
@@ -6,6 +6,9 @@
6
6
  <%= csp_meta_tag %>
7
7
 
8
8
  <%= stylesheet_link_tag "solid_queue_interface/application", media: "all" %>
9
+ <style type="text/css">
10
+ <%== Pagy.root.join('stylesheets', 'pagy.css').read %>
11
+ </style>
9
12
  </head>
10
13
  <body id='solid_queue_interface' class='solid_queue_interface-<%= controller_name %>-<%= action_name %>'>
11
14
  <%= render partial: 'layouts/solid_queue_interface/navbar' %>
@@ -24,4 +24,6 @@
24
24
  </tr>
25
25
  <% end %>
26
26
  </tbody>
27
- </table>
27
+ </table>
28
+ <%== pagy_info(@pagy) %>
29
+ <%== pagy_nav(@pagy) %>
@@ -18,4 +18,6 @@
18
18
  </tr>
19
19
  <% end %>
20
20
  </tbody>
21
- </table>
21
+ </table>
22
+ <%== pagy_info(@pagy) %>
23
+ <%== pagy_nav(@pagy) %>
@@ -24,4 +24,6 @@
24
24
  </tr>
25
25
  <% end %>
26
26
  </tbody>
27
- </table>
27
+ </table>
28
+ <%== pagy_info(@pagy) %>
29
+ <%== pagy_nav(@pagy) %>
@@ -30,4 +30,6 @@
30
30
  </tr>
31
31
  <% end %>
32
32
  </tbody>
33
- </table>
33
+ </table>
34
+ <%== pagy_info(@pagy) %>
35
+ <%== pagy_nav(@pagy) %>
@@ -20,4 +20,6 @@
20
20
  </tr>
21
21
  <% end %>
22
22
  </tbody>
23
- </table>
23
+ </table>
24
+ <%== pagy_info(@pagy) %>
25
+ <%== pagy_nav(@pagy) %>
@@ -20,4 +20,6 @@
20
20
  </tr>
21
21
  <% end %>
22
22
  </tbody>
23
- </table>
23
+ </table>
24
+ <%== pagy_info(@pagy) %>
25
+ <%== pagy_nav(@pagy) %>
@@ -22,4 +22,6 @@
22
22
  </tr>
23
23
  <% end %>
24
24
  </tbody>
25
- </table>
25
+ </table>
26
+ <%== pagy_info(@pagy) %>
27
+ <%== pagy_nav(@pagy) %>
@@ -1,3 +1,5 @@
1
+ require "pagy"
2
+
1
3
  module SolidQueueInterface
2
4
  class Engine < ::Rails::Engine
3
5
  isolate_namespace SolidQueueInterface
@@ -1,3 +1,3 @@
1
1
  module SolidQueueInterface
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.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.1.0
4
+ version: 0.2.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 00:00:00.000000000 Z
11
+ date: 2024-04-15 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
@@ -105,7 +119,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
105
119
  - !ruby/object:Gem::Version
106
120
  version: '0'
107
121
  requirements: []
108
- rubygems_version: 3.1.2
122
+ rubygems_version: 3.4.6
109
123
  signing_key:
110
124
  specification_version: 4
111
125
  summary: UI for monitoring solid_queue