-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.html
More file actions
151 lines (129 loc) · 5.46 KB
/
test.html
File metadata and controls
151 lines (129 loc) · 5.46 KB
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
<!DOCTYPE html>
<!-- saved from url=(0064)https://getbootstrap.com/docs/5.1/examples/sticky-footer-navbar/ -->
<html lang="en" class="h-100"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>du2html</title>
<!-- Bootstrap core CSS -->
<link
href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3"
crossorigin="anonymous"
/>
<link href="https://cdn.jsdelivr.net/npm/jquery-treegrid@0.3.0/css/jquery.treegrid.css" rel="stylesheet" />
<link href="https://unpkg.com/bootstrap-table@1.19.1/dist/bootstrap-table.min.css" rel="stylesheet" />
<script src="https://code.jquery.com/jquery-3.6.0.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/jquery-treegrid@0.3.0/js/jquery.treegrid.min.js"></script>
<script src="https://unpkg.com/bootstrap-table@1.19.1/dist/bootstrap-table.min.js"></script>
<script src="https://unpkg.com/bootstrap-table@1.19.1/dist/extensions/treegrid/bootstrap-table-treegrid.min.js"></script>
<meta name="theme-color" content="#7952b3">
<style>
.bd-placeholder-img {
font-size: 1.125rem;
text-anchor: middle;
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
}
@media (min-width: 768px) {
.bd-placeholder-img-lg {
font-size: 3.5rem;
}
}
main > .container {
padding: 60px 15px 0;
}
</style>
</head>
<body class="d-flex flex-column h-100">
<header>
<!-- Fixed navbar -->
<nav class="navbar navbar-expand-md navbar-dark fixed-top bg-dark">
<div class="container-fluid">
<a class="navbar-brand" href="https://github.com/danielmsk/du2html" target="_blank">du2html</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<!-- <div class="collapse navbar-collapse" id="navbarCollapse">
<ul class="navbar-nav me-auto mb-2 mb-md-0">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="https://getbootstrap.com/docs/5.1/examples/sticky-footer-navbar/#">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="https://getbootstrap.com/docs/5.1/examples/sticky-footer-navbar/#">Link</a>
</li>
<li class="nav-item">
<a class="nav-link disabled">Disabled</a>
</li>
</ul>
<form class="d-flex">
<input class="form-control me-2" type="search" placeholder="Search" aria-label="Search">
<button class="btn btn-outline-success" type="submit">Search</button>
</form>
</div> -->
</div>
</nav>
</header>
<!-- Begin page content -->
<main class="flex-shrink-0">
<div class="container">
<h1 class="mt-5">./test/du_20220413.txt</h1>
<p class="lead">
<div>Root path: .</div>
<div>TOTAL USAGE: 84.2GB / 372321321132</div>
<table id="table"></table>
</p>
</div>
</main>
<script>
var $table = $("#table")
$(function () {
var data = [{"id": 11, "name": "./daniel", "hsize": "82.7GB"}, {"id": 8, "name": "./daniel/test1", "hsize": "82.3GB", "pid": 11}, {"id": 9, "name": "./daniel/test3", "hsize": "384.2MB", "pid": 11}, {"id": 10, "name": "./daniel/test2", "hsize": "89.6MB", "pid": 11}, {"id": 4, "name": "./lee", "hsize": "632.9MB"}, {"id": 2, "name": "./lee/leeiu", "hsize": "331.8MB", "pid": 4}, {"id": 1, "name": "./lee/leejh", "hsize": "293.0MB", "pid": 4}, {"id": 3, "name": "./lee/leehj", "hsize": "8.1MB", "pid": 4}, {"id": 7, "name": "./jisoo", "hsize": "421.4MB"}, {"id": 6, "name": "./jisoo/j2", "hsize": "384.2MB", "pid": 7}, {"id": 5, "name": "./jisoo/j1", "hsize": "37.1MB", "pid": 7}, {"id": 12, "name": "./mark", "hsize": "245.6MB"}, {"id": 13, "name": "./tim", "hsize": "241.2MB"}]
$table.bootstrapTable({
// url: "json/treegrid.json",
data: data,
idField: "id",
showColumns: false,
columns: [
//{
// field: "ck",
// checkbox: true,
//},
{
field: "name",
title: "Path",
},
{
field: "hsize",
title: "Size",
align: "right",
},
//{
// field: "per",
// title: "Percentage",
// align: "right",
//},
],
treeShowField: "name",
parentIdField: "pid",
onPostBody: function () {
var columns = $table.bootstrapTable("getOptions").columns
if (columns && columns[0][1].visible) {
$table.treegrid({
treeColumn: 0,
initialState: 'collapsed',
onChange: function () {
$table.bootstrapTable("resetView")
},
})
}
},
})
})
</script>
<footer class="footer mt-auto py-3 bg-light">
<div class="container">
<span class="text-muted">du2html v0.0.5</span>
</div>
</footer>
<!-- <script src="./Sticky Footer Navbar Template · Bootstrap v5.1_files/bootstrap.bundle.min.js" integrity="sha384-ka7Sk0Gln4gmtz2MlQnikT1wXgYsOg+OMhuP+IlRH9sENBO0LRn5q+8nbTov4+1p" crossorigin="anonymous"></script> -->
</body></html>