forked from BadApple9/speedtest-x
-
Notifications
You must be signed in to change notification settings - Fork 0
/
results.html
59 lines (53 loc) · 2.25 KB
/
results.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>测速结果 | speedtest-x</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" href="https://lib.baomitu.com/layui/2.5.7/css/layui.css" media="all">
<style>
.footer {line-height: 30px; text-align: center;}
.footer a{padding:0 6px; font-weight: 300;}
.footer a:hover{color: green;}
.header {line-height: 30px; text-align: center;height:50px;padding-top:50px;margin-bottom: 10px;}
.header span>a {color:white;}
</style>
</head>
<body>
<div class="header">
<h1>speedtest-x 测速结果</h1>
<span class="layui-badge layui-bg-green"><a href="./chart.html" target="_blank">查看线性图表</a></span>
<a href="javascript:layer.tips('线性图表用于展示不同运营商在不同时段的速度表现,程序默认保留100条测速结果,可调大此数值以获得更准确的图表分析', '#tips', {
tips: [3, '#3595CC'],
time: 6000
});"><span id="tips" class="layui-badge layui-bg-black">?</span></a>
</div>
<table class="layui-hide" id="test"></table>
<div class="footer">
<a href="https://github.com/BadApple9/speedtest-x" target="_blank">speedtest-x 项目地址</a>
</div>
<script src="https://lib.baomitu.com/layui/2.5.7/layui.js" charset="utf-8"></script>
<script>
layui.use('table', function(){
var table = layui.table;
table.render({
elem: '#test'
,url:'./backend/results-api.php'
,cellMinWidth: 80
,cols: [[
{field:'ip', title: 'IP地址'}
,{field:'isp', title: '运营商'}
,{field:'addr', title: '城市'}
,{field:'dspeed', title: '下载速度 (Mbps)', sort: true, align: 'right'}
,{field:'uspeed', title: '上传速度 (Mbps)', sort: true, align: 'right'}
,{field:'ping', title: 'Ping (ms)', sort: true, align: 'right'}
,{field:'jitter', title: '抖动 (ms)', sort: true, align: 'right'}
,{field:'created', title: '测试时间', sort: true}
]]
});
});
</script>
</body>
</html>