summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Reporting/templates/widgets/interaction_list.inc
blob: 444d05e1ec6f5856e613ead71b8d78d7ef2a16af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
{% load bcfg2_tags %}
<div class='interaction_history_widget'>
  <table cellpadding="3">
  <tr id='table_list_header' class='listview'>
    <td class='left_column'>Timestamp</td>
    {% if not client %}
    <td class='right_column_wide'>Client</td>
    {% endif %}
    <td class='right_column' style='width:75px'>State</td>
    <td class='right_column_narrow'>Good</td>
    <td class='right_column_narrow'>Bad</td>
    <td class='right_column_narrow'>Modified</td>
    <td class='right_column_narrow'>Extra</td>
    <td class='right_column_wide'>Server</td>
  </tr>
  {% for entry in entry_list %}
  <tr class='{% cycle listview,listview_alt %}'>
    <td class='left_column'><a href='{% url reports_client_detail_pk hostname=entry.client.name, pk=entry.id %}' class="white-space: nowrap;">
      {{ entry.timestamp|date:"SHORT_DATETIME_FORMAT"|safe }}
    </a></td>
    {% if not client %}
    <td class='right_column_wide'><a href='{% add_url_filter hostname=entry.client.name %}'>{{ entry.client.name }}</a></td>
    {% endif %}
    <td class='right_column' style='width:75px'><a href='{% add_url_filter state=entry.state %}'
        class='{{entry|determine_client_state}}'>{{ entry.state }}</a></td>
    <td class='right_column_narrow'>{{ entry.good_count }}</td>
    <td class='right_column_narrow'>{{ entry.bad_count }}</td>
    <td class='right_column_narrow'>{{ entry.modified_count }}</td>
    <td class='right_column_narrow'>{{ entry.extra_count }}</td>
    <td class='right_column_wide'>
       {% if entry.server %}
         <a href='{% add_url_filter server=entry.server %}'>{{ entry.server }}</a>
       {% else %}
         &nbsp;
       {% endif %}
    </td>
  </tr>
  {% endfor %}
  </table>
</div>