panoptic 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2139703571c494d033de27157820fd5a897cc8ea964b51ef526a15c2df009fde
4
- data.tar.gz: 1bc481cbaa03329579c5fdc7a58501b2ab00b09afc4952fea960572f787f3c29
3
+ metadata.gz: 92d310e17406ea0681469b5f4f4ff1d456b9d24ad4c89d4498adc87643f9ed8c
4
+ data.tar.gz: 9e2faccbac6daf2820c63202adc28292918934e596462443b046be5d4b874c72
5
5
  SHA512:
6
- metadata.gz: bd1d0d3a182541129e3a84885c69b48ed9145055baeced6df8809fc269c2a62c5479f4253f7ed36fbd420082613c37513ebc92a2bc66b4fa55186ad5f082015c
7
- data.tar.gz: eac99da9fcafbb3be1a2282fbf9e72ce242cc2a0dfd70b58e243de8f31184c4879b701088b144f670687d21359e5eb0971a46ef24614fad9a8085f2c123a174c
6
+ metadata.gz: b596a1d4224631ffb6f1e619958bbed94c20c4bfcb6c64fd967045efd40d785be72d2393b1317dc239866be6ba35952eebbf3eeac22e02cc270626475f325328
7
+ data.tar.gz: b07d2227e30e712aedaeb5d1213991fba6cb5e467f67466795c3b1fd8d10a92e9fa5c9a98e86f6afc2a71bd2ac4de963c3a5de2a49a3f74494973c666227d4ba
@@ -2,8 +2,10 @@
2
2
 
3
3
  module Panoptic
4
4
  class JobsController < ApplicationController
5
+ include Pagy::Backend
6
+
5
7
  def index
6
- @jobs = SolidQueue::Job.order(created_at: :asc).page(params[:page])
8
+ @pagy, @jobs = pagy(SolidQueue::Job.order(created_at: :asc))
7
9
  end
8
10
  end
9
11
  end
@@ -1,4 +1,5 @@
1
1
  module Panoptic
2
2
  module ApplicationHelper
3
+ include Pagy::Frontend
3
4
  end
4
5
  end
@@ -1,9 +1,7 @@
1
1
  <h1>Jobs</h1>
2
2
 
3
3
  <div class="d-flex justify-content-end">
4
- <div>
5
- <%= page_entries_info @jobs %>
6
- </div>
4
+ <%== pagy_info(@pagy) %>
7
5
  </div>
8
6
 
9
7
  <table class="table">
@@ -24,5 +22,5 @@
24
22
  </table>
25
23
 
26
24
  <div class="d-flex justify-content-center">
27
- <%= paginate @jobs, views_prefix: "panoptic" %>
25
+ <%== pagy_bootstrap_nav(@pagy) if @pagy.pages > 1 %>
28
26
  </div>
@@ -0,0 +1 @@
1
+ require "pagy/extras/bootstrap"
@@ -1,3 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "pagy"
4
+
1
5
  module Panoptic
2
6
  class Engine < ::Rails::Engine
3
7
  isolate_namespace Panoptic
@@ -1,3 +1,3 @@
1
1
  module Panoptic
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: panoptic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vincent Rolea
@@ -39,19 +39,19 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0.1'
41
41
  - !ruby/object:Gem::Dependency
42
- name: kaminari
42
+ name: pagy
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '1.2'
47
+ version: '6.2'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '1.2'
54
+ version: '6.2'
55
55
  description: Web interface for the SoldiQueue queuing backend
56
56
  email:
57
57
  - 3525369+virolea@users.noreply.github.com
@@ -74,18 +74,12 @@ files:
74
74
  - app/views/layouts/panoptic/application.html.erb
75
75
  - app/views/panoptic/jobs/_job.html.erb
76
76
  - app/views/panoptic/jobs/index.html.erb
77
- - app/views/panoptic/kaminari/_first_page.html.erb
78
- - app/views/panoptic/kaminari/_gap.html.erb
79
- - app/views/panoptic/kaminari/_last_page.html.erb
80
- - app/views/panoptic/kaminari/_next_page.html.erb
81
- - app/views/panoptic/kaminari/_page.html.erb
82
- - app/views/panoptic/kaminari/_paginator.html.erb
83
- - app/views/panoptic/kaminari/_prev_page.html.erb
84
77
  - app/views/panoptic/processes/_process.html.erb
85
78
  - app/views/panoptic/processes/index.html.erb
86
79
  - app/views/panoptic/queues/_queue.html.erb
87
80
  - app/views/panoptic/queues/index.html.erb
88
81
  - app/views/shared/_navbar.html.erb
82
+ - config/initializers/pagy.rb
89
83
  - config/routes.rb
90
84
  - lib/panoptic.rb
91
85
  - lib/panoptic/engine.rb
@@ -1,3 +0,0 @@
1
- <li class="page-item">
2
- <%= link_to_unless current_page.first?, raw(t 'views.pagination.first'), url, remote: remote, class: 'page-link' %>
3
- </li>
@@ -1,3 +0,0 @@
1
- <li class='page-item disabled'>
2
- <%= link_to raw(t 'views.pagination.truncate'), '#', class: 'page-link' %>
3
- </li>
@@ -1,3 +0,0 @@
1
- <li class="page-item">
2
- <%= link_to_unless current_page.last?, raw(t 'views.pagination.last'), url, remote: remote, class: 'page-link' %>
3
- </li>
@@ -1,3 +0,0 @@
1
- <li class="page-item">
2
- <%= link_to_unless current_page.last?, raw(t 'views.pagination.next'), url, rel: 'next', remote: remote, class: 'page-link' %>
3
- </li>
@@ -1,9 +0,0 @@
1
- <% if page.current? %>
2
- <li class="page-item active">
3
- <%= content_tag :a, page, data: { remote: remote }, rel: page.rel, class: 'page-link' %>
4
- </li>
5
- <% else %>
6
- <li class="page-item">
7
- <%= link_to page, url, remote: remote, rel: page.rel, class: 'page-link' %>
8
- </li>
9
- <% end %>
@@ -1,17 +0,0 @@
1
- <%= paginator.render do %>
2
- <nav>
3
- <ul class="pagination">
4
- <%= first_page_tag unless current_page.first? %>
5
- <%= prev_page_tag unless current_page.first? %>
6
- <% each_page do |page| %>
7
- <% if page.left_outer? || page.right_outer? || page.inside_window? %>
8
- <%= page_tag page %>
9
- <% elsif !page.was_truncated? -%>
10
- <%= gap_tag %>
11
- <% end %>
12
- <% end %>
13
- <%= next_page_tag unless current_page.last? %>
14
- <%= last_page_tag unless current_page.last? %>
15
- </ul>
16
- </nav>
17
- <% end %>
@@ -1,3 +0,0 @@
1
- <li class="page-item">
2
- <%= link_to_unless current_page.first?, raw(t 'views.pagination.previous'), url, rel: 'prev', remote: remote, class: 'page-link' %>
3
- </li>