beanstalkd_view 1.0.2 → 1.1.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.
@@ -5,20 +5,31 @@
5
5
  <table class="table">
6
6
  <thead>
7
7
  <tr>
8
- <th>Server</th>
8
+ <th>Connections</th>
9
+ </tr>
10
+ </thead>
11
+ <tbody>
12
+ <% @connections.each do |connection| %>
13
+ <tr>
14
+ <td><%= connection.address %></a></td>
15
+ </tr>
16
+ <% end %>
17
+ </tbody>
18
+ </table>
19
+
20
+ <table class="table">
21
+ <thead>
22
+ <tr>
9
23
  <th>Tubes</th>
10
24
  </tr>
11
25
  </thead>
12
26
  <tbody>
13
- <% @tubes.keys.each do |key| %>
14
- <% @tubes[key].each do |tube| %>
27
+ <% @tubes.each do |tube| %>
15
28
  <tr>
16
- <td><%= key %></td>
17
- <td><a href="<%= u("/tube/#{tube}") %>"><%= tube %></a></td>
29
+ <td><a href="<%= u("/tube/#{tube.name}") %>"><%= tube.name %></a></td>
18
30
  </tr>
19
- <% end %>
20
- <% end %>
21
- </tbody>
31
+ <% end %>
32
+ </tbody>
22
33
  </table>
23
34
 
24
35
  <table class="table">
@@ -30,30 +41,30 @@
30
41
  <tbody>
31
42
  <tr rel="tooltip" title="The number of ready jobs with priority < 1024.">
32
43
  <td>Urgent</td>
33
- <% if @stats["current-jobs-urgent"] > 0 %>
34
- <td class="data_cell"><span class="badge badge-warning"><%= @stats["current-jobs-urgent"] %></span></td>
44
+ <% if @stats[:current_jobs_urgent] > 0 %>
45
+ <td class="data_cell"><span class="badge badge-warning"><%= @stats[:current_jobs_urgent] %></span></td>
35
46
  <% else %>
36
- <td class="data_cell"><%= @stats["current-jobs-urgent"] %></td>
47
+ <td class="data_cell"><%= @stats[:current_jobs_urgent] %></td>
37
48
  <% end %>
38
49
  </tr>
39
50
  <tr rel="tooltip" title="The number of jobs in the ready queue.">
40
51
  <td>Ready</td>
41
- <td class="data_cell"><%= @stats["current-jobs-ready"] %></td>
52
+ <td class="data_cell"><%= @stats[:current_jobs_ready] %></td>
42
53
  </tr>
43
54
  <tr rel="tooltip" title="The number of jobs reserved by all clients.">
44
55
  <td>Reserved</td>
45
- <td class="data_cell"><%= @stats["current-jobs-reserved"] %></td>
56
+ <td class="data_cell"><%= @stats[:current_jobs_reserved] %></td>
46
57
  </tr>
47
58
  <tr rel="tooltip" title="The number of delayed jobs.">
48
59
  <td>Delayed</td>
49
- <td class="data_cell"><%= @stats["current-jobs-delayed"] %></td>
60
+ <td class="data_cell"><%= @stats[:current_jobs_delayed] %></td>
50
61
  </tr>
51
62
  <tr rel="tooltip" title="he number of buried jobs.">
52
63
  <td>Buried</td>
53
- <% if @stats["current-jobs-buried"] > 0 %>
54
- <td class="data_cell"><span class="badge badge-error"><%= @stats["current-jobs-buried"] %></span></td>
64
+ <% if @stats[:current_jobs_buried] > 0 %>
65
+ <td class="data_cell"><span class="badge badge-error"><%= @stats[:current_jobs_buried] %></span></td>
55
66
  <% else %>
56
- <td class="data_cell"><%= @stats["current-jobs-buried"] %></td>
67
+ <td class="data_cell"><%= @stats[:current_jobs_buried] %></td>
57
68
  <% end %>
58
69
  </tr>
59
70
  </tbody>
@@ -68,7 +79,7 @@
68
79
  <tbody>
