summaryrefslogtreecommitdiffhomepage
path: root/modules/admin-core/luasrc/view
diff options
context:
space:
mode:
authorSteven Barth <steven@midlink.org>2008-06-02 20:16:05 +0000
committerSteven Barth <steven@midlink.org>2008-06-02 20:16:05 +0000
commit561b0cfaa3fb8163d9ec74a3f96fd5b22ad54f33 (patch)
tree8b4b1765c70bae824bbad3006021cf7a4a775a34 /modules/admin-core/luasrc/view
parent953510ccac9b9c6b3c1d8634897c0dddc92913e4 (diff)
* Moved Freifunk status pages to admin-core and linked them in Freifunk
* luci/web: Added assign() to dispatcher to reference foreign nodes in the dispatching tree
Diffstat (limited to 'modules/admin-core/luasrc/view')
-rw-r--r--modules/admin-core/luasrc/view/admin_status/iwscan.htm38
-rw-r--r--modules/admin-core/luasrc/view/admin_status/routes.htm28
-rw-r--r--modules/admin-core/luasrc/view/status-olsr/error_olsr.htm6
-rw-r--r--modules/admin-core/luasrc/view/status-olsr/hna.htm17
-rw-r--r--modules/admin-core/luasrc/view/status-olsr/index.htm43
-rw-r--r--modules/admin-core/luasrc/view/status-olsr/mid.htm17
-rw-r--r--modules/admin-core/luasrc/view/status-olsr/routes.htm36
-rw-r--r--modules/admin-core/luasrc/view/status-olsr/topology.htm23
8 files changed, 208 insertions, 0 deletions
diff --git a/modules/admin-core/luasrc/view/admin_status/iwscan.htm b/modules/admin-core/luasrc/view/admin_status/iwscan.htm
new file mode 100644
index 0000000000..adba2d23e7
--- /dev/null
+++ b/modules/admin-core/luasrc/view/admin_status/iwscan.htm
@@ -0,0 +1,38 @@
+<%+header%>
+<h1><%:iwscan WLAN-Scan%></h1>
+<p><%:iwscan1 Drahtlosnetzwerke in der lokalen Umgebung des Routers:%></p>
+
+<br />
+<table cellspacing="0" cellpadding="6" class="smalltext">
+<tr>
+<th><%:interface Schnittstelle%></th>
+<th><%:essid ESSID%></th>
+<th><%:bssid BSSID%></th>
+<th><%:mode Modus%></th>
+<th><%:channel Kanal%></th>
+<th><%:encr Vers.%></th>
+<th><%:link Verb.%></th>
+<th><%:signal Signal%></th>
+<th><%:noise Rausch%></th>
+</tr>
+<%for iface, cells in pairs(luci.sys.wifi.iwscan()) do
+ for i, cell in ipairs(cells) do
+%>
+<tr>
+<td><%=iface%></td>
+<td><%=cell.ESSID%></td>
+<td><%=cell.Address%></td>
+<td><%=cell.Mode%></td>
+<td><%=(cell.Channel or cell.Frequency or "")%></td>
+<td><%=cell["Encryption key"]%></td>
+<td><%=cell.Quality%></td>
+<td><%=cell["Signal level"]%></td>
+<td><%=cell["Noise level"]%></td>
+</tr>
+<%
+ end
+end
+%>
+</table>
+<br />
+<%+footer%> \ No newline at end of file
diff --git a/modules/admin-core/luasrc/view/admin_status/routes.htm b/modules/admin-core/luasrc/view/admin_status/routes.htm
new file mode 100644
index 0000000000..382b8290f2
--- /dev/null
+++ b/modules/admin-core/luasrc/view/admin_status/routes.htm
@@ -0,0 +1,28 @@
+<%+header%>
+<h1><%:routes Routen%></h1>
+
+<br />
+<table cellspacing="0" cellpadding="6" class="smalltext">
+<tr>
+<th><%:target Ziel%></th>
+<th><%:netmask Netzmaske%></th>
+<th><%:gateway Gateway%></th>
+<th><%:metric Metrik%></th>
+<th><%:iface Schnittstelle%></th>
+</tr>
+<%
+local routes = luci.sys.net.routes()
+
+for i, r in pairs(routes) do
+%>
+<tr>
+<td><%=luci.sys.net.hexip4(r.Destination)%></td>
+<td><%=luci.sys.net.hexip4(r.Mask)%></td>
+<td><%=luci.sys.net.hexip4(r.Gateway)%></td>
+<td><%=r.Metric%></td>
+<td><%=r.Iface%></td>
+</tr>
+<% end %>
+</table>
+<br />
+<%+footer%> \ No newline at end of file
diff --git a/modules/admin-core/luasrc/view/status-olsr/error_olsr.htm b/modules/admin-core/luasrc/view/status-olsr/error_olsr.htm
new file mode 100644
index 0000000000..25426f50d7
--- /dev/null
+++ b/modules/admin-core/luasrc/view/status-olsr/error_olsr.htm
@@ -0,0 +1,6 @@
+<%+header%>
+<h1><%:olsr OLSR%></h1>
+<p class="error"><%:olsrerror1 Es konnte keine Verbindung zum OLSR-Daemon hergestellt werden!%></p>
+<p><%:olsrerror2 Um die Statusinformationen abfragen zu können muss der OLSR-Daemon gestartet
+und das Plugin "txtinfo" geladen sein.%></p>
+<%+footer%> \ No newline at end of file
diff --git a/modules/admin-core/luasrc/view/status-olsr/hna.htm b/modules/admin-core/luasrc/view/status-olsr/hna.htm
new file mode 100644
index 0000000000..c13369f426
--- /dev/null
+++ b/modules/admin-core/luasrc/view/status-olsr/hna.htm
@@ -0,0 +1,17 @@
+<%+header%>
+<h1><%:olsrhna OLSR-HNA%></h1>
+<br />
+<table cellspacing="0" cellpadding="6">
+<tr>
+<th><%:destination Ziel%></th>
+<th><%:gateway Gateway%></th>
+</tr>
+<% for k, route in ipairs(routes) do %>
+<tr>
+<td><%=route.Network%>/<%=route.Netmask%></td>
+<td><a href="http://<%=route.Gateway%>"><%=route.Gateway%></a></td>
+</tr>
+<% end %>
+</table>
+<br />
+<%+footer%> \ No newline at end of file
diff --git a/modules/admin-core/luasrc/view/status-olsr/index.htm b/modules/admin-core/luasrc/view/status-olsr/index.htm
new file mode 100644
index 0000000000..0633d1f456
--- /dev/null
+++ b/modules/admin-core/luasrc/view/status-olsr/index.htm
@@ -0,0 +1,43 @@
+<%+header%>
+<h1><%:olsrlinks OLSR-Verbindungen%></h1>
+<p><%:olsrlinks1 Übersicht über aktuell bestehende OLSR-Verbindungen%></p>
+<br />
+<table cellspacing="0" cellpadding="6">
+<tr>
+<th><%:destination Ziel%></th>
+<th><%:local Lokal%></th>
+<th>LQ</th>
+<th>NLQ</th>
+<th>ETX</th>
+</tr>
+<% for k, link in ipairs(links) do
+ local color = "#bb3333"
+
+ link.ETX = tonumber(link.ETX)
+ if link.ETX == 0 then
+ color = "#bb3333"
+ elseif link.ETX < 4 then
+ color = "#00cc00"
+ elseif link.ETX < 10 then
+ color = "#ffcb05"
+ elseif link.ETX < 100 then
+ color = "#ff6600"
+ end
+%>
+<tr>
+<td><a href="http://<%=link["remote IP"]%>"><%=link["remote IP"]%></a></td>
+<td><%=link["Local IP"]%></td>
+<td><%=link.LinkQuality%></td>
+<td><%=link.NLQ%></td>
+<td style="background-color:<%=color%>"><%=link.ETX%></td>
+</tr>
+<% end %>
+</table>
+<br />
+<h3><%:legend Legende%>:</h3>
+<ul>
+<li><strong>LQ: </strong><%:lq1 Erfolgsquote gesendeter Pakete%></li>
+<li><strong>NLQ: </strong><%:nlq1 Erfolgsquote empfangener Pakete%></li>
+<li><strong>ETX: </strong><%:etx1 Zu erwartende Sendeversuche pro Paket%></li>
+</ul>
+<%+footer%> \ No newline at end of file
diff --git a/modules/admin-core/luasrc/view/status-olsr/mid.htm b/modules/admin-core/luasrc/view/status-olsr/mid.htm
new file mode 100644
index 0000000000..6553237ea5
--- /dev/null
+++ b/modules/admin-core/luasrc/view/status-olsr/mid.htm
@@ -0,0 +1,17 @@
+<%+header%>
+<h1><%:olsrmid OLSR-MID%></h1>
+<br />
+<table cellspacing="0" cellpadding="6">
+<tr>
+<th><%:node Knoten%></th>
+<th><%:aliases Aliasse%></th>
+</tr>
+<% for k, mid in ipairs(mids) do %>
+<tr>
+<td><a href="http://<%=mid.IP%>"><%=mid.IP%></a></td>
+<td><%=mid.Aliases%></td>
+</tr>
+<% end %>
+</table>
+<br />
+<%+footer%> \ No newline at end of file
diff --git a/modules/admin-core/luasrc/view/status-olsr/routes.htm b/modules/admin-core/luasrc/view/status-olsr/routes.htm
new file mode 100644
index 0000000000..f3a0fd3366
--- /dev/null
+++ b/modules/admin-core/luasrc/view/status-olsr/routes.htm
@@ -0,0 +1,36 @@
+<%+header%>
+<h1><%:olsrlinks OLSR-Routen%></h1>
+<br />
+<table cellspacing="0" cellpadding="6">
+<tr>
+<th><%:destination Ziel%></th>
+<th><%:gateway Gateway%></th>
+<th><%:interface Schnittstelle%></th>
+<th><%:metric Metrik%></th>
+<th>ETX</th>
+</tr>
+<% for k, route in ipairs(routes) do
+ local color = "#bb3333"
+
+ route.ETX = tonumber(route.ETX)
+ if route.ETX == 0 then
+ color = "#bb3333"
+ elseif route.ETX < 4 then
+ color = "#00cc00"
+ elseif route.ETX < 10 then
+ color = "#ffcb05"
+ elseif route.ETX < 100 then
+ color = "#ff6600"
+ end
+%>
+<tr>
+<td><%=route.Destination%></td>
+<td><%=route.Gateway%></td>
+<td><%=route.Interface%></td>
+<td><%=route.Metric%></td>
+<td style="background-color:<%=color%>"><%=route.ETX%></td>
+</tr>
+<% end %>
+</table>
+<br />
+<%+footer%> \ No newline at end of file
diff --git a/modules/admin-core/luasrc/view/status-olsr/topology.htm b/modules/admin-core/luasrc/view/status-olsr/topology.htm
new file mode 100644
index 0000000000..c622026d48
--- /dev/null
+++ b/modules/admin-core/luasrc/view/status-olsr/topology.htm
@@ -0,0 +1,23 @@
+<%+header%>
+<h1><%:olsrtopo OLSR-Topologie%></h1>
+<br />
+<table cellspacing="0" cellpadding="6">
+<tr>
+<th><%:destination Ziel%></th>
+<th><%:lasthop Letzter Router%></th>
+<th>LQ</th>
+<th>ILQ</th>
+<th>ETX</th>
+</tr>
+<% for k, route in ipairs(routes) do %>
+<tr>
+<td><a href="http://<%=route["Destination IP"]%>"><%=route["Destination IP"]%></a></td>
+<td><a href="http://<%=route["Last hop IP"]%>"><%=route["Last hop IP"]%></a></td>
+<td><%=route.LQ%></td>
+<td><%=route.ILQ%></td>
+<td><%=route.ETX%></td>
+</tr>
+<% end %>
+</table>
+<br />
+<%+footer%> \ No newline at end of file