queue_classic_admin 0.0.4 → 0.0.5
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 946cb4d0473ffde53ec5e34c5717d401301c8812
|
4
|
+
data.tar.gz: 6430df6af903fd1eb951b256aaea3ccd69d655b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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 %>
|