summaryrefslogtreecommitdiffstats
path: root/templates/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'templates/index.html')
-rw-r--r--templates/index.html51
1 files changed, 39 insertions, 12 deletions
diff --git a/templates/index.html b/templates/index.html
index ebc2408..9681fad 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -3,19 +3,46 @@
{% block content %}
<h1>Hostinfo</h1>
-<div id="hostlist">
- <div class="row searchbox">
- <span class="span4 offset4">
- <input type="search" class="search span4" placeholder="Search" />
- </spam>
+<div id="hostlist" class="row">
+ <div class="span12 searchbox">
+ <input type="search" class="search span4 pull-right"
+ placeholder="Search for Hostname or IP" />
</div>
- <ul class="row list">
- {% for host in hosts %}
- <li class="span2">
- <a href={{host['url']}} class="thumbnail hostname">
- {{host['hostname'] | replace(".spline.inf.fu-berlin.de","")}}
- </a>
+ <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">
+ {% for ip in host['addresses'] | sort(attribute='address') %}
+ <li>{{ip['address']}}</li>
+ {% endfor %}
+ </ul>
+ </div>
</li>
{% endfor %}
</ul>
@@ -24,7 +51,7 @@
<script type='text/javascript'>
<!--
var options = {
- valueNames: [ 'hostname' ]
+ valueNames: [ 'hostname', 'ips' ]
};
var featureList = new List('hostlist', options);