queue_classic_admin 0.0.4 → 0.0.5

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
  SHA1:
3
- metadata.gz: 917b21396fa599fd213751fabd7f6edcc3e61c88
4
- data.tar.gz: 2aac34b6b98ebd6598e3672ab5d26290f60ab477
3
+ metadata.gz: 946cb4d0473ffde53ec5e34c5717d401301c8812
4
+ data.tar.gz: 6430df6af903fd1eb951b256aaea3ccd69d655b3
5
5
  SHA512:
6
- metadata.gz: c63fcf4010230b617af198a071c74e17553a179fb9f39ade39e108894168ce294e853369ca55fbbb525e69f60d405708da9169617eee8dc21f3ae92647e0f963
7
- data.tar.gz: c9099dd1d050f470206ee2cad36c1408e3f5ff17ff5eff7eab1d94b9dee2531d3f786ce5ed1fdd82994cf1dc1f26a369453e9f8f80aa7af139115d468bcd9374
6
+ metadata.gz: 685264c0b5baf370d185c48ffc0925e4f4618a9c1594962ca106d4bd4c73de1e11e262c639159642fbb0dae9747dea055a8d1f4b8983d7f83b40cc26a9d0ce59
7
+ data.tar.gz: ccefd1acb224ef9cee68a5329f9313412e92a9ce51a7a086a7d78ca4b0d1387808c5d700603a041a32c818eb5682b50b48204de3ba0fa734311199f9a7482980
data/README.md CHANGED
@@ -9,14 +9,11 @@ Copy and run the migrations
9
9
  rake queue_classic_admin:install:migrations
10
10
  rake db:migrate
11
11
 
12
-
13
12
  Mount in your rails app config/routes.rb file
14
13
 
15
14
  mount QueueClassicAdmin::Engine => "/queue_classic_admin"
16
15
 
17
-
18
16
  # TODO
19
17
 
20
18
  - Use something more lightweight than bootstrap
21
- - Paginataion
22
19
  - Don't die if the queue_classic-later gem is missing
@@ -1,9 +1,14 @@
1
1
  module QueueClassicAdmin
2
2
  module JobCommon
3
3
  module ClassMethods
4
+ KNOWN_COLUMN = ["id", "q_name", "method", "args", "locked_at", "created_at", "not_before"]
4
5
  def queue_counts
5
6
  group(:q_name).count
6
7
  end
8
+
9
+ def extra_columns
10
+ columns.map(&:name) - KNOWN_COLUMN
11
+ end
7
12
  end
8
13
 
9
14
  module InstanceMethods
@@ -13,14 +13,18 @@
13
13
  <thead>
14
14
  <tr>
15
15
  <th>Queue</th>
16
+ <th>ID</th>
16
17
  <th>Enqueued At</th>
17
18
  <th>Method</th>
18
19
  <th>Arguments</th>
19
20
  <% if @klass.columns_hash['not_before'] %>
20
21
  <th>Run At</th>
21
22
  <% end %>
23
+ <% @klass.extra_columns.each do |column| %>
24
+ <th><%= column %></th>
25
+ <% end %>
22
26
  <th>
23
- <%=
27
+ <%=
24
28
  link_to "Purge All", url_for(params.merge(action: 'purge')), class: 'btn btn-danger', data: {confirm: "Are you sure?", method: :delete}
25
29
  %>
26
30
  </th>
@@ -31,6 +35,7 @@
31
35
  <% @queue_classic_jobs.each do |queue_classic_job| %>
32
36
  <tr>
33
37
  <td><%= queue_classic_job.q_name %></td>
38
+ <td><%= queue_classic_job.id %></td>
34
39
  <td>
35
40
  <%= time_ago_in_words queue_classic_job.created_at %>
36
41
  <br/>
@@ -43,6 +48,11 @@
43
48
  <% if @klass.columns_hash['not_before'] %>
44
49
  <td><%= queue_classic_job.not_before %></td>
45
50
  <% end %>
51
+
52
+ <% @klass.extra_columns.each do |column| %>
53
+ <td><%= queue_classic_job[column] %></th>
54
+ <% end %>
55
+
46
56
  <td><%= link_to 'Destroy', queue_classic_job, method: :delete, data: { confirm: 'Are you sure?' }, class: 'btn btn-danger' %></td>
47
57
  </tr>
48
58
  <% end %>
@@ -1,3 +1,3 @@
1
1
  module QueueClassicAdmin
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: queue_classic_admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simon Mathieu