69
80
  <tr rel="tooltip" title="The rate of job bury calls to reserve calls.">
70
81
  <td>Bury Rate</td>
71
- <% bury_reserve_rate = (@stats["cmd-bury"].to_f / @stats["cmd-reserve"].to_f) %>
82
+ <% bury_reserve_rate = (@stats[:cmd_bury].to_f / @stats[:cmd_reserve].to_f) %>
72
83
  <% bury_reserve_rate = 0 if bury_reserve_rate.nan? %>
73
84
  <% if bury_reserve_rate > 0.01 %>
74
85
  <td class="data_cell"><span class="badge badge-error"><%= bury_reserve_rate %></span></td>
@@ -78,7 +89,7 @@
78
89
  </tr>
79
90
  <tr rel="tooltip" title="The rate of job timeouts to reserve calls.">
80
91
  <td>Timeout Rate</td>
81
- <% timeout_reserve_rate = (@stats["job-timeouts"].to_f / @stats["cmd-reserve"].to_f) %>
92
+ <% timeout_reserve_rate = (@stats[:job_timeouts].to_f / @stats[:cmd_reserve].to_f) %>
82
93
  <% timeout_reserve_rate = 0 if timeout_reserve_rate.nan? %>
83
94
  <% if timeout_reserve_rate > 0.01 %>
84
95
  <td class="data_cell"><span class="badge badge-error"><%= timeout_reserve_rate %></span></td>
@@ -98,55 +109,55 @@
98
109
  <tbody>
99
110
  <tr rel="tooltip" title="The cumulative count of times a job has timed out.">
100
111
  <td>Job Timeouts</td>
101
- <td class="data_cell"><%= @stats["job-timeouts"] %></td>
112
+ <td class="data_cell"><%= @stats[:job_timeouts] %></td>
102
113
  </tr>
103
114
  <tr rel="tooltip" title="The cumulative count of jobs created.">
104
115
  <td>Total Jobs</td>
105
- <td class="data_cell"><%= @stats["total-jobs"] %></td>
116
+ <td class="data_cell"><%= @stats[:total_jobs] %></td>
106
117
  </tr>
107
118
  <tr rel="tooltip" title="The maximum number of bytes in a job.">
108
119
  <td>Max Job Size</td>
109
- <td class="data_cell"><%= @stats["max-job-size"] %></td>
120
+ <td class="data_cell"><%= @stats[:max_job_size] %></td>
110
121
  </tr>
111
122
  <tr rel="tooltip" title="The number of currently open connections.">
112
123
  <td>Current Connections</td>
113
- <td class="data_cell"><%= @stats["current-connections"] %></td>
124
+ <td class="data_cell"><%= @stats[:current_connections] %></td>
114
125
  </tr>
115
126
  <tr rel="tooltip" title="The number of open connections that have each issued at least one put command.">
116
127
  <td>Current Producers</td>
117
- <td class="data_cell"><%= @stats["current-producers"] %></td>
128
+ <td class="data_cell"><%= @stats[:current_producers] %></td>
118
129
  </tr>
119
130
  <tr rel="tooltip" title="The number of open connections that have each issued at least one reserve command.">
120
131
  <td>Current Workers</td>
121
- <td class="data_cell"><%= @stats["current-workers"] %></td>
132
+ <td class="data_cell"><%= @stats[:current_workers] %></td>
122
133
  </tr>
123
134
  <tr rel="tooltip" title="The number of open connections that have issued a reserve command but not yet received a response.">
124
135
  <td>Current Waiting</td>
125
- <td class="data_cell"><%= @stats["current-waiting"] %></td>
136
+ <td class="data_cell"><%= @stats[:current_waiting] %></td>
126
137
  </tr>
127
138
  <tr rel="tooltip" title="The cumulative count of connections.">
128
139
  <td>Total Connections</td>
129
- <td class="data_cell"><%= @stats["total-connections"] %></td>
140
+ <td class="data_cell"><%= @stats[:total_connections] %></td>
130
141
  </tr>
131
142
  <tr rel="tooltip" title="The process id of the server.">
