<%+cbi/valueheader%>

<script type="text/javascript">//<![CDATA[

	function act_flush_fakeip_cache(btn)
	{
		btn.disabled = true;
		btn.value    = '<%:Flushing...%> ';
		XHR.get('<%=luci.dispatcher.build_url("admin", "services", "openclash","flush_fakeip_cache")%>',
			null,
			function(x,status)
			{
				if ( x && x.status == 200 ) {
					if(status.flush_status == "0" || status.flush_status != "")
					{
						btn.value = '<%:Flush Failed%>';
						
					}
					else
					{
						btn.value = '<%:Flush Successful%>';
					}
				}
				else {
					btn.value = '<%:Flush Timeout%>';
				}
			}
		);
		btn.disabled = false;
		return false;
	};
	
//]]></script>


<input type="button" class="btn cbi-button cbi-input-reload" value="<%:Flush%>" onclick="return act_flush_fakeip_cache(this)" />
<%+cbi/valuefooter%>
