aboutsummaryrefslogtreecommitdiffstats
path: root/torouterui/templates
diff options
context:
space:
mode:
authorficus <ficus@robocracy.org>2012-09-25 11:46:08 +0200
committerficus <ficus@robocracy.org>2012-09-25 11:46:08 +0200
commitfe4b8a01fc87d1a76fca8e8733270a260aa23cc0 (patch)
tree54f0681925314972d25de0a68da398134123902c /torouterui/templates
parent49ec1f025b529c52eaee50af37ffc0b23a9f7124 (diff)
downloadtui-fe4b8a01fc87d1a76fca8e8733270a260aa23cc0.tar.gz
tui-fe4b8a01fc87d1a76fca8e8733270a260aa23cc0.zip
basic tor status using python-torctl
Diffstat (limited to 'torouterui/templates')
-rw-r--r--torouterui/templates/home.html16
1 files changed, 14 insertions, 2 deletions
diff --git a/torouterui/templates/home.html b/torouterui/templates/home.html
index fa2ed2b..58ed2f2 100644
--- a/torouterui/templates/home.html
+++ b/torouterui/templates/home.html
@@ -57,13 +57,25 @@
</div>
<div class="span6">
<h3>Tor</h3>
- <table class="table table-condensed {% if status.tor.state in ["DISABLED"] %}muted{% endif %}">
+ <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 == 'RUNNING' %}label-success{% elif status.tor.state == 'STARTING' %}label-info{% else %}label-important{% endif %}">
+ {% 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>