132
143
  <td>pid</td>
133
- <td class="data_cell"><%= @stats["pid"] %></td>
144
+ <td class="data_cell"><%= @stats[:pid] %></td>
134
145
  </tr>
135
146
  <tr rel="tooltip" title="The version string of the server.">
136
147
  <td>Version</td>
137
- <td class="data_cell"><%= @stats["version"] %></td>
148
+ <td class="data_cell"><%= @stats[:version] %></td>
138
149
  </tr>
139
150
  <tr rel="tooltip" title="The accumulated user CPU time of this process in seconds and microseconds.">
140
151
  <td>rusage-utime</td>
141
- <td class="data_cell"><%= @stats["rusage-utime"] %></td>
152
+ <td class="data_cell"><%= @stats[:rusage_utime] %></td>
142
153
  </tr>
143
154
  <tr rel="tooltip" title="The accumulated system CPU time of this process in seconds and microseconds.">
144
155
  <td>rusage-stime</td>
145
- <td class="data_cell"><%= @stats["rusage-stime"] %></td>
156
+ <td class="data_cell"><%= @stats[:rusage_stime] %></td>
146
157
  </tr>
147
158
  <tr rel="tooltip" title="The number of seconds since this server started running.">
148
159
  <td>Uptime</td>
149
- <td class="data_cell"><%= @stats["uptime"] %></td>
160
+ <td class="data_cell"><%= @stats[:uptime] %></td>
150
161
  </tr>
151
162
  </tbody>
152
163
  </table>
@@ -160,15 +171,15 @@
160
171
  <tbody>
161
172
  <tr rel="tooltip" title="The index of the oldest binlog file needed to store the current jobs.">
162
173
  <td>Oldest Index</td>
163
- <td class="data_cell"><%= @stats["binlog-oldest-index"] %></td>
174
+ <td class="data_cell"><%= @stats[:binlog_oldest_index] %></td>
164
175
  </tr>
165
176
  <tr rel="tooltip" title="The index of the current binlog file being written to. If binlog is not active this value will be 0.">
166
177
  <td>Current Index</td>
167
- <td class="data_cell"><%= @stats["binlog-current-index"] %></td>
178
+ <td class="data_cell"><%= @stats[:binlog_current_index] %></td>
168
179
  </tr>
169
180
  <tr rel="tooltip" title="The maximum size in bytes a binlog file is allowed to get before a new binlog file is opened.">
170
181
  <td>Max Size</td>
171
- <td class="data_cell"><%= @stats["binlog-max-size"] %></td>
182
+ <td class="data_cell"><%= @stats[:binlog_max_size] %></td>
172
183
  </tr>
173
184
  </tbody>
174
185
  </table>
@@ -184,83 +195,83 @@
184
195
  <tbody>
185
196
  <tr rel="tooltip" title="The cumulative number of put commands.">
186
197
  <td>put</td>
187
- <td class="data_cell"><%= @stats["cmd-put"] %></td>
198
+ <td class="data_cell"><%= @stats[:cmd_put] %></td>
188
199
  </tr>
189
200
  <tr rel="tooltip" title="The cumulative number of peek commands.">
190
201
  <td>peek</td>
191
- <td class="data_cell"><%= @stats["cmd-peek"] %></td>
202
+ <td class="data_cell"><%= @stats[:cmd_peek] %></td>
192
203
  </tr>
193
204
  <tr rel="tooltip" title="The cumulative number of peek-ready commands.">
194
205
  <td>peek-ready</td>
195
- <td class="data_cell"><%= @stats["cmd-peek-ready"] %></td>
206
+ <td class="data_cell"><%= @stats[:cmd_peek_ready] %></td>
196
207
  </tr>
197
208
  <tr rel="tooltip" title="The cumulative number of peek-delayed commands.">
198
209
  <td>peek-delayed</td>
199
- <td class="data_cell"><%= @stats["cmd-peek-delayed"] %></td>
210
+ <td class="data_cell"><%= @stats[:cmd_peek_delayed] %></td>
200
211
  </tr>
