Sha256: bc780c4b838ad8c1fff70c24d581e21d7eaf7e18c395cceadd2529015e1e74a7

Contents?: true

Size: 1.7 KB

Versions: 1

Compression:

Stored size: 1.7 KB

Contents

<h1>Apple Push Notification Applications</h1>

<p class='intro'>
  The list below contains the APN application queues.
</p>

<p class='sub'>
  Showing <b><%=size = Resque.aps_applications_count %></b> applications.
</p>

<table>
  <tr>
    <th>Application</th>
    <th>Notification Count</th>
    <th>Queued Count</th>
    <th></th>
  </tr>
  <%   
       application_names = Resque.aps_application_names(0, 0)
       application_data  = {}
       application_names.each do |app_name|
         application_data[app_name] = [
           Resque.aps_notification_count_for_application(app_name),
           Resque.aps_applications_queued_count(app_name).to_i
         ]
       end
       application_names.sort! { |x,y|
         ret = application_data[y][0] <=> application_data[x][0]
         ret = application_data[y][1] <=> application_data[x][1] if ret == 0
         ret = x                      <=> y                      if ret == 0
         ret
       }
  %>
  <% application_names.each do |application_name| %>
    <tr>
      <td><a href="<%= url "aps/#{application_name}" %>"><%= application_name %></a></td>
      <td><%= application_data[application_name][0] %></td>
      <td><%= application_data[application_name][1] %></td>
      <td>
        <form action="<%= url "/aps/#{application_name}" %>" method="post">
          <input type="submit" value="Queue worker">
        </form>
        <form action="<%= url "/aps/#{application_name}/reset" %>" method="post">
          <input type="submit" value="Reset queued count">
        </form>
        <form action="<%= url "/aps/#{application_name}/delete" %>" method="post">
          <input type="submit" value="Remove queue">
        </form>
      </td>
    </tr>
  <% end %>
</table>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
resque-aps-0.9.17 lib/resque/plugins/aps/server/views/aps_applications.erb