git.99rst.org
/
openwrt-luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
| inline |
side by side
(parent:
9abe328
)
modules/admin-full: use String.format('%t', ...) in lease status template
author
Jo-Philipp Wich
<redacted>
Wed, 1 Dec 2010 20:54:52 +0000
(20:54 +0000)
committer
Jo-Philipp Wich
<redacted>
Wed, 1 Dec 2010 20:54:52 +0000
(20:54 +0000)
modules/admin-full/luasrc/view/admin_network/lease_status.htm
patch
|
blob
|
history
diff --git
a/modules/admin-full/luasrc/view/admin_network/lease_status.htm
b/modules/admin-full/luasrc/view/admin_network/lease_status.htm
index 3635577f6c7fc788c680fe0be5fd42b2cb066f96..e5827106b19443b365f0c88507d0b7d18efad183 100644
(file)
--- a/
modules/admin-full/luasrc/view/admin_network/lease_status.htm
+++ b/
modules/admin-full/luasrc/view/admin_network/lease_status.htm
@@
-21,29
+21,7
@@
}
else
{
- var d = 0;
- var h = 0;
- var m = 0;
- var s = st[i].expires;
-
- if (s > 60) {
- m = Math.floor(s / 60);
- s = (s % 60);
- }
-
- if (m > 60) {
- h = Math.floor(m / 60);
- m = (m % 60);
- }
-
- if (h > 24) {
- d = Math.floor(h / 24);
- h = (h % 24);
- }
-
- timestr = (d > 0)
- ? String.format('%dd %dh %dm %ds', d, h, m, s)
- : String.format('%dh %dm %ds', h, m, s);
+ timestr = String.format('%t', st[i].expires);
}
var tr = tb.insertRow(-1);
git clone https://git.99rst.org/PROJECT