diff --git a/code/public/css/rq.css b/code/public/css/rq.css index 838b089..a3db4f4 100644 --- a/code/public/css/rq.css +++ b/code/public/css/rq.css @@ -345,6 +345,17 @@ form.inrow button { width: 5em; } +.schedule { + font-family: monospace; + border-left: 2px solid #ddd; + padding-left: 3px; + margin-top: 5px; +} + +.schedule button.cron-now { + width: 7em; +} + .queue-lists { table-layout: fixed; } diff --git a/code/views/_main_queue_row.erb b/code/views/_main_queue_row.erb index fdb0692..79ce8b6 100644 --- a/code/views/_main_queue_row.erb +++ b/code/views/_main_queue_row.erb @@ -8,6 +8,7 @@ <%= msgs_labels.zip(qc.num_messages.values_at(*msgs_labels)).map{|ab| "
#{ab[0]}:
#{ab[1].to_s.ljust(4)}
" }.join %> <% qc.config[1]['schedule'].each do |sched| %> +
"> @@ -17,16 +18,20 @@ - + CRON: <%= sched['cron'] %> + <%- %w(param1 param2 param3 param4).each do |p| -%> + <%- if sched['params'][p] -%> +
+ <%= p.upcase %>: "<%= sched['params'][p] %>" + <%- end -%> + <%- end -%> +
+ Next run at <%= CronParser.new(sched['cron']).next.strftime("%c %Z") %> +
+
-
-<%=           sched['cron'] -%>
-<%=           "\n  PARAM1: \"#{sched['params']['param1']}\"" if sched['params']['param1'] -%>
-<%=           "\n  PARAM2: \"#{sched['params']['param2']}\"" if sched['params']['param2'] -%>
-<%=           "\n  PARAM3: \"#{sched['params']['param3']}\"" if sched['params']['param3'] -%>
-<%=           "\n  PARAM4: \"#{sched['params']['param4']}\"" if sched['params']['param4'] -%>
-          
- <% end %> +
+ <%- end -%> <%= qc.ping %> <%= qc.read_pid %>