diff options
author | Manuel Munz <freifunk@somakoma.de> | 2010-11-26 14:12:35 +0000 |
---|---|---|
committer | Manuel Munz <freifunk@somakoma.de> | 2010-11-26 14:12:35 +0000 |
commit | 1c0f48fed622ceb1298091cf2db954b809ad8f84 (patch) | |
tree | b56d91f1f14f995e04de0b463e56f376316eaeb9 /modules/freifunk/luasrc/view | |
parent | 4451d551a460c7d36828dc26bdf62360a4496e5a (diff) |
modules/freifunk: Optimize variable init and fix whitespace issues
Diffstat (limited to 'modules/freifunk/luasrc/view')
-rw-r--r-- | modules/freifunk/luasrc/view/freifunk/public_status.htm | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/modules/freifunk/luasrc/view/freifunk/public_status.htm b/modules/freifunk/luasrc/view/freifunk/public_status.htm index 2660fbf52..af1efaffa 100644 --- a/modules/freifunk/luasrc/view/freifunk/public_status.htm +++ b/modules/freifunk/luasrc/view/freifunk/public_status.htm @@ -19,9 +19,7 @@ local memory = string.format("%.2f MB (%.0f%% %s, %.0f%% %s, %.0f%% %s)", ) -- wireless -local uci = require "luci.model.uci".cursor() -local ntm = require "luci.model.network" -ntm.init(uci) +local ntm = require "luci.model.network".init() local devices = ntm:get_wifidevs() local netlist = { } local netdevs = { } @@ -71,8 +69,8 @@ local defroutev6 = sys.net.defaultroute6 () netdevs[net:ifname()] = dev:name() if net.iwdata.ifname then - local signal = net.iwinfo.signal or "N/A" - local noise = net.iwinfo.noise or "N/A" + local signal = net.iwinfo.signal or "N/A" + local noise = net.iwinfo.noise or "N/A" local q = net.iwinfo.quality or "0" local qmax = net.iwinfo.quality_max or "100" local qperc = q / qmax * 100 @@ -133,7 +131,7 @@ local defroutev6 = sys.net.defaultroute6 () <table class="cbi-section-table"> <% if not defroutev4 and not defroutev6 then %> - <%:No default routes known.%> + <%:No defaultroutes known.%> <%else%> <tr class="cbi-section-table-titles"> <th class="cbi-section-table-cell"><%:Network%></th> @@ -170,4 +168,3 @@ local defroutev6 = sys.net.defaultroute6 () <% end %> <%+footer%> - |