aboutsummaryrefslogtreecommitdiffstats
path: root/torouterui/templates/home.html
blob: 58ed2f2147784f206553d7b0a97bede2fb4894da (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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
{% import "lib.html" as lib %}
{% extends "base.html" %}
{% block body %}


<div class="row-fluid">
 <div class="span6">
    <h3>System</h3>
    <table class="table table-condensed">
    <tr>
    <th>Host Name
    <td><span style="font-family:monospace;">{{ status.system.hostname }}</span>
    <tr>
    <th>Current Time
    <td><span style="font-family:monospace;">{{ status.system.current_time }}</span>
    <tr>
    <th>System Uptime
    <td><span style="font-family:monospace;">{{ status.system.uptime }}</span>
    </table>
 </div>
 <div class="span6">
    <h3>Resources</h3>
	<ul class="unstyled">
	    <li>
	        CPU Load<span class="pull-right strong">{{status.resources.cpu_load}} / {{status.resources.cpu_cores}} cores</span>
	        <div class="progress progress-striped ">
	            <div class="bar" style="width: {{status.resources.cpu_percent}}%;"></div>
	        </div>
	    </li>
	    <li>RAM Usage<span class="pull-right strong">{{status.resources.ram_used}} / {{status.resources.ram_avail}}</span>
	        <div class="progress progress-success progress-striped ">
	            <div class="bar" style="width: {{ status.resources.ram_percent }}%;"></div>
	        </div>
	    </li>
	    <li>Primary Disk Space<span class="pull-right strong">{{status.resources.disk_used}} / {{status.resources.disk_avail}}</span>
	        <div class="progress progress-warning progress-striped ">
	            <div class="bar" style="width: {{ status.resources.disk_percent }}%;"></div>
	        </div>
	    </li>
	</ul>
 </div>
</div>
<div class="row-fluid">
 <div class="span6">
    <h3>WAN</h3>
    {{ lib.ifstatus(status.wan) }}
 </div>
 <div class="span6">
    <h3>LAN</h3>
    {{ lib.ifstatus(status.lan) }}
 </div>
</div>
<div class="row-fluid">
 <div class="span6">
    <h3>WiFi</h3>
    {{ lib.ifstatus(status.wifi) }}
 </div>
 <div class="span6">
    <h3>Tor</h3>
    <table class="table table-condensed {% if status.tor.state in ["DISABLED", "PERMISSION_DENIED"] %}muted{% endif %}">
    <tr>
    <th>Status
    <td><span style="font-weight: bold;" class="label
      {% if status.tor.state == 'ESTABLISHED' %}label-success{% elif status.tor.state == 'CONNECTING' %}label-info{% else %}label-important{% endif %}">
      {{ status.tor.state }}
      </span>
    <tr>
    <th>Circuit Established?
    <td style="font-family: monospace;">{{ status.tor.circuit_established }}
    <tr>
    <th>Version
    <td style="font-family: monospace;">{% if status.tor.version %}{{ status.tor.version }} ({{ status.tor.version_current }}){% endif %}
    <tr>
    <th>Traffic TX
    <td style="font-family: monospace;">{% if status.tor.traffic_written_bytes %}{{ status.tor.traffic_written_bytes }} bytes{% endif %}
    <tr>
    <th>Traffic RX
    <td style="font-family: monospace;">{% if status.tor.traffic_read_bytes %}{{ status.tor.traffic_read_bytes }} bytes{% endif %}
    </table>
 </div>
</div>

{% endblock %}