summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Reporting/templates/displays/summary.html
blob: a9082aeee7d2175492451963d8aead83a3e56df7 (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
41
42
43
{% extends "base-timeview.html" %}
{% load bcfg2_tags %}
{% load url from bcfg2_compat %}

{% block title %}Bcfg2 - Client Summary{% endblock %}
{% block pagebanner %}Clients - Summary{% endblock %}

{% block body_onload %}javascript:hide_table_array(hide_tables){% endblock %}

{% block extra_header_info %}
<script type="text/javascript">
var hide_tables = new Array({{ summary_data|length }});
{% for summary in summary_data %}
hide_tables[{{ forloop.counter0 }}] = "table_{{ summary.name }}";
{% endfor %}
</script>
{% endblock%}

{% block content %}
  <div class='detail_header'>
    <h2>{{ node_count }} nodes reporting in</h2>
  </div>
{% if summary_data %}
  {% for summary in summary_data  %}
    <div class='entry_list'>
      <div class='entry_list_head element_list_head' onclick='javascript:toggleMe("table_{{ summary.name }}");'>
        <h3>{{ summary.nodes|length }} {{ summary.label }}</h3>
        <div class='entry_expand_tab' id='plusminus_table_{{ summary.name }}'>[+]</div>
      </div>

      <table id='table_{{ summary.name }}' class='entry_list'>
        {% for node in summary.nodes|sort_interactions_by_name %}
          <tr class='{% cycle 'listview' 'listview_alt' %}'>
              <td><a href='{% url "reports_client_detail_pk" hostname=node.client.name pk=node.id %}'>{{ node.client.name }}</a></td>
          </tr>
        {% endfor %}
      </table>
    </div>
  {% endfor %}
{% else %}
    <p>No data to report on</p>
{% endif %}
{% endblock %}