mirror of
https://github.com/JamesonHuang/OpenWrt_Luci_Lua.git
synced 2024-11-24 14:20:10 +00:00
54 lines
1.8 KiB
HTML
54 lines
1.8 KiB
HTML
|
<%
|
||
|
local ver = require("xiaoqiang.XQVersion").webVersion
|
||
|
%>
|
||
|
<%include('web/inc/head')%>
|
||
|
<title>小米路由器</title>
|
||
|
<link rel="stylesheet" href="<%=resource%>/web/css/page.set.default.css?v=<%=ver%>" type="text/css"/>
|
||
|
</head>
|
||
|
<body>
|
||
|
<div class="mod-setting-panel">
|
||
|
<div class="hd">
|
||
|
<h3>上传日志</h3>
|
||
|
</div>
|
||
|
<div class="bd">
|
||
|
<div class="mod-set-upconfig">
|
||
|
<div class="btn-control">
|
||
|
<button type="button" id="btnXmSubmit" onclick="logCollection();" class="btn btn-primary">
|
||
|
<span>上传日志</span>
|
||
|
</button>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<%include('web/inc/g.js.base')%>
|
||
|
<script type="text/javascript">
|
||
|
function uploadLog() {
|
||
|
$('#btnXmSubmit').prop('disabled', true).find('span').html('上传中...');
|
||
|
var request_date = {};
|
||
|
$.getJSON('<%=luci.dispatcher.build_url("api", "xqsystem","upload_log")%>',request_date,function(rsp)
|
||
|
{
|
||
|
if (rsp.code == 0) {
|
||
|
$.lightalert().setContent('上传成功').show();
|
||
|
}
|
||
|
else {
|
||
|
$.lightalert().setContent(rsp.msg).show();
|
||
|
}
|
||
|
$('#btnXmSubmit').prop('disabled', false).find('span').html('上传日志');
|
||
|
})
|
||
|
}
|
||
|
function logCollection() {
|
||
|
$('#btnXmSubmit').prop('disabled', true).find('span').html('收集日志中...');
|
||
|
var request_date = {};
|
||
|
$.getJSON('<%=luci.dispatcher.build_url("api", "xqsystem","wifi_log")%>',request_date,function(rsp)
|
||
|
{
|
||
|
if (rsp.code == 0 ) {
|
||
|
uploadLog();
|
||
|
} else {
|
||
|
$('#btnXmSubmit').prop('disabled', false).find('span').html('上传日志');
|
||
|
$.lightalert().setContent(rsp.msg).show();
|
||
|
}
|
||
|
})
|
||
|
}
|
||
|
</script>
|
||
|
</body>
|
||
|
</html>
|