diff options
author | Jo-Philipp Wich <jo@mein.io> | 2019-04-01 16:53:52 +0200 |
---|---|---|
committer | Jo-Philipp Wich <jo@mein.io> | 2019-07-07 15:36:24 +0200 |
commit | 675824e377cee636beaaa003ce7dcf346ae148ab (patch) | |
tree | b72adc0595d6c2945c85fc34ebafea2115a6b797 /modules/luci-mod-system/luasrc/view | |
parent | c7a9900c8734f19e34af5bd4a4106566d4ca3ca1 (diff) |
luci-mod-system: use client side cbi forms for system and led config
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'modules/luci-mod-system/luasrc/view')
-rw-r--r-- | modules/luci-mod-system/luasrc/view/admin_system/clock_status.htm | 56 |
1 files changed, 0 insertions, 56 deletions
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 deleted file mode 100644 index 796aa695c6..0000000000 --- a/modules/luci-mod-system/luasrc/view/admin_system/clock_status.htm +++ /dev/null @@ -1,56 +0,0 @@ -<%+cbi/valueheader%> - -<script type="text/javascript">//<![CDATA[ - XHR.poll(-1, '<%=url('admin/system/clock_status')%>', null, - function(x, rv) - { - var s = document.getElementById('<%=self.option%>-clock-status'); - if (s) - { - s.innerHTML = rv.timestring || '?'; - } - } - ); - - function sync_clock(btn) - { - btn.disabled = true; - btn.value = '<%:Synchronizing...%>'; - - (new XHR()).post('<%=url('admin/system/clock_status')%>', - { token: '<%=token%>', set: Math.floor((new Date()).getTime() / 1000) }, - function() - { - btn.disabled = false; - btn.value = '<%:Sync with browser%>'; - } - ); - - 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; - } - }); - } - } - -//]]></script> - -<span id="<%=self.option%>-clock-status"><em><%:Collecting data...%></em></span> -<input type="button" class="cbi-button cbi-button-apply" value="<%:Sync with browser%>" onclick="return sync_clock(this)" /> - -<% if require("nixio.fs").access("/etc/init.d/sysntpd") then %> -<input type="button" class="cbi-button cbi-button-apply" name="do_ntp_restart" value="<%:Sync with NTP-Server%>" onclick="btn_action(this)" /> -<% end %> - -<%+cbi/valuefooter%> |