1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-02-15 03:51:51 +00:00
openmptcprouter-feeds/luci-app-adguardhome/luasrc/view/AdGuardHome/AdGuardHome_status.htm

27 lines
845 B
HTML
Raw Normal View History

2023-01-18 13:21:55 +00:00
<script type="text/javascript">//<![CDATA[
XHR.poll(3, '<%=url([[admin]], [[services]], [[AdGuardHome]], [[status]])%>', null,
function(x, data) {
var tb = document.getElementById('AdGuardHome_status');
if (data && tb) {
if (data.running) {
tb.innerHTML = '<em><b><font color=green>AdGuardHome <%:RUNNING%></font></b></em>';
} else {
tb.innerHTML = '<em><b><font color=red>AdGuardHome <%:NOT RUNNING%></font></b></em>';
}
if (data.redirect)
{
tb.innerHTML+='<em><b><font color=green><%:Redirected%></font></b></em>'
} else {
tb.innerHTML+='<em><b><font color=red><%:Not redirect%></font></b></em>'
}
}
}
);
//]]>
</script>
<style>.mar-10 {margin-left: 50px; margin-right: 10px;}</style>
<fieldset class="cbi-section">
<p id="AdGuardHome_status">
<em><%:Collecting data...%></em>
</p>
</fieldset>