summaryrefslogtreecommitdiffstats
path: root/templates/host.html
blob: 074867d48dfe548d9194df382022f9fc8b822723 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
{% extends 'layout.html' %}

{% block title %}{{hostname}}{% endblock %}

{% block content %}
<h1>{{hostname|replace('.spline.inf.fu-berlin.de', '')}}</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>
{% endblock %}