mirror of
				https://github.com/kenzok8/openwrt-packages.git
				synced 2025-10-30 07:50:37 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			32 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
			
		
		
	
	
			32 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			HTML
		
	
	
	
	
	
| <script type="text/javascript">
 | |
| 	//<![CDATA[
 | |
| 	function clear_log(btn) {
 | |
| 		XHR.get('<%=url([[admin]], [[services]], [[filebrowser]], [[clear_log]])%>', null,
 | |
| 			function(x, data) {
 | |
| 				if(x && x.status == 200) {
 | |
| 					var log_textarea = document.getElementById('log_textarea');
 | |
| 					log_textarea.innerHTML = "";
 | |
| 					log_textarea.scrollTop = log_textarea.scrollHeight;
 | |
| 				}
 | |
| 			}
 | |
| 		);
 | |
| 	}
 | |
| 	XHR.poll(3, '<%=url([[admin]], [[services]], [[filebrowser]], [[get_log]])%>', null,
 | |
| 		function(x, data) {
 | |
| 			if(x && x.status == 200) {
 | |
| 				var log_textarea = document.getElementById('log_textarea');
 | |
| 				log_textarea.innerHTML = x.responseText;
 | |
| 				log_textarea.scrollTop = log_textarea.scrollHeight;
 | |
| 			}
 | |
| 		}
 | |
| 	);
 | |
| 	//]]>
 | |
| </script>
 | |
| <fieldset class="cbi-section" id="_log_fieldset">
 | |
| 	<legend>
 | |
| 		<%:Logs%>
 | |
| 	</legend>
 | |
| 	<input class="cbi-button cbi-input-remove" type="button" onclick="clear_log()" value="<%:Clear logs%>" style="margin-left: 10px;">
 | |
| 	<textarea id="log_textarea" class="cbi-input-textarea" style="width: calc(100% - 20px); margin: 10px;" data-update="change" rows="5" wrap="off" readonly="readonly"></textarea>
 | |
| </fieldset>
 | 
