30 lines
1.0 KiB
HTML
Executable File
30 lines
1.0 KiB
HTML
Executable File
<script type="text/javascript">
|
|
//<![CDATA[
|
|
function del_log(btn) {
|
|
XHR.get('<%=luci.dispatcher.build_url("admin/network/natter/del_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(5, '<%=luci.dispatcher.build_url("admin/network/natter/print_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" >
|
|
<input class="cbi-button cbi-input-remove" type="button" onclick="del_log()" value="<%:Delete Logs%>" />
|
|
<textarea id="log_textarea" class="cbi-input-textarea" style="width: 100%;margin-top: 10px;" data-update="change" rows="30" wrap="off" readonly="readonly"></textarea>
|
|
</fieldset>
|