aboutsummaryrefslogtreecommitdiffstats
path: root/templates/home.html
diff options
context:
space:
mode:
authorficus <ficus@robocracy.org>2012-09-15 19:46:49 +0200
committerficus <ficus@robocracy.org>2012-09-15 19:46:49 +0200
commit42725426ec02d359b67cd8d665afe17882d38958 (patch)
tree148c4082998f7d0b82ec4f22515d7626fca6a0e7 /templates/home.html
parenta304d7a56563b16ca98d9b45ebed521c52f6347c (diff)
downloadtui-42725426ec02d359b67cd8d665afe17882d38958.tar.gz
tui-42725426ec02d359b67cd8d665afe17882d38958.zip
more WIP
Diffstat (limited to 'templates/home.html')
-rw-r--r--templates/home.html96
1 files changed, 64 insertions, 32 deletions
diff --git a/templates/home.html b/templates/home.html
index 30c328e..fa2ed2b 100644
--- a/templates/home.html
+++ b/templates/home.html
@@ -1,39 +1,71 @@
{% import "lib.html" as lib %}
{% extends "base.html" %}
{% block body %}
-<h3>System</h3>
-<table class="table table-condensed">
- <tr>
- <th>Host Name
- <td><code>{{ status.system.hostname }}</code>
- <tr>
- <th>Current Time
- <td><code>{{ status.system.current_time }}</code>
- <tr>
- <th>System Uptime
- <td><code>{{ status.system.uptime }}</code>
-</table>
-<h3>WAN</h3>
-{% if not status.wan %}
-Upstream ethernet interface hardware not detected at all!
-{% else %}
-{{ lib.ifstatus(status.wan) }}
-{% endif %}
-
-<h3>LAN</h3>
-{% if not status.lan %}
-Local network ethernet interface hardware not detected at all!
-{% else %}
-{{ lib.ifstatus(status.lan) }}
-{% endif %}
-
-<h3>Wireless</h3>
-{% if not status.wireless %}
-Wireless interface hardware not detected at all!
-{% else %}
-{{ lib.ifstatus(status.wireless) }}
-{% endif %}
+<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"] %}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 %}">
+ {{ status.tor.state }}
+ </span>
+ </table>
+ </div>
+</div>
{% endblock %}