dxsync/status/index.html

107 lines
3.5 KiB
HTML
Raw Normal View History

2023-05-12 15:21:12 +08:00
<!DOCTYPE html>
<html lang="zh-cn">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link
href="https://fonts.loli.net/css?family=Open+Sans:300,400,700|Ubuntu:300|Consolas"
rel="stylesheet"
type="text/css"
/>
<link
href="https://cdn.staticfile.org/font-awesome/4.7.0/css/font-awesome.min.css"
rel="stylesheet"
type="text/css"
/>
<link
href="https://tools.beardic.cn/css/page.css"
rel="stylesheet"
type="text/css"
/>
<link
rel="icon"
href="https://tools.beardic.cn/icon/favicon_32.png"
sizes="32x32"
/>
<link
rel="icon"
href="https://tools.beardic.cn/icon/favicon_192.png"
sizes="192x192"
/>
<link
rel="icon"
href="https://tools.beardic.cn/icon/favicon.png"
sizes="512x512"
/>
<link rel="apple-touch-icon-precomposed" href="/icon/favicon_180.png" />
<meta name="msapplication-TileImage" content="/icon/favicon_270.png" />
<script src="https://cdn.staticfile.org/jquery/3.3.1/jquery.min.js"></script>
<script src="https://tools.beardic.cn/js/pagemap.min.js"></script>
<script src="https://tools.beardic.cn/js/page.js"></script>
2023-05-17 11:52:10 +08:00
<title>Status of Mirrors</title>
2023-05-12 15:21:12 +08:00
</head>
<body>
<section class="container md-shadow">
<article>
<header>
2023-05-17 11:52:10 +08:00
<h1><span id="hostname"></span>/mirrors: status</h1>
2023-05-12 15:21:12 +08:00
</header>
<table align="center">
<thead>
<tr>
<th>mirror</th>
<th>size</th>
<th>last update</th>
<th>status</th>
</tr>
</thead>
<tbody align="center" id="mirror_list">
</tbody>
</table>
<footer>
<p></p>
</footer>
</article>
</section>
<script>
2023-05-17 11:52:10 +08:00
$("#hostname").text(window.location.hostname);
2023-05-12 16:02:26 +08:00
$.get("index", function(data){
2023-05-12 18:10:00 +08:00
const list = data.split('\n')
2023-05-12 16:02:26 +08:00
for (i in list) {
2023-05-12 18:10:00 +08:00
const name=list[i]
2023-05-12 16:02:26 +08:00
if (name.length == 0) {
continue;
}
2023-05-12 18:10:00 +08:00
const safe_name = name.replace(/\//g, "_");
2023-05-12 18:04:25 +08:00
$.get(safe_name + ".log", function (data) {
2023-05-12 15:21:12 +08:00
var data = data.split("\n");
2023-05-12 18:10:00 +08:00
const line_header =
2023-05-12 18:04:25 +08:00
"<td><a href='../" + name + "'>" + name + "</a></td>";
2023-05-12 16:02:26 +08:00
for (j in data) {
if (data[j] != "") {
data[j] = "<td>" + data[j] + "</td>";
2023-05-12 15:21:12 +08:00
}
}
$("#mirror_list").append(
2023-05-12 18:04:25 +08:00
"<tr id='" + safe_name + "'>" +
line_header + data.join("") +
"</tr>"
2023-05-12 15:21:12 +08:00
);
console.log(data);
});
2023-05-12 16:02:26 +08:00
}
})
2023-05-12 15:21:12 +08:00
</script>
<div hidden id="bottom-bar">
<p>2023 - ©BearDic.cn</p>
</div>
</body>
</html>