201
212
  <tr rel="tooltip" title="The cumulative number of peek-buried commands.">
202
213
  <td>peek-buried</td>
203
- <td class="data_cell"><%= @stats["cmd-peek-buried"] %></td>
214
+ <td class="data_cell"><%= @stats[:cmd_peek_buried] %></td>
204
215
  </tr>
205
216
  <tr rel="tooltip" title="The cumulative number of reserve commands.">
206
217
  <td>reserve</td>
207
- <td class="data_cell"><%= @stats["cmd-reserve"] %></td>
218
+ <td class="data_cell"><%= @stats[:cmd_reserve] %></td>
208
219
  </tr>
209
220
  <tr rel="tooltip" title="The cumulative number of use commands.">
210
221
  <td>use</td>
211
- <td class="data_cell"><%= @stats["cmd-use"] %></td>
222
+ <td class="data_cell"><%= @stats[:cmd_use] %></td>
212
223
  </tr>
213
224
  <tr rel="tooltip" title="The cumulative number of watch commands.">
214
225
  <td>watch</td>
215
- <td class="data_cell"><%= @stats["cmd-watch"] %></td>
226
+ <td class="data_cell"><%= @stats[:cmd_watch] %></td>
216
227
  </tr>
217
228
  <tr rel="tooltip" title="The cumulative number of ignore commands.">
218
229
  <td>ignore</td>
219
- <td class="data_cell"><%= @stats["cmd-ignore"] %></td>
230
+ <td class="data_cell"><%= @stats[:cmd_ignore] %></td>
220
231
  </tr>
221
232
  <tr rel="tooltip" title="The cumulative number of delete commands.">
222
233
  <td>delete</td>
223
- <td class="data_cell"><%= @stats["cmd-delete"] %></td>
234
+ <td class="data_cell"><%= @stats[:cmd_delete] %></td>
224
235
  </tr>
225
236
  <tr rel="tooltip" title="The cumulative number of release commands.">
226
237
  <td>release</td>
227
- <td class="data_cell"><%= @stats["cmd-release"] %></td>
238
+ <td class="data_cell"><%= @stats[:cmd_release] %></td>
228
239
  </tr>
229
240
  <tr rel="tooltip" title="The cumulative number of bury commands.">
230
241
  <td>bury</td>
231
- <td class="data_cell"><%= @stats["cmd-bury"] %></td>
242
+ <td class="data_cell"><%= @stats[:cmd_bury] %></td>
232
243
  </tr>
233
244
  <tr rel="tooltip" title="The cumulative number of kick commands.">
234
245
  <td>kick</td>
235
- <td class="data_cell"><%= @stats["cmd-kick"] %></td>
246
+ <td class="data_cell"><%= @stats[:cmd_kick] %></td>
236
247
  </tr>
237
248
  <tr rel="tooltip" title="The cumulative number of stats commands.">
238
249
  <td>stats</td>
239
- <td class="data_cell"><%= @stats["cmd-stats"] %></td>
250
+ <td class="data_cell"><%= @stats[:cmd_stats] %></td>
240
251
  </tr>
241
252
  <tr rel="tooltip" title="The cumulative number of stats-job commands.">
242
253
  <td>stats-job</td>
243
- <td class="data_cell"><%= @stats["cmd-stats-job"] %></td>
254
+ <td class="data_cell"><%= @stats[:cmd_stats_job] %></td>
244
255
  </tr>
245
256
  <tr rel="tooltip" title="The cumulative number of stats-tube commands.">
246
257
  <td>stats-tube</td>
247
- <td class="data_cell"><%= @stats["cmd-stats-tube"] %></td>
258
+ <td class="data_cell"><%= @stats[:cmd_stats_tube] %></td>
248
259
  </tr>
249
260
  <tr rel="tooltip" title="The cumulative number of list-tubes commands.">
250
261
  <td>list-tubes</td>
251
- <td class="data_cell"><%= @stats["cmd-list-tubes"] %></td>
262
+ <td class="data_cell"><%= @stats[:cmd_list_tubes] %></td>
252
263
  </tr>
