From a37296dda8b90739b73b0a0fdc3b271405dd2ec1 Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Fri, 8 Mar 2019 13:26:19 +0100 Subject: luci-mod-system: add button to sync with ntp server Especially for systems without RTC this change has two advantages * manual time sync with time server during configuration * test possibility of the time sync over the configured servers Signed-off-by: Florian Eckert --- .../luasrc/view/admin_system/clock_status.htm | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'modules/luci-mod-system/luasrc/view/admin_system') diff --git a/modules/luci-mod-system/luasrc/view/admin_system/clock_status.htm b/modules/luci-mod-system/luasrc/view/admin_system/clock_status.htm index 2c96eb4180..796aa695c6 100644 --- a/modules/luci-mod-system/luasrc/view/admin_system/clock_status.htm +++ b/modules/luci-mod-system/luasrc/view/admin_system/clock_status.htm @@ -28,9 +28,29 @@ return false; } + + function btn_action(action) + { + if (action.name === "do_ntp_restart") + { + new XHR.get('<%=luci.dispatcher.build_url("admin", "system", "ntp_restart")%>', null, + function(x) + { + if (!x) + { + return; + } + }); + } + } + //]]> <%:Collecting data...%> +<% if require("nixio.fs").access("/etc/init.d/sysntpd") then %> + +<% end %> + <%+cbi/valuefooter%> -- cgit v1.2.3