diff options
author | Giovanni Giacobbi <giovanni@giacobbi.net> | 2021-01-16 15:30:03 +0100 |
---|---|---|
committer | Hannu Nyman <hannu.nyman@iki.fi> | 2021-01-20 17:48:16 +0200 |
commit | af422b192462813150863752f9c300af55df4996 (patch) | |
tree | ef07c2f73da55ba53792d792e287674f01ddd535 /modules/luci-compat/luasrc/tools | |
parent | d3280e6f5df17b799230e229c9472cf8854015ae (diff) |
treewide: removed trailing whitespaces and extra newlines in 'modules'
Signed-off-by: Giovanni Giacobbi <giovanni@giacobbi.net>
Diffstat (limited to 'modules/luci-compat/luasrc/tools')
-rw-r--r-- | modules/luci-compat/luasrc/tools/webadmin.lua | 18 |
1 files changed, 9 insertions, 9 deletions
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 |