253
264
  <tr rel="tooltip" title="The cumulative number of list-tube-used commands.">
254
265
  <td>list-tube-used</td>
255
- <td class="data_cell"><%= @stats["cmd-list-tube-used"] %></td>
266
+ <td class="data_cell"><%= @stats[:cmd_list_tube_used] %></td>
256
267
  </tr>
257
268
  <tr rel="tooltip" title="The cumulative number of list-tubes-watched commands.">
258
269
  <td>list-tubes-watched</td>
259
- <td class="data_cell"><%= @stats["cmd-list-tubes-watched"] %></td>
270
+ <td class="data_cell"><%= @stats[:cmd_list_tubes_watched] %></td>
260
271
  </tr>
261
272
  <tr rel="tooltip" title="The cumulative number of pause-tube commands.">
262
273
  <td>pause-tube</td>
263
- <td class="data_cell"><%= @stats["cmd-pause-tube"] %></td>
274
+ <td class="data_cell"><%= @stats[:cmd_pause_tube] %></td>
264
275
  </tr>
265
276
  </tbody>
266
277
  </table>
@@ -347,8 +358,8 @@ $(document).ready(function(){
347
358
 
348
359
  //Setup Typeahead For Tube Names on Add Job Form
349
360
  var tubeNames = [];
350
- <% @tube_set.each do |tube| %>
351
- tubeNames.push('<%=tube%>');
361
+ <% @tubes.each do |tube| %>
362
+ tubeNames.push('<%=tube.name%>');
352
363
  <% end %>
353
364
  $('#form_tube_name').typeahead({source: tubeNames});
354
365
  });
@@ -9,15 +9,16 @@
9
9
  <input type="text" class="span2" name="max" value="<%= @max %>">
10
10
  <select id="peek_range_tube_select" class="span2" name="tube">
11
11
  <option></option>
12
- <% @tube_set.each do |tube| %>
13
- <option <% if @tube == tube%>selected="true"<% end %>><%=tube%></option>
12
+ <% @tubes.each do |tube| %>
13
+ <option <% if @tube and @tube.name == tube.name%>selected="true"<% end %>><%=tube.name%></option>
14
14
  <% end %>
15
15
  </select>
16
16
  <button type="submit" class="btn">Refresh</button>
17
17
  </form>
18
18
  <table id="peek_range_table" class="table table-bordered">
19
- <tr>
19
+ <tr class="header">
20
20
  <th>ID</th>
21
+ <th>Tube</th>
21
22
  <th>Priority</th>
22
23
  <th>Age</th>
23
24
  <th>Delay</th>
@@ -31,8 +32,9 @@
31
32
  <th>Body</th>
32
33
  </tr>
33
34
  <% @jobs.each do |job| %>
34
- <tr data-tube="<%=job['tube']%>" <% if job['pri'] < 1024 %>class="urgent"<%end%>>
35
+ <tr class="datum" data-tube="<%=job['tube']%>" <% if job['pri'] < 1024 %>class="urgent"<%end%>>
35
36
  <td><%=job['id']%></td>
37
+ <td><%=job['tube']%></td>
36
38
  <td><%=job['pri']%></td>
37
39
  <td><%=job['age']%></td>
38
40
  <td><%=job['delay']%></td>
@@ -1,6 +1,6 @@
1
1
  <div class="row">
2
2
  <div class="span6">
3
- <h1><%= @tube %></h1>
3
+ <h1><%= @tube.name %></h1>
4
4
 
5
5
  <table class="table">
6
6
  <thead>
@@ -11,30 +11,30 @@
11
11
  <tbody>
12
12
  <tr rel="tooltip" title="The number of ready jobs with priority < 1024 in this tube.">
13
13
  <td>Urgent</td>
14
- <% if @stats["current-jobs-urgent"] > 0 %>
15
- <td class="data_cell"><span class="badge badge-warning"><%= @stats["current-jobs-urgent"] %></span></td>
14
+ <% if @stats[:current_jobs_urgent] > 0 %>
15
+ <td class="data_cell"><span class="badge badge-warning"><%= @stats[:current_jobs_urgent] %></span></td>
16
16
  <% else %>
