summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorNico von Geyso <Nico.Geyso@FU-Berlin.de>2013-05-23 15:06:32 +0200
committerNico von Geyso <Nico.Geyso@FU-Berlin.de>2013-05-23 15:06:32 +0200
commitab825994f13821891559a749f0b9d4c46a4fb1f6 (patch)
treebc986eeeb1ff7097d4ffd21c40ad07a2f1826033 /templates
parent089900ba33f49ab9113a096b1853837999d56152 (diff)
downloadwww-ab825994f13821891559a749f0b9d4c46a4fb1f6.tar.gz
www-ab825994f13821891559a749f0b9d4c46a4fb1f6.tar.bz2
www-ab825994f13821891559a749f0b9d4c46a4fb1f6.zip
Refactored: index page
Diffstat (limited to 'templates')
-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);