blob: a5c9d7e5a5b5439116dbeb55b294f5e7867af805 (
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
|
{% extends 'layout.html' %}
{% block head %}
<script src="static/js/list.min.js"></script>
<script src="static/js/navigation.js"></script>
{% endblock %}
{% block content %}
<h1>Hostinfo</h1>
<div id="hostlist" class="row">
<div class="span12 searchbox">
<input type="search" class="search span4 pull-right" id="search"
placeholder="Search for Hostname or IP" />
</div>
<ul class="list span12">
{% for host in hosts|sort(attribute='hostname') %}
<li class="row thumbnail">
<div class="logo span1">
{% set os = host['os'] | get_os_name %}
{% if os is not none %}
<img src="static/img/{{host['os'] | get_os_name}}.png" alt="{{host['os']}}" />
{% else %}
<img src="static/img/unknown.png" alt="unknown os" />
{% endif %}
</div>
<div class="span10">
<h3 class="hostname">
<a href="{{host['url']}}">
{{host['hostname'] | replace(".spline.inf.fu-berlin.de","")}}
</a>
</h3>
<p>
{% if host['description'] is defined %}
{{host['description']}}
{% else %}
No description available.
{% endif %}
</p>
<ul class="ips inline">
{% for ip in host['addresses'] | select_with_attribute('vserver', False) | sort(attribute='address') %}
<li>{{ip['address']}}</li>
{% endfor %}
</ul>
</div>
</li>
{% endfor %}
</ul>
</div>
<script type='text/javascript'>
<!--
var options = {
valueNames: [ 'hostname', 'ips' ]
};
var featureList = new List('hostlist', options);
$('#search').change(function(){
featureList.search($('#search').val());
});
//-->
</script>
{% endblock %}
|