17
- <td class="data_cell"><%= @stats["current-jobs-urgent"] %></td>
17
+ <td class="data_cell"><%= @stats[:current_jobs_urgent] %></td>
18
18
  <% end %>
19
19
  </tr>
20
20
  <tr rel="tooltip" title="The number of jobs in the ready queue in this tube.">
21
21
  <td>Ready</td>
22
- <td class="data_cell"><%= @stats["current-jobs-ready"] %></td>
22
+ <td class="data_cell"><%= @stats[:current_jobs_ready] %></td>
23
23
  </tr>
24
24
  <tr rel="tooltip" title="The number of jobs reserved by all clients in this tube.">
25
25
  <td>Reserved</td>
26
- <td class="data_cell"><%= @stats["current-jobs-reserved"] %></td>
26
+ <td class="data_cell"><%= @stats[:current_jobs_reserved] %></td>
27
27
  </tr>
28
28
  <tr rel="tooltip" title="The number of delayed jobs in this tube.">
29
29
  <td>Delayed</td>
30
- <td class="data_cell"><%= @stats["current-jobs-delayed"] %></td>
30
+ <td class="data_cell"><%= @stats[:current_jobs_delayed] %></td>
31
31
  </tr>
32
32
  <tr rel="tooltip" title="The number of buried jobs in this tube.">
33
33
  <td>Buried</td>
34
- <% if @stats["current-jobs-buried"] > 0 %>
35
- <td class="data_cell"><span class="badge badge-error"><%= @stats["current-jobs-buried"] %></span></td>
34
+ <% if @stats[:current_jobs_buried] > 0 %>
35
+ <td class="data_cell"><span class="badge badge-error"><%= @stats[:current_jobs_buried] %></span></td>
36
36
  <% else %>
37
- <td class="data_cell"><%= @stats["current-jobs-buried"] %></td>
37
+ <td class="data_cell"><%= @stats[:current_jobs_buried] %></td>
38
38
  <% end %>
39
39
  </tr>
40
40
  </tbody>
@@ -49,22 +49,22 @@
49
49
  <tbody>
50
50
  <tr rel="tooltip" title="The cumulative count of jobs created in this tube.">
51
51
  <td>Total Jobs</td>
52
- <td class="data_cell"><%= @stats["total-jobs"] %></td>
52
+ <td class="data_cell"><%= @stats[:total_jobs] %></td>
53
53
  </tr>
54
54
  <tr rel="tooltip" title="The number of open connections that have issued a reserve command while watching this tube but not yet received a response.">
55
55
  <td>Current Waiting</td>
56
- <td class="data_cell"><%= @stats["current-waiting"] %></td>
56
+ <td class="data_cell"><%= @stats[:current_waiting] %></td>
57
57
  </tr>
58
58
  <tr rel="tooltip" title="The number of seconds the tube has been paused for.">
59
59
  <td>Time Paused</td>
60
- <td class="data_cell"><%= @stats["pause"] %></td>
60
+ <td class="data_cell"><%= @stats[:pause] %></td>
61
61
  </tr>
62
62
  <tr rel="tooltip" title="The number of seconds until the tube is un-paused.">
63
63
  <td>Pause Time Left</td>
64
- <% if @stats["pause-time-left"] > 0 %>
65
- <td class="data_cell"><span class="badge badge-warning"><%= @stats["pause-time-left"] %></span></td>
64
+ <% if @stats[:pause_time_left] > 0 %>
65
+ <td class="data_cell"><span class="badge badge-warning"><%= @stats[:pause_time_left] %></span></td>
66
66
  <% else %>
67
- <td class="data_cell"><%= @stats["pause-time-left"] %></td>
67
+ <td class="data_cell"><%= @stats[:pause_time_left] %></td>
68
68
  <% end %>
69
69
  </tr>
70
70
  </tbody>
@@ -79,7 +79,7 @@
79
79
  <tbody>
