op-packages/luci-app-dnscrypt-proxy2/files/luci/view/dnscrypt-proxy/resolve.htm
github-actions[bot] 32600acc60 🌴 Sync 2026-03-05 23:51:42
2026-03-05 23:51:42 +08:00

22 lines
858 B
HTML

<%+cbi/valueheader%>
<script type="text/javascript">//<![CDATA[
function check_port(btn, func)
{
btn.disabled = true;
btn.value = '<%:Check...%>';
XHR.get('<%=luci.dispatcher.build_url("admin", "services", "dnscrypt-proxy","resolve_c")%>',
{ set:func },
function(x, rv) {
if(x.readyState === 4 ) {
if(x.status === 200) {try{res = JSON.parse(x.responseText);}catch(e){res=null;}
if(res !==null && typeof(res) === "object") {var s = document.getElementById(func + '-status'); if (s) s.innerHTML =res.ret; btn.disabled = false; btn.value = '<%:Check Server%>';}
}}});
return false;
}
//]]></script>
<input type="button" class="cbi-button cbi-button-apply" value="<%:Check Server%>" onclick="return check_port(this,'<%=self.option%>')" />
<span id="<%=self.option%>-status"><em><%=self.value%></em></span>
<%+cbi/valuefooter%>