This commit is contained in:
Kuoi 2022-07-20 08:48:33 +01:00 committed by GitHub
parent 0fdc58661b
commit b9e5375f72
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -3,15 +3,18 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>Archlinuxcn Currently Building Package</title> <title>bioarchlinux Currently Building Package</title>
<link rel="stylesheet" href="https://build.archlinuxcn.org/~imlonghao/static/1.10.20-jquery.dataTables.min.css"> <link rel="stylesheet" href="https://cdn.datatables.net/1.10.20/css/jquery.dataTables.min.css"
integrity="sha256-YY1izqyhIj4W3iyJOaGWOpXDSwrHWFL4Nfk+W0LyCHE=" crossorigin="anonymous">
</head> </head>
<body> <body>
<table id="l" class="stripe cell-border" style="text-align:center"> <table id="l" class="stripe cell-border" style="text-align:center">
</table> </table>
<script src="https://build.archlinuxcn.org/~imlonghao/static/3.4.1-jquery.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/jquery@3.4.1/dist/jquery.min.js"
<script src="https://build.archlinuxcn.org/~imlonghao/static/1.10.20-jquery.dataTables.min.js"></script> integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/datatables.net@1.10.20/js/jquery.dataTables.min.js"
integrity="sha256-LXQzPhL1IRyKkA7HpCOBi8I+OC8HqzHUYkjK8S+LKTs=" crossorigin="anonymous"></script>
<script> <script>
const DATE_FORMATTER = new Intl.DateTimeFormat(undefined, { const DATE_FORMATTER = new Intl.DateTimeFormat(undefined, {
timeStyle: "medium", timeStyle: "medium",
@ -21,7 +24,7 @@
$(document).ready(function () { $(document).ready(function () {
$('#l').DataTable({ $('#l').DataTable({
"ajax": { "ajax": {
url: "/imlonghao-api/current", url: "/api/current",
dataSrc: "" dataSrc: ""
}, },
"order": [[0, "desc"]], "order": [[0, "desc"]],
@ -29,7 +32,7 @@
"columnDefs": [ "columnDefs": [
{ {
targets: 0, targets: 0,
title: "更新时间", title: "Update Time",
data: "updated_at", data: "updated_at",
render: function (data, type, row, meta) { render: function (data, type, row, meta) {
if (type == 'display') { if (type == 'display') {
@ -41,22 +44,22 @@
}, },
{ {
targets: 1, targets: 1,
title: "包名", title: "Package Name",
data: "pkgbase" data: "pkgbase"
}, },
{ {
targets: 2, targets: 2,
title: "状态", title: "Status",
data: "status" data: "status"
}, },
{ {
targets: 3, targets: 3,
title: "上次打包时间", title: "Last Packaging Time",
data: "elapsed" data: "elapsed"
}, },
{ {
targets: 4, targets: 4,
title: "打包原因", title: "Packaging Reason",
data: "reasons", data: "reasons",
render: function (data, type, row, meta) { render: function (data, type, row, meta) {
return JSON.parse(data) return JSON.parse(data)
@ -68,4 +71,4 @@
</script> </script>
</body> </body>
</html> </html>