diff options
author | ficus <ficus@robocracy.org> | 2012-09-15 22:50:14 +0200 |
---|---|---|
committer | ficus <ficus@robocracy.org> | 2012-09-15 22:50:14 +0200 |
commit | ced83335a5a338cb9c24956b96da526465d94df8 (patch) | |
tree | b345cd21dfcbb9e660aceb2433c92bd50848938f /templates/lib.html | |
parent | 57a1e70dee45f5cd9493d6d23f8fc7b6435d5388 (diff) | |
download | tui-ced83335a5a338cb9c24956b96da526465d94df8.tar.gz tui-ced83335a5a338cb9c24956b96da526465d94df8.zip |
refactor to distributable format
Diffstat (limited to 'templates/lib.html')
-rw-r--r-- | templates/lib.html | 84 |
1 files changed, 0 insertions, 84 deletions
diff --git a/templates/lib.html b/templates/lib.html deleted file mode 100644 index 6ac5e12..0000000 --- a/templates/lib.html +++ /dev/null @@ -1,84 +0,0 @@ - - -{% macro ifstatus(ifstatus) -%} -{% if not ifstatus %} -<span class="text-error"> -Network hardware not detected at all! -</span> -{% else %} -<table class="table table-condensed {% if ifstatus.state in ["DOWN", "DISCONNECTED"] %}muted{% endif %}"> - <tr> - <th>Interface Name - <td><span style="font-family:monospace;">{{ ifstatus.ifname }}</span> - <tr> - <th>Status - <td><span style="font-weight: bold;" class="label - {% if ifstatus.state == 'RUNNING' %}label-success{% elif ifstatus.state == 'up' %}label-info{% else %}label-important{% endif %}"> - {{ ifstatus.state }} - </span> - <tr> - <th>MAC Address - <td><span style="font-family:monospace;">{{ ifstatus.mac }}</span> - <tr> - <th>IPv4 Addresses - <td><span style="font-family:monospace;"> - {% for addr in ifstatus.ipv4addrs %} - {{ addr.addr }}/{{ addr.prefix}} ({{ addr.scope }})<br> - {% endfor %}</span> - <tr> - <th>IPv6 Addresses - <td><span style="font-family:monospace;"> - {% for addr in ifstatus.ipv6addrs %} - {{ addr.addr }}/{{ addr.prefix}} ({{ addr.scope }})<br> - {% endfor %}</span> - {% if ifstatus.radio_state %} - <tr> - <th>Radio State - <td><span style="font-family:monospace;">{{ ifstatus.radio_state }}</span> - <tr> - <th>SSID - <td><span style="font-family:monospace;">{{ ifstatus.ssid }}</span> - <tr> - <th>Frequency - <td><span style="font-family:monospace;">{{ ifstatus.freq }}</span> - <tr> - <th>Signal Strength - <td><span style="font-family:monospace;">{{ ifstatus.signal_dbm }}</span> - {% endif %} -</table> -{% endif %} -{%- endmacro %} - - -{% macro logbox(name, contents) -%} -<h3>{{name}}</h3> -{% if contents == None %} -<span class="text-error">Access to {{name}} was denied, or file did not exist.</span> -{% else %} -<div style="height: 18em; width: 60em;"> -<pre style="height: 18em; width 60em; overflow: auto;"> -{{ contents }} -</pre> -</div> -{% endif%} -{%- endmacro %} - - -{% macro forminput(form, formerr, name, title, placeholder) -%} -<div class="control-group {% if formerr[name] %}error{% endif %}"> - <label class="control-label" for="{{name}}">{{ title }}</label> - <div class="controls"> - <input type="text" name="{{name}}" placeholder="{{placeholder}}" {% if form[name] %}value="{{ form[name] }}"{% endif %}> - {% if formerr[name] %} - <span class="help-inline">{{ formerr[name] }}</span> - {% endif %} - </div> -</div> -{%- endmacro %} - -{% macro formcheckbox(form, formerr, name, title, value) -%} - <label class="checkbox"> - <input type="checkbox" name="{{name}}" id="{{name}}" value="{{value}}" {% if form[name] == value %}checked{% endif %}> - <h4>{{title}}</h4> - </label> -{% endmacro %} |