Ticket #743: template.diff

File template.diff, 1.3 KB (added by jhford, 10 years ago)

template

  • new file uildbot/status/web/templates/slaves.html

    diff --git a/buildbot/status/web/templates/slaves.html b/buildbot/status/web/templates/slaves.html
    new file mode 100644
    index 0000000..bcad101
    - +  
     1{% extends "layout.html" %}
     2
     3{% block content %}
     4
     5<h1>Buildslaves</h1>
     6
     7<div class="column">
     8
     9<table class="info">
     10
     11<tr>
     12  <th>Name</th>
     13  <th>BuildBot</th>
     14  <th>Admin</th>
     15  <th>Last heard from</th>
     16  <th>Status</th>
     17</tr>
     18
     19{% for s in slaves %}
     20  <tr class="{{ loop.cycle('alt','') }}">
     21  <td><b><a href="{{ s.link }}">{{ s.name }}</a></b></td>
     22 
     23  <td>{{ s.version or '-' }}</td>
     24 
     25  {% if s.connected %}
     26    <td>
     27    {%- if s.admin -%}
     28      Admin: {{ s.admin|email }}
     29    {%- endif -%}
     30    </td>
     31   
     32    <td>
     33    {%- if s.last_heard_from_age -%}
     34      {{ s.last_heard_from_age }} <small>({{ s.last_heard_from_time }})</small>
     35    {%- endif -%}
     36    </td>
     37       
     38    {% if s.running_builds %}
     39      <td class="building">Running {{ s.running_builds }} build(s)</td>
     40    {% else %}
     41      <td class="idle">Idle</td>
     42    {% endif %}
     43       
     44  {% else %}
     45    <td>-</td>
     46    <td>-</td>
     47    <td class="offline">Not connected</td>
     48  {% endif %}
     49 
     50  </tr>
     51{% endfor %}
     52</table>
     53
     54</div>
     55 
     56{% endblock %}