thirdparty/google_appengine/google/appengine/ext/admin/templates/queues.html
author Lennard de Rijk <ljvderijk@gmail.com>
Sun, 12 Jul 2009 14:03:35 +0200
changeset 2610 95949d4c45d9
parent 2413 d0b7dac5325c
permissions -rw-r--r--
Add scope view for GradingSurveyGroup and set access checks. The access checks are now properly set for create, edit and show. To facilitate the scope view the access check have an extra check built in to ensure that a scope is actually present before cheking for an existing Program.

{% extends "base.html" %}

{% block title %}
{{ application_name }} Development Console - Task Queue Viewer{% endblock %}

{% block head %}
  <style type="text/css">{% include "css/queues.css" %}</style>
{% endblock %}

{% block breadcrumbs %}
  <span class="item"><a href="">Queue Viewer</a></span>
{% endblock %}

{% block body %}
<h3>Task Queues</h3>

{% if queues %}
  <p>
  Tasks will not run automatically. Select a queue to run tasks manually.
  </p>

  <table id="ah-queues" class="ae-table ae-table-striped">
    <thead>
      <tr>
        <th>Queue Name</th>
        <th>Maximum Rate</th>
        <th>Bucket Size</th>
        <th>Oldest Task (UTC)</th>
        <th>Tasks in Queue</th>
        <th></th>
      </tr>
    </thead>
    <tbody>
      {% for queue in queues %}
        <tr class="{% cycle ae-odd,ae-even %}">
          <td valign="top">
            <a href="/_ah/admin/tasks?queue={{ queue.name|escape }}">
            {{ queue.name|escape }}</a>
          </td>
          <td valign="top">
            {{ queue.max_rate|escape }}
          </td>
          <td valign="top">
            {{ queue.bucket_size|escape }}
          </td>
          <td valign="top">
            {% if queue.oldest_task %}
              {{ queue.oldest_task|escape }}<br/>
              ({{ queue.eta_delta|escape }})
            {% else %}
              None
            {% endif %}
          </td>
          <td valign="top">
            {{ queue.tasks_in_queue|escape }}
          </td>
          <td valign="top">
            <form id="flushform" action="/_ah/admin/queues" method="post">
            <input type="hidden" name="queue" value="{{ queue.name|escape }}"/>
            <input type="submit" name="action:flushqueue" value="Flush Queue"
             onclick="return confirm('Are you sure you want to flush all ' +
                                     'tasks from {{ queue.name|escape }}?');"/>
            </form>
          </td>
        </tr>
      {% endfor %}
    </tbody>
  </table>
{% else %}
  This application doesn't define any task queues. See the documentation for more.
{% endif %}


{% endblock %}