diff options
Diffstat (limited to 'modules/luci-compat')
-rw-r--r-- | modules/luci-compat/luasrc/model/network/proto_vpnc.lua | 1 | ||||
-rw-r--r-- | modules/luci-compat/luasrc/tools/webadmin.lua | 18 |
2 files changed, 9 insertions, 10 deletions
diff --git a/modules/luci-compat/luasrc/model/network/proto_vpnc.lua b/modules/luci-compat/luasrc/model/network/proto_vpnc.lua index 6c3136e384..899a67ad0a 100644 --- a/modules/luci-compat/luasrc/model/network/proto_vpnc.lua +++ b/modules/luci-compat/luasrc/model/network/proto_vpnc.lua @@ -43,4 +43,3 @@ function proto.contains_interface(self, ifc) end netmod:register_pattern_virtual("^vpn%-%w") - diff --git a/modules/luci-compat/luasrc/tools/webadmin.lua b/modules/luci-compat/luasrc/tools/webadmin.lua index 106810aa03..350c1fed2b 100644 --- a/modules/luci-compat/luasrc/tools/webadmin.lua +++ b/modules/luci-compat/luasrc/tools/webadmin.lua @@ -14,8 +14,8 @@ function byte_format(byte) if byte > 1024 and i < 5 then byte = byte / 1024 else - return string.format("%.2f %s", byte, suff[i]) - end + return string.format("%.2f %s", byte, suff[i]) + end end end @@ -24,23 +24,23 @@ function date_format(secs) local mins = 0 local hour = 0 local days = 0 - + secs = math.floor(secs) if secs > 60 then mins = math.floor(secs / 60) secs = secs % 60 end - + if mins > 60 then hour = math.floor(mins / 60) mins = mins % 60 end - + if hour > 24 then days = math.floor(hour / 24) hour = hour % 24 end - + if days > 0 then return string.format("%.0fd %02.0fh %02.0fmin %02.0fs", days, hour, mins, secs) else @@ -70,15 +70,15 @@ end function firewall_find_zone(name) local find - - luci.model.uci.cursor():foreach("firewall", "zone", + + luci.model.uci.cursor():foreach("firewall", "zone", function (section) if section.name == name then find = section[".name"] end end ) - + return find end |