queue_classic_admin 0.0.6 → 0.0.7
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f2bc64b2b0da2c2d3fbc15ef88e8d1e08f3b79e
|
4
|
+
data.tar.gz: a2cc513e4469662f894e1a43fe384016bfc87c9d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fc008359b02f77c92dad78e6ed9f94d466bda64e3ffed695b747413b8a0df3b87e87e0f35c16cd8d5676a4dd7438e7dfbe71de6ee80014b8fbcfca32a5dd3a30
|
7
|
+
data.tar.gz: 07c66f91aa78094203cd9a154ffa5e5bcf80f86dd010947a7c876ce8734af6d6c0fd5fe52a0d60e0a807cc65e0322add8d429943456bf6112211997d4a3ffc9c
|
data/README.md
CHANGED
@@ -2,6 +2,16 @@
|
|
2
2
|
|
3
3
|
An admin interface for the [queue_classic](https://github.com/ryandotsmith/queue_classic) and [queue_classic-later](https://github.com/dpiddy/queue_classic-later) gems.
|
4
4
|
|
5
|
+
![qc admin](https://f.cloud.github.com/assets/148622/865030/9b1b2610-f62e-11e2-8908-8c271bfe0f6c.png)
|
6
|
+
|
7
|
+
|
8
|
+
# Features
|
9
|
+
|
10
|
+
* Support for [queue_classic-later](https://github.com/dpiddy/queue_classic-later)
|
11
|
+
* Support for custom columns
|
12
|
+
* Delete entire queues
|
13
|
+
* Delete jobs
|
14
|
+
|
5
15
|
# Install
|
6
16
|
|
7
17
|
Copy and run the migrations
|
@@ -2,13 +2,13 @@ require_dependency "queue_classic_admin/application_controller"
|
|
2
2
|
|
3
3
|
module QueueClassicAdmin
|
4
4
|
class QueueClassicJobsController < ApplicationController
|
5
|
+
before_filter :get_job, only: [:destroy, :unlock]
|
5
6
|
def index
|
6
7
|
filter_jobs(QueueClassicJob)
|
7
8
|
@queue_classic_jobs = @queue_classic_jobs.paginate(page: params[:page])
|
8
9
|
end
|
9
10
|
|
10
11
|
def destroy
|
11
|
-
@queue_classic_job = QueueClassicJob.find(params[:id])
|
12
12
|
@queue_classic_job.destroy
|
13
13
|
redirect_to queue_classic_jobs_url
|
14
14
|
end
|
@@ -18,11 +18,21 @@ module QueueClassicAdmin
|
|
18
18
|
redirect_to queue_classic_jobs_url
|
19
19
|
end
|
20
20
|
|
21
|
+
def unlock
|
22
|
+
@queue_classic_job.locked_at = nil
|
23
|
+
@queue_classic_job.save
|
24
|
+
redirect_to queue_classic_jobs_url
|
25
|
+
end
|
26
|
+
|
21
27
|
private
|
22
28
|
def index_path(*params)
|
23
29
|
queue_classic_jobs_path(*params)
|
24
30
|
end
|
25
31
|
|
32
|
+
def get_job
|
33
|
+
@queue_classic_job = QueueClassicJob.find(params[:id])
|
34
|
+
end
|
35
|
+
|
26
36
|
helper_method :index_path
|
27
37
|
end
|
28
38
|
end
|
@@ -65,7 +65,12 @@
|
|
65
65
|
<td><%= queue_classic_job[column] %></th>
|
66
66
|
<% end %>
|
67
67
|
|
68
|
-
<td
|
68
|
+
<td>
|
69
|
+
<%= link_to 'Destroy', queue_classic_job, method: :delete, data: { confirm: 'Are you sure?' }, class: 'btn btn-danger' %>
|
70
|
+
<% if queue_classic_job[:locked_at] %>
|
71
|
+
<%= link_to 'Unlock', unlock_queue_classic_job_path(queue_classic_job), method: :post, data: { confirm: 'Are you sure?' }, class: 'btn btn-danger' %>
|
72
|
+
<% end %>
|
73
|
+
</td>
|
69
74
|
</tr>
|
70
75
|
<% end %>
|
71
76
|
</tbody>
|
data/config/routes.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: queue_classic_admin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Simon Mathieu
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-07-
|
11
|
+
date: 2013-07-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -164,7 +164,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
164
164
|
version: '0'
|
165
165
|
requirements: []
|
166
166
|
rubyforge_project:
|
167
|
-
rubygems_version: 2.0.
|
167
|
+
rubygems_version: 2.0.4
|
168
168
|
signing_key:
|
169
169
|
specification_version: 4
|
170
170
|
summary: An admin interface for QueueClassic
|