Changeset 52221 in webkit


Ignore:
Timestamp:
Dec 16, 2009 2:19:54 PM (14 years ago)
Author:
eric@webkit.org
Message:

2009-12-16 Eric Seidel <eric@webkit.org>

Reviewed by Adam Barth.

Generalize commit-queue recent status page for all queues
https://bugs.webkit.org/show_bug.cgi?id=32633

  • QueueStatusServer/index.html:
    • Generalize to support other queues.
  • QueueStatusServer/queue_status.py:
    • Generalize MainPage to support other queues.
Location:
trunk/WebKitTools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKitTools/ChangeLog

    r52218 r52221  
     12009-12-16  Eric Seidel  <eric@webkit.org>
     2
     3        Reviewed by Adam Barth.
     4
     5        Generalize commit-queue recent status page for all queues
     6        https://bugs.webkit.org/show_bug.cgi?id=32633
     7
     8        * QueueStatusServer/index.html:
     9         - Generalize to support other queues.
     10        * QueueStatusServer/queue_status.py:
     11         - Generalize MainPage to support other queues.
     12
    1132009-12-16  Evan Martin  <evan@chromium.org>
    214
  • trunk/WebKitTools/QueueStatusServer/index.html

    r52147 r52221  
    22<html>
    33<head>
    4     <title>WebKit Commit Queue Status</title>
     4    <title>WebKit {{ pretty_queue_name }} Status</title>
    55    <link type="text/css" rel="stylesheet" href="/stylesheets/main.css" />
    66</head>
     
    2929    </table>
    3030
    31     <div id="footer"><a href="https://bugs.webkit.org/buglist.cgi?query_format=advanced&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&field0-0-0=flagtypes.name&type0-0-0=equals&value0-0-0=commit-queue%2B">queued bugs</a> | <a href="http://trac.webkit.org/wiki/CommitQueue">documentation</a> | <a href="http://webkit.org/">webkit.org</a></div>
     31    <div id="footer">
     32        {% if show_commit_queue_footer %}
     33        <a href="https://bugs.webkit.org/buglist.cgi?query_format=advanced&bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&field0-0-0=flagtypes.name&type0-0-0=equals&value0-0-0=commit-queue%2B">queued bugs</a> | <a href="http://trac.webkit.org/wiki/CommitQueue">documentation</a> |
     34        {% endif %}
     35        <a href="http://webkit.org/">webkit.org</a>
     36    </div>
    3237    </center>
    3338</body>
  • trunk/WebKitTools/QueueStatusServer/queue_status.py

    r52218 r52221  
    5252
    5353
    54 class MainPage(webapp.RequestHandler):
    55     def get(self):
    56         statuses_query = QueueStatus.all().filter('queue_name =', 'commit-queue').order('-date')
     54class RecentStatus(webapp.RequestHandler):
     55    def _title_case(self, string):
     56        words = string.split(" ")
     57        words = map(lambda word: word.capitalize(), words)
     58        return " ".join(words)
     59
     60    def _pretty_queue_name(self, queue_name):
     61        return self._title_case(queue_name.replace("-", " "))
     62
     63    # We could change "/" to just redirect to /queue-status/commit-queue in the future
     64    # at which point we would not need a default value for queue_name here.
     65    def get(self, queue_name="commit-queue"):
     66        statuses_query = QueueStatus.all().filter("queue_name =", queue_name).order("-date")
    5767        statuses = statuses_query.fetch(6)
    5868        if not statuses:
    5969            return self.response.out.write("No status to report.")
    6070        template_values = {
    61             'last_status' : statuses[0],
    62             'recent_statuses' : statuses[1:],
     71            "last_status" : statuses[0],
     72            "recent_statuses" : statuses[1:],
     73            "pretty_queue_name" : self._pretty_queue_name(queue_name),
     74            "show_commit_queue_footer" : queue_name == "commit-queue"
    6375        }
    64         self.response.out.write(template.render('index.html', template_values))
     76        self.response.out.write(template.render("index.html", template_values))
    6577
    6678
     
    162174
    163175routes = [
    164     ('/', MainPage),
     176    ('/', RecentStatus),
     177    ('/queue-status/(.*)', RecentStatus),
    165178    ('/update-status', UpdateStatus),
    166179    (r'/patch-status/(.*)/(.*)', PatchStatus),
Note: See TracChangeset for help on using the changeset viewer.