diff options
-rw-r--r-- | templates/host.html | 9 | ||||
-rw-r--r-- | templates/index.html | 2 |
2 files changed, 8 insertions, 3 deletions
diff --git a/templates/host.html b/templates/host.html index f16e4d6..4eabea9 100644 --- a/templates/host.html +++ b/templates/host.html @@ -61,7 +61,9 @@ </dl> </div> + <div class="tab-pane row" id="interfaces"> + {% if addresses %} {% for group in addresses | select_with_attribute('vserver', False) | groupby('interface') %} <div class="span6"> <h3>{{ group.grouper }}</h3> @@ -76,6 +78,7 @@ {% else %} <p class="centering">no network interfaces</p> {% endfor %} + {% endif %} </div> <div class="tab-pane" id="ports"> @@ -89,6 +92,7 @@ </tr> </thead> <tbody> + {% set ports = ports or [] %} {% for port in ports %} <tr> <td>{{port['port']}}</td> @@ -103,8 +107,8 @@ </table> </div> - {% if services is defined %} <div class="tab-pane" id="services"> + {% if services is defined %} <table id="servicetable" class="table table-striped table-hover tablesorter"> <thead> <tr> @@ -141,9 +145,8 @@ {% endfor %} </tbody> </table> + {% endif %} </div> - {% endif %} - </div> <script> diff --git a/templates/index.html b/templates/index.html index a5c9d7e..36d83e4 100644 --- a/templates/index.html +++ b/templates/index.html @@ -43,9 +43,11 @@ </p> <ul class="ips inline"> + {% if host['addresses'] %} {% for ip in host['addresses'] | select_with_attribute('vserver', False) | sort(attribute='address') %} <li>{{ip['address']}}</li> {% endfor %} + {% endif %} </ul> </div> </li> |