diff options
-rw-r--r-- | applications/luci-app-nlbwmon/htdocs/luci-static/resources/view/nlbw.js | 10 | ||||
-rw-r--r-- | applications/luci-app-travelmate/luasrc/model/cbi/travelmate/overview_tab.lua | 7 |
2 files changed, 7 insertions, 10 deletions
diff --git a/applications/luci-app-nlbwmon/htdocs/luci-static/resources/view/nlbw.js b/applications/luci-app-nlbwmon/htdocs/luci-static/resources/view/nlbw.js index e5ae69b3a7..8a01b1db49 100644 --- a/applications/luci-app-nlbwmon/htdocs/luci-static/resources/view/nlbw.js +++ b/applications/luci-app-nlbwmon/htdocs/luci-static/resources/view/nlbw.js @@ -226,13 +226,15 @@ function renderPeriods() var sel = document.getElementById('nlbw.period'); for (var e, i = trafficPeriods.length - 1; e = trafficPeriods[i]; i--) { - var d1 = new Date(e); - var d2, pd; + var ymd1 = e.split(/-/); + var d1 = new Date(+ymd1[0], +ymd1[1] - 1, +ymd1[2]); + var ymd2, d2, pd; if (i) { - d2 = new Date(trafficPeriods[i - 1]); + ymd2 = trafficPeriods[i - 1].split(/-/); + d2 = new Date(+ymd2[0], +ymd2[1] - 1, +ymd2[2]); d2.setDate(d2.getDate() - 1); - pd = '%04d-%02d-%02d'.format(d1.getFullYear(), d1.getMonth() + 1, d1.getDate()); + pd = e; } else { d2 = new Date(); diff --git a/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/overview_tab.lua b/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/overview_tab.lua index 5792536ba1..7fe5f23a47 100644 --- a/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/overview_tab.lua +++ b/applications/luci-app-travelmate/luasrc/model/cbi/travelmate/overview_tab.lua @@ -1,4 +1,4 @@ --- Copyright 2017-2018 Dirk Brenken (dev@brenken.org) +-- Copyright 2017-2019 Dirk Brenken (dev@brenken.org) -- This is free software, licensed under the Apache License, Version 2.0 local fs = require("nixio.fs") @@ -17,11 +17,6 @@ m = Map("travelmate", translate("Travelmate"), .. "see online documentation</a>", "https://github.com/openwrt/packages/blob/master/net/travelmate/files/README.md")) m:chain("network") m:chain("firewall") -m.apply_on_parse = true - -function m.on_apply(self) - luci.sys.call("/etc/init.d/travelmate restart >/dev/null 2>&1") -end -- Interface Wizard |