diff options
Diffstat (limited to 'templates/host.html')
-rw-r--r-- | templates/host.html | 143 |
1 files changed, 60 insertions, 83 deletions
diff --git a/templates/host.html b/templates/host.html index feed11b..eac2066 100644 --- a/templates/host.html +++ b/templates/host.html @@ -1,90 +1,67 @@ -<!DOCTYPE html> -<html> - <head> - <meta charset=utf-8 /> - <title>Hostinfo: Overview</title> +{% extends 'layout.html' %} - <meta name="viewport" content="width=device-width, initial-scale=1.0"> - <link rel="stylesheet" type="text/css" media="screen" href="css/bootstrap.min.css" /> - <link rel="stylesheet" type="text/css" media="screen" href="css/bootstrap-responsive.min.css" /> - <link rel="stylesheet" type="text/css" media="screen" href="css/custom.css" /> +{% block title %}{{hostname}}{% endblock %} - <script src="js/jquery-2.0.0.min.js"></script> - <script src="js/bootstrap.min.js"></script> +{% block content %} +<h1>{{hostname}}</h1> - </head> +<ul class="nav nav-tabs"> + <li class="active"><a href="#info" data-toggle="tab">Info</a></li> + <li><a href="#ports" data-toggle="tab">Ports</a></li> + <li><a href="#interfaces" data-toggle="tab">Interfaces</a></li> + <li class="pull-right"><a id="index" href="index.html">back to index</a></li> +</ul> - <body> - <div class="container"> - <div class="row"> +<div class="tab-content"> + <div class="tab-pane active" id="info"> + <dl class="dl-horizontal"> + <dt>hostname</dt><dd>{{hostname}}</dd> + <dt>os</dt><dd>{{os}}</dd> + <dt>arch</dt><dd>{{arch}}</dd> + <dt>vserver</dt><dd>{{vserver}}</dd> + {% if vserver_host is defined %} + <dt>vserver_host</dt><dd>{{vserver_host}}</dd> + {% endif %} + </dl> + </div> - <div class="span12" id="content"> - - <h1>{{hostname}}</h1> - - <ul class="nav nav-tabs"> - <li class="active"><a href="#info" data-toggle="tab">Info</a></li> - <li><a href="#ports" data-toggle="tab">Ports</a></li> - <li><a href="#interfaces" data-toggle="tab">Interfaces</a></li> - <li class="pull-right"><a id="index" href="index.html">back to index</a></li> - </ul> - - <div class="tab-content"> - <div class="tab-pane active" id="info"> - <dl class="dl-horizontal"> - <dt>hostname</dt><dd>{{hostname}}</dd> - <dt>os</dt><dd>{{os}}</dd> - <dt>arch</dt><dd>{{arch}}</dd> - <dt>vserver</dt><dd>{{vserver}}</dd> - {% if vserver_host is defined %} - <dt>vserver_host</dt><dd>{{vserver_host}}</dd> - {% endif %} - </dl> - </div> - - <div class="tab-pane row" id="interfaces"> - {% for group in addresses | groupby('interface') %} - <div class="span6"> - <h3>{{ group.grouper }}</h3> - <ul> - {% for address in group.list %} - <li>{{address['address']}} /{{address['netmask']}}</li> - {% else %} - <li>no address</li> - {% endfor %} - </ul> - </div> - {% else %} - <p class="centering">no network interfaces</p> - {% endfor %} - </div> - - <div class="tab-pane" id="ports"> - <table class="table table-stripped table-hover"> - <thead> - <tr> - <th>Port</th><th>IP</th><th>Process</th><th>Protocol</th> - </tr> - </thead> - <tbody> - {% for port in ports %} - <tr> - <td>{{port['port']}}</td> - <td>{{port['ip']}}</td> - <td>{{port['process']}}</td> - <td>{{port['proto']}}</td> - </tr> - {% else%} - <tr><td class="centering" colspan="4">no ports open</td></tr> - {% endfor %} - </tbody> - </table> - </div> - </div> - - </div> - </div> + <div class="tab-pane row" id="interfaces"> + {% for group in addresses | groupby('interface') %} + <div class="span6"> + <h3>{{ group.grouper }}</h3> + <ul> + {% for address in group.list %} + <li>{{address['address']}} /{{address['netmask']}}</li> + {% else %} + <li>no address</li> + {% endfor %} + </ul> </div> + {% else %} + <p class="centering">no network interfaces</p> + {% endfor %} + </div> - </body> -</html> + <div class="tab-pane" id="ports"> + <table class="table table-stripped table-hover"> + <thead> + <tr> + <th>Port</th><th>IP</th><th>Process</th><th>Protocol</th> + </tr> + </thead> + <tbody> + {% for port in ports %} + <tr> + <td>{{port['port']}}</td> + <td>{{port['ip']}}</td> + <td>{{port['process']}}</td> + <td>{{port['proto']}}</td> + </tr> + {% else%} + <tr><td class="centering" colspan="4">no ports open</td></tr> + {% endfor %} + </tbody> + </table> + </div> +</div> +{% endblock %} |