Files
op-packages/luci-app-openclash/luasrc/view/openclash/flush_dns_cache.htm
T

37 lines
798 B
HTML

<%+cbi/valueheader%>
<script type="text/javascript">//<![CDATA[
function act_flush_dns_cache(btn)
{
btn.disabled = true;
btn.value = '<%:Flushing...%> ';
XHR.get('<%=luci.dispatcher.build_url("admin", "services", "openclash","flush_dns_cache")%>',
null,
function(x,status)
{
btn.disabled = false;
if ( x && x.status == 200 ) {
if(status.fakeip_flush === "" && status.dns_flush === "")
{
btn.value = '<%:Flush Successful%>';
}
else
{
btn.value = '<%:Flush Failed%>';
}
}
else {
btn.value = '<%:Flush Timeout%>';
}
}
);
return false;
};
//]]></script>
<input type="button" class="btn cbi-button cbi-input-reload" value="<%:Flush%>" onclick="return act_flush_dns_cache(this)" />
<%+cbi/valuefooter%>