Changeset 83956 in webkit
- Timestamp:
- Apr 15, 2011 12:54:27 AM (13 years ago)
- Location:
- trunk/Tools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r83946 r83956 1 2011-04-15 Eric Seidel <eric@webkit.org> 2 3 Reviewed by Mihai Parparita. 4 5 queues.webkit.org should display when a bot last rebooted 6 https://bugs.webkit.org/show_bug.cgi?id=58562 7 8 There is more repeated code here than I would like. I fear 9 my django-fu isn't quite up to snuff. 10 11 * QueueStatusServer/handlers/queuestatus.py: 12 * QueueStatusServer/templates/queuestatus.html: 13 1 14 2011-04-14 Alok Priyadarshi <alokp@chromium.org> 2 15 -
trunk/Tools/QueueStatusServer/handlers/queuestatus.py
r83881 r83956 64 64 return statuses.order("-date").fetch(15) 65 65 66 def _fetch_last_ pass(self, queue, bot_id):66 def _fetch_last_message_matching(self, queue, bot_id, message): 67 67 statuses = queuestatus.QueueStatus.all() 68 68 statuses = statuses.filter("queue_name =", queue.name()) 69 69 if bot_id: 70 70 statuses.filter("bot_id =", bot_id) 71 statuses.filter("message =", "Pass")71 statuses.filter("message =", message) 72 72 return statuses.order("-date").get() 73 73 … … 86 86 87 87 statuses = self._fetch_statuses(queue, bot_id) 88 last_pass = self._fetch_last_pass(queue, bot_id)89 88 template_values = { 90 89 "page_title": self._page_title(queue, bot_id), … … 92 91 "status_groups": self._build_status_groups(statuses), 93 92 "bot_id": bot_id, 94 "last_pass": last_pass, 93 "last_pass": self._fetch_last_message_matching(queue, bot_id, "Pass"), 94 "last_boot": self._fetch_last_message_matching(queue, bot_id, "Starting Queue"), 95 95 } 96 96 self.response.out.write(template.render("templates/queuestatus.html", template_values)) -
trunk/Tools/QueueStatusServer/templates/queuestatus.html
r83881 r83956 8 8 <h1>{{ page_title }}</h1> 9 9 10 {% if last_pass %}11 10 <h3>Summary</h3> 12 <div>Last Pass: {{ last_pass.date|timesince }} ago</div> 11 <div> 12 Last Pass: {{ last_pass.date|timesince }} ago 13 {% if not bot_id and last_pass.bot_id %} 14 by <a href="/queue-status/{{last_pass.queue_name}}/bots/{{last_pass.bot_id}}">{{ last_pass.bot_id }}</a> 13 15 {% endif %} 16 </div> 17 <div> 18 Last Boot: {{ last_boot.date|timesince }} ago 19 {% if not bot_id and last_boot.bot_id %} 20 by <a href="/queue-status/{{last_boot.queue_name}}/bots/{{last_boot.bot_id}}">{{ last_boot.bot_id }}</a> 21 {% endif %} 22 </div> 14 23 15 24 <h3>Recent Status</h3>
Note: See TracChangeset
for help on using the changeset viewer.