-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
59 lines (55 loc) · 1.54 KB
/
index.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 lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Hello, Bootstrap Table!</title>
<link rel="stylesheet" href="static/bootstrap.min.css">
<link rel="stylesheet" href="static/bootstrap-table.min.css">
</head>
<body>
<table id="table">
</table>
<script src="static/jquery.min.js"></script>
<script src="static/popper.min.js"></script>
<script src="static/bootstrap.min.js"></script>
<script src="static/bootstrap-table.min.js"></script>
<script>
$.ajax({
method: "POST",
url: "http://127.0.0.1:6806/api/query/sql",
data: JSON.stringify({
"stmt": "SELECT * FROM blocks WHERE content LIKE'%content%' LIMIT 7"
})
}).done(result => {
console.log(result);
$('#table').bootstrapTable({
sortable: true,
columns: [{
field: 'id',
title: 'ID',
width: "100",
}, {
field: 'content',
title: 'Content',
width: "100",
}, {
field: 'type',
title: 'Type',
width: "20",
}, {
field: 'created',
title: 'Created',
width: "100",
}, {
field: 'updated',
title: 'Updated',
width: "100",
}
],
data: result.data,
});
})
</script>
</body>
</html>