Html程序  |  65行  |  2.34 KB

<!DOCTYPE html>
<html>
<head>
<title>WebKit Bot Status</title>
<link type="text/css" rel="stylesheet" href="/stylesheets/dashboard.css" />
<script>
function statusDetail(patch_id) {
  // FIXME: We'd like to use AJAX to show the details on this page.
  window.location = "/patch/" + patch_id
}
</script>
</head>
<body>
<h1>WebKit Bot Status</h1>
<table>
  <theader>
    <tr>
      <th>Bug</th>
      <th>Attachment</th>
      <th>Style</th>
      <th>Chromium</th>
      <th>Qt</th>
      <th>Mac</th>
      <th>Gtk</th>
      <th>Commit</th>
    </tr>
  </thead>
  <tbody>{% for summary in summaries %}
    <tr>
      <td class="status">
        {{ summary.bug_id|force_escape|webkit_bug_id|safe }}
      </td>
      <td class="status">
        {{ summary.attachment_id|force_escape|webkit_attachment_id|safe }}
      </td>
      <!-- FIXME: Find some way to remove this copy-and-paste code! -->
      <td class="status {{ summary.style_queue.state }}"{% if summary.style_queue.status %}
          onclick="statusDetail({{ summary.attachment_id }})"
          title="{{ summary.style_queue.status.date|timesince }}"{% endif %}>
      </td>
      <td class="status {{ summary.chromium_ews.state }}"{% if summary.chromium_ews.status %}
          onclick="statusDetail({{ summary.attachment_id }})"
          title="{{ summary.chromium_ews.status.date|timesince }} ago"{% endif %}>
      </td>
      <td class="status {{ summary.qt_ews.state }}"{% if summary.qt_ews.status %}
          onclick="statusDetail({{ summary.attachment_id }})"
          title="{{ summary.qt_ews.status.date|timesince }} ago"{% endif %}>
      </td>
      <td class="status {{ summary.mac_ews.state }}"{% if summary.mac_ews.status %}
          onclick="statusDetail({{ summary.attachment_id }})"
          title="{{ summary.mac_ews.status.date|timesince }} ago"{% endif %}>
      </td>
      <td class="status {{ summary.gtk_ews.state }}"{% if summary.gtk_ews.status %}
          onclick="statusDetail({{ summary.attachment_id }})"
          title="{{ summary.gtk_ews.status.date|timesince }} ago"{% endif %}>
      </td>
      <td class="status {{ summary.commit_queue.state }}"{% if summary.commit_queue.status %}
          onclick="statusDetail({{ summary.attachment_id }})"
          title="{{ summary.commit_queue.status.date|timesince }} ago"{% endif %}>
      </td>
    </tr>{% endfor %}
  </tbody>
</table>
</html>