results.html 2.8 KB

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