summaryrefslogtreecommitdiffhomepage
path: root/modules/niu/luasrc/view
diff options
context:
space:
mode:
Diffstat (limited to 'modules/niu/luasrc/view')
-rw-r--r--modules/niu/luasrc/view/niu/dashboard.htm39
-rw-r--r--modules/niu/luasrc/view/niu/network.htm75
-rw-r--r--modules/niu/luasrc/view/niu/network/rtable.htm112
-rw-r--r--modules/niu/luasrc/view/niu/network/warn_ip_change.htm11
-rw-r--r--modules/niu/luasrc/view/niu/network/wlanwanscan.htm7
-rw-r--r--modules/niu/luasrc/view/niu/null.htm1
-rw-r--r--modules/niu/luasrc/view/niu/system.htm72
-rw-r--r--modules/niu/luasrc/view/niu/system/backup.htm41
-rw-r--r--modules/niu/luasrc/view/niu/system/reboot.htm14
-rw-r--r--modules/niu/luasrc/view/niu/system/upgrade.htm105
-rw-r--r--modules/niu/luasrc/view/niu/traffic.htm58
-rw-r--r--modules/niu/luasrc/view/niu/traffic/conntrack.htm75
12 files changed, 0 insertions, 610 deletions
diff --git a/modules/niu/luasrc/view/niu/dashboard.htm b/modules/niu/luasrc/view/niu/dashboard.htm
deleted file mode 100644
index 7c387edd27..0000000000
--- a/modules/niu/luasrc/view/niu/dashboard.htm
+++ /dev/null
@@ -1,39 +0,0 @@
-<%
-local dsp = require "luci.dispatcher"
-local utl = require "luci.util"
-
-include("header")
-
-local function cmp(a, b)
- return (nodes[a].order or 100) < (nodes[b].order or 100)
-end
-for k, v in utl.spairs(nodes, cmp) do
- if v.niu_dbtemplate or v.niu_dbtasks then
- %>
- <fieldset class="dbbox">
- <h2<% if v.niu_dbicon then %> style="background-image: url(<%=resource%>/<%=v.niu_dbicon%>)"<% end %>><%=v.title%></h2>
- <% if v.niu_dbtemplate then tpl.render(v.niu_dbtemplate) end %>
- <% if v.niu_dbtasks then %>
- <h4>Tasks:</h4>
- <ul>
- <%
- local nodes = dsp.node("niu", k).nodes
- local function cmp(a, b)
- return (nodes[a].order or 100) < (nodes[b].order or 100)
- end
- for k2, v2 in utl.spairs(nodes, cmp) do
- %>
- <li><a href="<%=dsp.build_url("niu", k, k2)%>"><%=v2.title%></a></li>
- <%
- end
- %>
- </ul>
- <% end %>
- </fieldset>
- <%
- end
-end
-
-%>
-
-<%+footer%> \ No newline at end of file
diff --git a/modules/niu/luasrc/view/niu/network.htm b/modules/niu/luasrc/view/niu/network.htm
deleted file mode 100644
index 5f48317dc0..0000000000
--- a/modules/niu/luasrc/view/niu/network.htm
+++ /dev/null
@@ -1,75 +0,0 @@
-<%
-local uci = require "luci.model.uci"
-local fs = require "nixio.fs"
-
-local nws = {}
-uci.inst_state:foreach("network", "interface", function(s)
- nws[#nws+1] = s
-end)
-
-if uci.inst_state:get("network", "lan", "_ipchanged") and
-uci.inst_state:revert("network", "lan", "_ipchanged") then
- include("niu/network/warn_ip_change")
-end
-
-local wanon = uci.inst_state:get("network", "wan", "proto")
-local wanup = uci.inst_state:get("network", "wan", "up")
-local wanip = uci.inst_state:get("network", "wan", "ipaddr")
-
-local leasefn
-uci.inst:foreach("dhcp", "dnsmasq",
- function(section)
- leasefn = section.leasefile
- end
-)
-
-if leasefn then
- local ln = fs.access(leasefn, "r") and io.lines(leasefn)
- leasefn = 0
- while ln and ln() do
- leasefn = leasefn + 1
- end
-end
-
-local arps
-if fs.access("/proc/net/arp", "r") then
- local ln = io.lines("/proc/net/arp")
- arps = -1
- while ln and ln() do
- arps = arps + 1
- end
- arps = arps >= 0 and arps
-end
-%>
-
-<table class="dbstattbl">
-<% if wanon and wanon ~= "none" then %>
-<tr>
-<% if wanup then %>
-<th>Uplink Address:</th>
-<td><%=wanip%></td>
-<% else %>
-<th>Uplink:</th>
-<td><span style="color: darkred"><em>offline</em></span>
-</td>
-<% end %>
-
-</tr>
-<% end %>
-
-<tr>
-<th>Local Address:</th><td>
-<%=uci.inst_state:get("network", "lan", "ipaddr")%>
-</td>
-</tr>
-
-<% if arps then %>
-<tr>
-<th>Active IP-Devices:</th><td><%=arps%><% if leasefn then %>
-(<%=leasefn%> assigned)
-<% end %></td>
-</tr>
-<% end %>
-
-</table>
-<br /> \ No newline at end of file
diff --git a/modules/niu/luasrc/view/niu/network/rtable.htm b/modules/niu/luasrc/view/niu/network/rtable.htm
deleted file mode 100644
index 412baa166d..0000000000
--- a/modules/niu/luasrc/view/niu/network/rtable.htm
+++ /dev/null
@@ -1,112 +0,0 @@
-<%#
-LuCI - Lua Configuration Interface
-Copyright 2008-2009 Steven Barth <steven@midlink.org>
-Copyright 2008-2009 Jo-Philipp Wich <xm@subsignal.org>
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-$Id$
-
--%>
-
-<%-
- local fs = require "nixio.fs"
- local bit = require "nixio".bit
- local sys = require "luci.sys"
- local uci = require "luci.model.uci"
- local inst = uci.inst
- local state = uci.inst_state
- local http = require "luci.http"
- local style = true
-
-
- local ifc = {__index = function(self, key)
- local net = key
- state:foreach("network", "interface", function(s)
- if s.ifname == key then
- net = s[".name"]
- end
- end)
- rawset(self, key, net)
- return net
- end}
- setmetatable(ifc, ifc)
-
- if http.formvalue("toggle_rtable") then
- local cursor = uci.cursor()
- local rt = cursor:get("network", "lan", "_showrtable") or "1"
- cursor:set("network", "lan", "_showrtable", rt == "1" and "0" or "1")
- cursor:save("network")
- cursor:unload("network")
- inst:unload("network")
- end
--%>
-
-<div><a href="?toggle_rtable=1"> &gt; <%:Toggle display of Routing Information%> &lt; </a></div>
-<br />
-
-<% if inst:get("network", "lan", "_showrtable") ~= "0" then %>
-<div class="cbi-map" id="x-cbi-network">
-
- <fieldset class="cbi-section" id="x-cbi-table-table">
- <legend><%_Active <abbr title="Internet Protocol Version 4">IPv4</abbr>-Routes%></legend>
-
- <div class="cbi-section-node">
- <table class="cbi-section-table">
- <tr class="cbi-section-table-titles">
- <th class="cbi-section-table-cell"><%:Network%></th>
- <th class="cbi-section-table-cell"><%:Target%></th>
- <th class="cbi-section-table-cell"><%_<abbr title="Internet Protocol Version 4">IPv4</abbr>-Netmask%></th>
- <th class="cbi-section-table-cell"><%_<abbr title="Internet Protocol Version 4">IPv4</abbr>-Gateway%></th>
- <th class="cbi-section-table-cell"><%:Metric%></th>
- </tr>
- <% luci.sys.net.routes(function(rt) %>
- <tr class="cbi-section-table-row cbi-rowstyle-<%=(style and 1 or 2)%>">
- <td class="cbi-value-field"><%=ifc[rt.device]%></td>
- <td class="cbi-value-field"><%=rt.dest:network():string()%></td>
- <td class="cbi-value-field"><%=rt.dest:mask():string()%></td>
- <td class="cbi-value-field"><%=rt.gateway:string()%></td>
- <td class="cbi-value-field"><%=rt.metric%></td>
- </tr>
- <% style = not style; end) %>
- </table>
- </div>
- </fieldset>
- <br />
-
- <% if fs.access("/proc/net/ipv6_route") then style = true %>
- <fieldset class="cbi-section" id="x-cbi-table-table-2">
- <legend><%_Active <abbr title="Internet Protocol Version 6">IPv6</abbr>-Routes%></legend>
-
- <div class="cbi-section-node">
- <table class="cbi-section-table">
- <tr class="cbi-section-table-titles">
- <th class="cbi-section-table-cell"><%:Network%></th>
- <th class="cbi-section-table-cell"><%:Target%></th>
- <th class="cbi-section-table-cell"><%_<abbr title="Internet Protocol Version 6">IPv6</abbr>-Gateway%></th>
- <th class="cbi-section-table-cell"><%:Metric%></th>
- </tr>
- <% luci.sys.net.routes6(function(rt) %>
- <tr class="cbi-section-table-row cbi-rowstyle-<%=(style and 1 or 2)%>">
- <td class="cbi-value-field"><%=ifc[rt.device]%></td>
- <td class="cbi-value-field"><%=rt.dest:string()%></td>
- <td class="cbi-value-field"><%=rt.source:string()%></td>
- <td class="cbi-value-field"><%-
- local metr = rt.metric
- local lower = bit.band(metr, 0xffff)
- local higher = bit.rshift(bit.band(metr, 0xffff0000), 16)
- write(string.format("%04X%04X", higher, lower))
- -%></td>
- </tr>
- <% style = not style; end) %>
- </table>
- </div>
- </fieldset>
- <br />
- <% end %>
-</div>
-<% end %>
diff --git a/modules/niu/luasrc/view/niu/network/warn_ip_change.htm b/modules/niu/luasrc/view/niu/network/warn_ip_change.htm
deleted file mode 100644
index c8a787510e..0000000000
--- a/modules/niu/luasrc/view/niu/network/warn_ip_change.htm
+++ /dev/null
@@ -1,11 +0,0 @@
-<%
-local http = require "luci.http"
-local dsp = require "luci.dispatcher"
-local ip = require "luci.model.uci".inst:get("network", "lan", "ipaddr")
-local url = (http.getenv("HTTPS") and "https" or "http") .. "://" .. ip ..
-dsp.build_url("niu")
-%>
-
-<div style="color: red">Warning! The device IP-address has been changed.<br />
-It will be available in a few seconds at <a href="<%=url%>"><%=url%></a></div>
-<br /> \ No newline at end of file
diff --git a/modules/niu/luasrc/view/niu/network/wlanwanscan.htm b/modules/niu/luasrc/view/niu/network/wlanwanscan.htm
deleted file mode 100644
index f02b32ff58..0000000000
--- a/modules/niu/luasrc/view/niu/network/wlanwanscan.htm
+++ /dev/null
@@ -1,7 +0,0 @@
-<div style="margin: auto">
-<h2>Scanning for wireless networks in range</h2>
-<div>This may take a few seconds. Please wait...</div>
-</div>
-<script type="text/javascript">
-setTimeout(function() { document.forms.cbi.submit(); }, 100);
-</script> \ No newline at end of file
diff --git a/modules/niu/luasrc/view/niu/null.htm b/modules/niu/luasrc/view/niu/null.htm
deleted file mode 100644
index fe3a0735d9..0000000000
--- a/modules/niu/luasrc/view/niu/null.htm
+++ /dev/null
@@ -1 +0,0 @@
-NULL \ No newline at end of file
diff --git a/modules/niu/luasrc/view/niu/system.htm b/modules/niu/luasrc/view/niu/system.htm
deleted file mode 100644
index c702214e14..0000000000
--- a/modules/niu/luasrc/view/niu/system.htm
+++ /dev/null
@@ -1,72 +0,0 @@
-<%
-local nxo = require "nixio"
-local fs = require "nixio.fs"
-local sinfo = nxo.sysinfo()
-local load1 = nxo.bit.div(sinfo.loads[1] * 100, 1)
-local load15 = nxo.bit.div(sinfo.loads[3] * 100, 1)
-
-local meminfo = fs.readfile("/proc/meminfo")
-local totalram = nxo.bit.div(sinfo.totalram, 1024)
-local freeram = nxo.bit.div(sinfo.freeram, 1024)
-local buffers = nxo.bit.div(sinfo.bufferram, 1024)
-local cached = tonumber(meminfo:match("Cached:%s+([0-9]+)%s+"))
-local memused = nxo.bit.div(totalram - freeram - cached - buffers, 1024)
-totalram = nxo.bit.div(totalram, 1024)
-
-local totalswap = nxo.bit.div(sinfo.totalswap, 1048576)
-local usedswap = totalswap - nxo.bit.div(sinfo.freeswap, 1048576)
-
-
-local function date_format(secs)
- local suff = {"min", "h", "d"}
- local mins = 0
- local hour = 0
- local days = 0
-
- secs = nxo.bit.div(secs, 1)
- if secs > 60 then
- mins = nxo.bit.div(secs, 60)
- secs = secs % 60
- end
-
- if mins > 60 then
- hour = nxo.bit.div(mins, 60)
- mins = mins % 60
- end
-
- if hour > 24 then
- days = nxo.bit.div(hour, 24)
- hour = hour % 24
- end
-
- if days > 0 then
- return string.format("%.0fd %02.0fh %02.0fmin", days, hour, mins)
- else
- return string.format("%02.0fh %02.0fmin", hour, mins)
- end
-end
-%>
-<table class="dbstattbl">
-<tr>
-<th>Load:</th>
-<td><%=load1%>% / <%=load15%>%</td>
-</tr>
-<tr>
-<th>Memory:</th>
-<td><%=memused%> MiB / <%=totalram%> MiB</td>
-</tr>
-
-
-<% if totalswap > 0 then %>
-<tr>
-<th>Swap:</th>
-<td><%=usedswap%> MiB / <%=totalswap%> MiB</td>
-</tr>
-<% end %>
-
-<tr>
-<th>Uptime:</th>
-<td><%=date_format(sinfo.uptime)%></td>
-</tr>
-</table>
-<br /> \ No newline at end of file
diff --git a/modules/niu/luasrc/view/niu/system/backup.htm b/modules/niu/luasrc/view/niu/system/backup.htm
deleted file mode 100644
index 82b9314be1..0000000000
--- a/modules/niu/luasrc/view/niu/system/backup.htm
+++ /dev/null
@@ -1,41 +0,0 @@
-<%#
-LuCI - Lua Configuration Interface
-Copyright 2008 Steven Barth <steven@midlink.org>
-Copyright 2008 Jo-Philipp Wich <xm@leipzig.freifunk.net>
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-$Id$
-
--%>
-<%+header%>
-<h2><a id="content" name="content"><%:System%></a></h2>
-<h3><%:Backup / Restore%></h3>
-<p><%:Here you can backup and restore your configuration and - if possible - reset this device to the default settings.%></p>
-<br />
-<div>
- <ul>
- <li><a href="<%=REQUEST_URI%>?backup=kthxbye"><%:Create backup%></a></li>
- <% if reset_avail then -%>
- <li><a href="<%=REQUEST_URI%>?reset=yarly" onclick="return confirm('<%:Proceed reverting all settings and resetting to firmware defaults?%>')"><%:Reset to defaults%></a></li>
- <% end -%>
- </ul>
-</div>
-
-<br />
-
-<form method="post" action="<%=REQUEST_URI%>" enctype="multipart/form-data">
- <div class="left"><%:Backup Archive%>:</div>
- <div>
- <input type="file" size="30" name="archive" />
- </div>
- <div>
- <input type="submit" name="cancel" class="cbi-button cbi-input-cancel" value="<%:Cancel%>" />
- <input type="submit" class="cbi-button cbi-input-apply" value="<%:Restore backup%>" />
- </div>
-</form>
-<%+footer%>
diff --git a/modules/niu/luasrc/view/niu/system/reboot.htm b/modules/niu/luasrc/view/niu/system/reboot.htm
deleted file mode 100644
index 4b356d61e7..0000000000
--- a/modules/niu/luasrc/view/niu/system/reboot.htm
+++ /dev/null
@@ -1,14 +0,0 @@
-Rebooting. Please wait...
-
-<script type="text/javascript">
-window.setInterval(function() {
- var xmlHttp = new XMLHttpRequest();
- xmlHttp.open('GET', '/', true);
- xmlHttp.onreadystatechange = function () {
- if (xmlHttp.readyState == 4 && req.status >= 200 && req.status < 400) {
- window.location = "/";
- }
- };
- xmlHttp.send(null);
-}, 10000);
-</script> \ No newline at end of file
diff --git a/modules/niu/luasrc/view/niu/system/upgrade.htm b/modules/niu/luasrc/view/niu/system/upgrade.htm
deleted file mode 100644
index 1083a16188..0000000000
--- a/modules/niu/luasrc/view/niu/system/upgrade.htm
+++ /dev/null
@@ -1,105 +0,0 @@
-<%#
-LuCI - Lua Configuration Interface
-Copyright 2008 Steven Barth <steven@midlink.org>
-Copyright 2008-2009 Jo-Philipp Wich <xm@subsignal.org>
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-$Id$
-
--%>
-
-<%+header%>
-
-<h2><a id="content" name="content"><%:System%></a></h2>
-<h3><%:Flash Firmware%></h3>
-
-<% if step == 1 then %>
- <% if supported then %>
- <form method="post" action="<%=REQUEST_URI%>" enctype="multipart/form-data">
- <p>
- <%:Upload an OpenWrt image file to reflash the device.%>
- <% if bad_image then %>
- <br /><br />
- <div class="error"><%:The uploaded image file does not
- contain a supported format. Make sure that you choose the generic
- image format for your platform. %></div>
- <% end %>
- </p>
- <div>
- <%:Firmware image%>:<br />
- <input type="hidden" name="step" value="2" />
- <input type="file" size="30" name="image" />
- <br />
- <br />
- <% if keepavail then -%>
- <input type="checkbox" name="keepcfg" value="1" checked="checked" />
- <span class="bold"><%:Keep configuration files%></span>
- <% end -%>
-
- <br />
- <input class="cbi-button cbi-button-apply" type="submit" value="<%:Upload image%>" />
- </div>
- </form>
- <% else %>
- <div class="error"><%_ Sorry.
- OpenWrt does not support a system upgrade on this platform.<br />
- You need to manually flash your device. %></div>
- <% end %>
-<% elseif step == 2 then %>
- <p>
- <%_ The flash image was uploaded.
- Below is the checksum and file size listed,
- compare them with the original file to ensure data integrity.<br />
- Click "Proceed" below to start the flash procedure. %>
-
- <% if flashsize > 0 and filesize > flashsize then %>
- <br /><br />
- <div class="error"><%:It appears that you try to
- flash an image that does not fit into the flash memory, please verify
- the image file! %></div>
- <% end %>
-
- <br />
- <ul>
- <li><%:Checksum%>: <code><%=checksum%></code></li>
- <li><%:Size%>: <%
- local w = require "luci.tools.webadmin"
- write(w.byte_format(filesize))
-
- if flashsize > 0 then
- write(luci.i18n.translatef(
- " (%s available)",
- w.byte_format(flashsize)
- ))
- end
- %></li>
- </ul>
- </p>
- <div class="cbi-page-actions right">
- <form style="display:inline">
- <input type="hidden" name="step" value="3" />
- <input type="hidden" name="keepcfg" value="<%=keepconfig and "1" or "0"%>" />
- <input class="cbi-button cbi-button-apply" type="submit" value="<%:Proceed%>" />
- </form>
- <form style="display:inline">
- <input type="hidden" name="step" value="1" />
- <input type="hidden" name="keepcfg" value="<%=keepconfig and "1" or "0"%>" />
- <input class="cbi-button cbi-button-reset" type="submit" value="<%:Cancel%>" />
- </form>
- </div>
-<% elseif step == 3 then %>
- <p><%_ The system is flashing now.<br />
- DO NOT POWER OFF THE DEVICE!<br />
- Wait a few minutes until you try to reconnect.
- It might be necessary to renew the address of your computer to reach the device
- again, depending on your settings. %></p>
-
- <iframe src="<%=REQUEST_URI%>?step=4&#38;keepcfg=<%=keepconfig and "1" or "0"%>" style="border:1px solid black; width:100%; height:150px"></iframe>
-<% end %>
-<%+footer%>
-
diff --git a/modules/niu/luasrc/view/niu/traffic.htm b/modules/niu/luasrc/view/niu/traffic.htm
deleted file mode 100644
index 97a18a1511..0000000000
--- a/modules/niu/luasrc/view/niu/traffic.htm
+++ /dev/null
@@ -1,58 +0,0 @@
-<%
-local uci = require "luci.model.uci"
-local fs = require "nixio.fs"
-
-local wanon = uci.inst_state:get("network", "wan", "up") == "1"
-local wanif = wanon and uci.inst_state:get("network", "wan", "ifname")
-local lanif = uci.inst_state:get("network", "lan", "ifname")
-local wanul, wandl, lanul, landl
-local devstats = fs.readfile("/proc/net/dev")
-
-local fwav = fs.access("/etc/config/firewall", "r")
-local fwon = uci.inst_state:get("firewall", "core", "loaded") == "1"
-
-if lanif then
- local rx, tx = devstats:match("%s*"..lanif..
- ":%s*([0-9]+)%s+[0-9]+%s+[0-9]+%s+[0-9]+%s+"..
- "[0-9]+%s+[0-9]+%s+[0-9]+%s+[0-9]+%s+([0-9]+)")
- lanul = tx and (tonumber(tx) / 1000000000)
- landl = rx and (tonumber(rx) / 1000000000)
-end
-
-if wanif then
- local rx, tx = devstats:match("%s*"..wanif..
- ":%s*([0-9]+)%s+[0-9]+%s+[0-9]+%s+[0-9]+%s+"..
- "[0-9]+%s+[0-9]+%s+[0-9]+%s+[0-9]+%s+([0-9]+)")
- wanul = tx and (tonumber(tx) / 1000000000)
- wandl = rx and (tonumber(rx) / 1000000000)
-end
-
-%>
-
-<table class="dbstattbl">
-<% if wanul and wandl then %>
-<tr>
-<th>Uplink Traffic: </th><td>
-<%=("%.2f"):format(wandl)%> GB&#8659; <%=("%.2f"):format(wanul)%> GB&#8657;
-</td>
-</tr>
-<% end %>
-
-<% if lanul and landl then %>
-<tr>
-<th>Local Traffic: </th><td>
-<%=("%.2f"):format(landl)%> GB&#8659; <%=("%.2f"):format(lanul)%> GB&#8657;
-</td>
-</tr>
-<% end %>
-
-<% if fwav then %>
-<tr>
-<th>Firewall: </th><td>
-<%=fwon and translate("active") or translate("inactive")%>
-</td>
-</tr>
-<% end %>
-
-</table>
-<br /> \ No newline at end of file
diff --git a/modules/niu/luasrc/view/niu/traffic/conntrack.htm b/modules/niu/luasrc/view/niu/traffic/conntrack.htm
deleted file mode 100644
index 09b1d6b1cf..0000000000
--- a/modules/niu/luasrc/view/niu/traffic/conntrack.htm
+++ /dev/null
@@ -1,75 +0,0 @@
-<%#
-LuCI - Lua Configuration Interface
-Copyright 2008-2009 Steven Barth <steven@midlink.org>
-Copyright 2008-2009 Jo-Philipp Wich <xm@subsignal.org>
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
-$Id$
-
--%>
-
-<%-
- local sys = require "luci.sys"
- local style = true
--%>
-
-<%+header%>
-
-<div class="cbi-map" id="cbi-conntrack">
- <h2><a id="content" name="content"><%:Active Connections%></a></h2>
- <div class="cbi-map-descr"><%:This page gives an overview over currently active network connections.%></div>
-
- <fieldset class="cbi-section" id="cbi-table-table">
- <legend>ARP</legend>
- <div class="cbi-section-node">
- <table class="cbi-section-table">
- <tr class="cbi-section-table-titles">
- <th class="cbi-section-table-cell"><%_<abbr title="Internet Protocol Version 4">IPv4</abbr>-Address%></th>
- <th class="cbi-section-table-cell"><%_<abbr title="Media Access Control">MAC</abbr>-Address%></th>
- <th class="cbi-section-table-cell"><%:Interface%></th>
- </tr>
-
- <% sys.net.arptable(function(e) %>
- <tr class="cbi-section-table-row cbi-rowstyle-<%=(style and 1 or 2)%>">
- <td class="cbi-value-field"><%=e["IP address"]%></td>
- <td class="cbi-value-field"><%=e["HW address"]%></td>
- <td class="cbi-value-field"><%=e["Device"]%></td>
- </tr>
- <% style = not style; end) %>
- </table>
- </div>
- </fieldset>
- <br />
-
- <fieldset class="cbi-section" id="cbi-table-table">
- <legend><%:Active Connections%></legend>
- <div class="cbi-section-node">
- <table class="cbi-section-table">
- <tr class="cbi-section-table-titles">
- <th class="cbi-section-table-cell"><%:Network%></th>
- <th class="cbi-section-table-cell"><%:Protocol%></th>
- <th class="cbi-section-table-cell"><%:Source%></th>
- <th class="cbi-section-table-cell"><%:Destination%></th>
- </tr>
-
- <% style = true; sys.net.conntrack(function(c) %>
- <tr class="cbi-section-table-row cbi-rowstyle-<%=(style and 1 or 2)%>">
- <td class="cbi-value-field"><%=c.layer3:upper()%></td>
- <td class="cbi-value-field"><%=c.layer4:upper()%></td>
- <td class="cbi-value-field"><%=c.src%></td>
- <td class="cbi-value-field"><%=c.dst%></td>
- </tr>
- <% style = not style; end) %>
- </table>
- </div>
- </fieldset>
- <br />
-</div>
-
-<%+footer%>
-