summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2013-05-28 20:17:24 +0200
committerAlexander Sulfrian <alexander@sulfrian.net>2013-05-28 20:23:16 +0200
commit004023d829e773fc5e7221238034c2de27735896 (patch)
tree3c87987b7332d73f22ccabe93e8b9820e6d5e7ae
parent2bcb65e290d3c75620400b5a7c7c61f19dd4f46f (diff)
downloadwww-004023d829e773fc5e7221238034c2de27735896.tar.gz
www-004023d829e773fc5e7221238034c2de27735896.tar.bz2
www-004023d829e773fc5e7221238034c2de27735896.zip
host: do not display empty entries
-rw-r--r--templates/host.html8
-rw-r--r--templates/index.html2
2 files changed, 6 insertions, 4 deletions
diff --git a/templates/host.html b/templates/host.html
index 6bb66fe..5913913 100644
--- a/templates/host.html
+++ b/templates/host.html
@@ -25,10 +25,12 @@
<dl class="dl-horizontal">
<dt>hostname</dt><dd>{{hostname}}</dd>
- <dt>os</dt><dd>{{os}}</dd>
- <dt>arch</dt><dd>{{arch}}</dd>
+ <dt>os</dt><dd>{{os|default('unknown')}}</dd>
+ <dt>arch</dt><dd>{{arch|default('unknonw')}}</dd>
+ {% if vserver %}
<dt>vserver</dt><dd>{{vserver}}</dd>
- {% if vserver_host is defined %}
+ {% endif %}
+ {% if vserver_host %}
<dt>vserver_host</dt><dd>{{vserver_host}}</dd>
{% endif %}
{% if maintainers is defined %}
diff --git a/templates/index.html b/templates/index.html
index 043136e..b0a5e98 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -37,7 +37,7 @@
{% endif %}
</p>
- <ul class="ips">
+ <ul class="ips inline">
{% for ip in host['addresses'] | select_with_attribute('vserver', False) | sort(attribute='address') %}
<li>{{ip['address']}}</li>
{% endfor %}