-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnetflow.html
61 lines (51 loc) · 1.64 KB
/
netflow.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
60
61
<!DOCTYPE html>
<html lang="zh-tw">
<head>
<meta charset="utf-8">
<title>Vue.js for watching netflow of NTUST</title>
<!-- Import CSS -->
<link rel="stylesheet" href="style.css">
<!-- Import newest Vue.js -->
<script src="https://cdn.jsdelivr.net/npm/vue"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
</head>
<body>
<div id='header'>
<ul>
<header-items v-for=" i in List" v-bind:header="i" v-bind:key="i.id">
</header-items>
</ul>
</div>
<hr>
<!-- xxx -->
<h1>Netflow watcher of NTUST, made with Vue.js</h1>
<!-- Time -->
<h3>
<div id="time"></div>
</h3>
<!-- Time -->
<script>
function updateClock() {
var now = new Date()
time = now.getHours() + ':' + now.getMinutes() + ':' + now.getSeconds() // again, you get the idea
// a cleaner way than string concatenation
var now = new Date(Date.now());
var today = now.toLocaleDateString("zh-TW")
// set the content of the element with the ID time to the formatted string
document.getElementById('time').innerHTML = [today, time].join(' ');
// call this function again in 1000ms
setTimeout(updateClock, 1000);
}
updateClock();
</script>
<div id='ips'>
<!-- <button v-on:click="getflow">Get flow</button> -->
<ul>
<ips v-for="i in List" v-bind:ip="i">
</ips>
</ul>
</div>
<!-- Load my Vue.js functions -->
<script src="netflow.js"></script>
</body>
</html>