blob: 9b86b609f67700a405ca53541a1d259c29d560b1 (
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
|
{% extends "base.html" %}
{% load bcfg2_tags %}
{% block title %}Bcfg2 - Client {{client.name}}{% endblock %}
{% block extra_header_info %}
<style type="text/css">
.node_data {
border: 1px solid #98DBCC;
margin: 10px;
padding-left: 18px;
}
.node_data td {
padding: 1px 20px 1px 2px;
}
span.history_links {
font-size: 90%;
margin-left: 50px;
}
span.history_links a {
font-size: 90%;
}
</style>
{% endblock %}
{% block body_onload %}javascript:clientdetailload(){% endblock %}
{% block pagebanner %}Client Details{% endblock %}
{% block content %}
<div class='detail_header'>
<h2>{{client.name}}</h2>
<a href='{% url reports_client_manage %}#{{ client.name }}'>[manage]</a>
<span class='history_links'><a href="{% url reports_client_history client.name %}">View History</a> | Jump to
<select id="quick" name="quick" onchange="javascript:pageJump('quick');">
<option value="" selected="selected">--- Time ---</option>
{% for i in client.interactions.all|slice:":25" %}
<option value="{% url reports_client_detail_pk hostname=client.name, pk=i.id %}">{{i.timestamp}}</option>
{% endfor %}
</select></span>
</div>
{% if interaction.isstale %}
<div class="warningbox">
This node did not run within the last 24 hours — it may be out of date.
</div>
{% endif %}
<table class='node_data'>
<tr><td>Timestamp</td><td>{{interaction.timestamp}}</td></tr>
{% if interaction.server %}
<tr><td>Served by</td><td>{{interaction.server}}</td></tr>
{% endif %}
{% if interaction.metadata %}
<tr><td>Profile</td><td>{{interaction.metadata.profile}}</td></tr>
{% endif %}
{% if interaction.repo_rev_code %}
<tr><td>Revision</td><td>{{interaction.repo_rev_code}}</td></tr>
{% endif %}
<tr><td>State</td><td class='{{interaction.state}}-lineitem'>{{interaction.state|capfirst}}</td></tr>
<tr><td>Managed entries</td><td>{{interaction.totalcount}}</td></tr>
{% if not interaction.isclean %}
<tr><td>Deviation</td><td>{{interaction.percentbad|floatformat:"3"}}%</td></tr>
{% endif %}
</table>
{% if interaction.metadata.groups.count %}
<div class='entry_list'>
<div class='entry_list_head' onclick='javascript:toggleMe("groups_table");'>
<h3>Group membership</h3>
<div class='entry_expand_tab' id='plusminus_groups_table'>[+]</div>
</div>
<table id='groups_table' class='entry_list' style='display: none'>
{% for group in interaction.metadata.groups.all %}
<tr class='{% cycle listview,listview_alt %}'>
<td class='entry_list_type'>{{group}}</td>
</tr>
{% endfor %}
</table>
</div>
{% endif %}
{% if interaction.metadata.bundles.count %}
<div class='entry_list'>
<div class='entry_list_head' onclick='javascript:toggleMe("bundles_table");'>
<h3>Bundle membership</h3>
<div class='entry_expand_tab' id='plusminus_bundless_table'>[+]</div>
</div>
<table id='bundles_table' class='entry_list' style='display: none'>
{% for bundle in interaction.metadata.bundles.all %}
<tr class='{% cycle listview,listview_alt %}'>
<td class='entry_list_type'>{{bundle}}</td>
</tr>
{% endfor %}
</table>
</div>
{% endif %}
{% for type, ei_list in ei_lists %}
{% if ei_list %}
<div class='entry_list'>
<div class='entry_list_head {{type}}-lineitem' onclick='javascript:toggleMe("{{type}}_table");'>
<h3>{{ type|capfirst }} Entries — {{ ei_list|length }}</h3>
<div class='entry_expand_tab' id='plusminus_{{type}}_table'>[+]</div>
</div>
<table id='{{type}}_table' class='entry_list'>
{% for ei in ei_list %}
<tr class='{% cycle listview,listview_alt %}'>
<td class='entry_list_type'>{{ei.entry.kind}}</td>
<td><a href="{% url reports_item type ei.id %}">
{{ei.entry.name}}</a></td>
</tr>
{% endfor %}
</table>
</div>
{% endif %}
{% endfor %}
{% if entry_list %}
<div class="entry_list recent_history_wrapper">
<div class="entry_list_head" style="border-bottom: 2px solid #98DBCC;">
<h4 style="display: inline"><a href="{% url reports_client_history client.name %}">Recent Interactions</a></h4>
</div>
<div class='recent_history_box'>
{% include "widgets/interaction_list.inc" %}
<div style='padding-left: 5px'><a href="{% url reports_client_history client.name %}">more...</a></div>
</div>
</div>
{% endif %}
{% endblock %}
|