luci/modules/luci-mod-system/luasrc/view/admin_system/clock_status.htm
Daniel F. Dickinson 58d97b5e27 modules: Split luci-mod-full
Move some common elements to luci-base, and otherwise make three
packages out of status, system, and network.  They were mostly
separated already, but there were some shared elements between
status and network that are now in luci-base.

Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
2018-09-19 20:08:19 +02:00

36 lines
880 B
HTML

<%+cbi/valueheader%>
<script type="text/javascript">//<![CDATA[
XHR.poll(5, '<%=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;
}
//]]></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)" />
<%+cbi/valuefooter%>