You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
125 lines
4.7 KiB
125 lines
4.7 KiB
<!DOCTYPE html>
|
|
<html lang="zh-cn">
|
|
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<script src="/js/guid.js"></script>
|
|
<script type="text/javascript" src="../js/notice/xm-select.js"></script>
|
|
<script type="text/javascript" src="../js/load_realmlist.js"></script>
|
|
<!--#include file="/widget/head.html"-->
|
|
</head>
|
|
|
|
<body class="layui-layout-body" layadmin-themealias="default">
|
|
<div id="wrapper" class="layui-fluid">
|
|
<!--#include file="/widget/nav.html"-->
|
|
<div id="page-wrapper" class="layui-body layadmin-tabsbody-item layui-show layui-fluid layui-row layui-col-space15">
|
|
<div class="layui-card" id="card-page-wrapper">
|
|
<div class="layui-card-header">
|
|
<h2>服务器数据查询</h2>
|
|
</div>
|
|
<div class=" layui-form layui-row layui-col-space10">
|
|
<div class="layui-col-md8">
|
|
<div class="form-group">
|
|
<div class="col-md-2"> <label class=" control-label">服务器(单选)</label></div>
|
|
<div class="form-group col-md-4" id="realmlistdiv">
|
|
<div id="realmlistSelect" style="display: inline-block;width: 300px;margin-left: 20px;"></div>
|
|
<div id="realmlistRule" style="display: inline-block;margin-left: 20px;"></div>
|
|
</div>
|
|
|
|
<div class="col-md-1">
|
|
<label>DB名称:</label>
|
|
</div>
|
|
<div class="form-group col-md-3" >
|
|
<select class="form-control" id="dbName" lay-search lay-filter>
|
|
<option value="Activity">服务器活动</option>
|
|
<option value="MatePveData">伙伴pve数据</option>
|
|
<option value="OnlineData">在线人数</option>
|
|
<option value="ServerData">服务器数据</option>
|
|
</select>
|
|
</div>
|
|
<button type="button" class=" layui-btn " id="sele">查询</button>
|
|
</div>
|
|
|
|
<div class="layui-card-body">
|
|
<pre id='preId' style="white-space: pre-line;"></pre>
|
|
<div id="dataTableDiv">
|
|
<table class="layui-table" id="dataTable"></table>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<!--#include file="/widget/tail.html"-->
|
|
|
|
<script type="text/javascript">
|
|
|
|
$("#sele").click(function () {
|
|
|
|
var _realmlist = realmlistSelect?.getValue('value');
|
|
_realmlist.sort((a, b) => a - b);
|
|
let realmlist = _realmlist.join(',');
|
|
if (realmlist == null || realmlist == "") {
|
|
layer.alert('请选择realm', { icon: 2 });
|
|
return;
|
|
}
|
|
var dbName = $("#dbName").select().val();
|
|
var loadIndex = layer.load(0);
|
|
let timeout=true;
|
|
|
|
setTimeout(() => {
|
|
layer.close(loadIndex)
|
|
if(timeout){
|
|
layer.msg("request timeout");
|
|
}
|
|
}, 5000);
|
|
|
|
$.get(Page.SvrIp + "/api/server_monitor",
|
|
{
|
|
realmlist: realmlist,
|
|
token: cookie.get("token"),
|
|
AccountType: 0,
|
|
dbName: dbName
|
|
},
|
|
function (d) {
|
|
timeout=false;
|
|
layer.close(loadIndex)
|
|
debugger
|
|
if (d.code == 0) {
|
|
if (d.type == 1) {
|
|
$("#preId").show();
|
|
document.getElementById('preId').innerHTML = d.data;
|
|
|
|
} else {
|
|
// var data = JSON.stringify(d.data, null, 4);
|
|
document.getElementById('preId').innerHTML = d.data;
|
|
$("#preId").show();
|
|
}
|
|
} else {
|
|
layer.alert('输入错误,请检查', { icon: 2 });
|
|
$("#preId").val('');
|
|
}
|
|
}
|
|
);
|
|
});
|
|
|
|
var packageIds
|
|
function getLocalTime(nS) {
|
|
return new Date(parseInt(nS) * 1000).toLocaleString().replace(/:\d{1,2}$/, ' ');
|
|
}
|
|
|
|
$(function () {
|
|
Load_realmlist();
|
|
});
|
|
|
|
</script>
|
|
<script src="../js/coupon.js"></script>
|
|
</div>
|
|
|
|
</body>
|
|
|
|
</html>
|