80
80
  <tr rel="tooltip" title="The cumulative number of pause-tube commands for this tube.">
81
81
  <td>pause-tube</td>
82
- <td class="data_cell"><%= @stats["cmd-pause-tube"] %></td>
82
+ <td class="data_cell"><%= @stats[:cmd_pause_tube] %></td>
83
83
  </tr>
84
84
  </tbody>
85
85
  </table>
@@ -87,8 +87,8 @@
87
87
 
88
88
  <div class="span6">
89
89
  <h3>Pause Tube</h3>
90
- <form class="well form-inline" name="pause_form" action="<%= u("/pause") %>" method="POST">
91
- <input id="form_tube_name" type="hidden" name="tube" value="<%= @tube %>">
90
+ <form id="pause_form" class="well form-inline" name="pause_form" action="<%= u("/pause") %>" method="POST">
91
+ <input id="form_tube_name" type="hidden" name="tube" value="<%= @tube.name %>">
92
92
  <input id="form_url_base" type="hidden" name="url_base" value="<%= u("/") %>">
93
93
  <input type="text" class="span3" placeholder="Number of seconds to wait" name="delay">
94
94
  <button type="submit" class="btn">Pause</button>
@@ -96,7 +96,7 @@
96
96
 
97
97
  <h3>Kick Tube</h3>
98
98
  <form id="kick_form" class="well form-inline" name="kick_form" action="<%= u("/kick") %>" method="POST">
99
- <input type="hidden" name="tube" value="<%= @tube %>">
99
+ <input type="hidden" name="tube" value="<%= @tube.name %>">
100
100
  <input type="text" class="span3" placeholder="Number of jobs" name="bound">
101
101
  <button type="submit" class="btn">Kick</button>
102
102
  </form>
@@ -110,7 +110,7 @@
110
110
 
111
111
  <h3>Peek Range</h3>
112
112
  <form id="peek_range_form" class="well form-inline" name="peek_range_form" action="<%= u("/peek-range") %>" method="GET">
113
- <input type="hidden" name="tube" value="<%= @tube %>">
113
+ <input type="hidden" name="tube" value="<%= @tube.name %>">
114
114
  <input type="text" class="span2" placeholder="0" name="min">
115
115
  <input type="text" class="span2" placeholder="0" name="max">
116
116
  <button type="submit" class="btn">Peek</button>
@@ -3,10 +3,9 @@ require 'sinatra/base'
3
3
  require 'sinatra/cookies'
4
4
  require 'sinatra/assetpack'
5
5
  require 'erb'
6
- require "beanstalk-client"
6
+ require "beaneater"
7
7
  require "json"
8
8
  require "beanstalkd_view/version"
9
- require "beanstalkd_view/extensions/beanstalk-pool"
10
9
  require "beanstalkd_view/beanstalkd_utils"
11
10
  require 'beanstalkd_view/server'
12
11
 
@@ -3,7 +3,6 @@ require 'spec_helper'
3
3
  describe "SinatraIntegration", :type => :request do
4
4
 
5
5
  before :all do
6
- ENV['BEANSTALK_URL'] = 'beanstalk://localhost/'
7
6
  Capybara.app = BeanstalkdView::Server.new
8
7
  end
9
8
 
@@ -19,15 +19,5 @@ describe BeanstalkdView::BeanstalkdUtils do
19
19
  utils.beanstalk_addresses
20
20
  }.should raise_error(BeanstalkdView::BeanstalkdUtils::BadURL)
21
21
  end
22
-
23
- describe "with beanstalkd daemon running", :requires_beanstalkd => true do
24
- it "beanstalkd_client_ruby stats hash can be accessed with keys" do
25
- ENV['BEANSTALK_URL'] = 'beanstalk://localhost/'
26
- utils = Object.new.extend BeanstalkdView::BeanstalkdUtils
27
- @stats = utils.beanstalk.stats
28
- @stats.keys.should include('current-jobs-ready')
29
- @stats['current-jobs-ready'].should > 0
30
- end
31
- end
32
22
 
33
23
  end