-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
77 lines (68 loc) · 2.18 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link href="netjsongraph.js/src/netjsongraph.css" rel="stylesheet">
<!-- custom theme example -->
<style type="text/css">
body {
font-family: Arial, sans-serif;
font-size: 13px;
}
.njg-overlay {
width: auto;
height: auto;
min-width: 200px;
max-width: 400px;
border: 1px solid #000;
border-radius: 2px;
background: rgba(0, 0, 0, 0.7);
top: 10px;
right: 10px;
padding: 0 15px;
font-family: Arial, sans-serif;
font-size: 14px;
color: #fff
}
.njg-node {
fill: #008000;
fill-opacity: 0.8;
stroke: #008000;
stroke-width: 1px;
cursor: pointer;
}
.njg-node:hover,
.njg-node.njg-open {
fill-opacity: 1;
}
.njg-link {
stroke: #00ff00;
stroke-width: 2;
stroke-opacity: .5;
cursor: pointer;
}
.njg-link:hover,
.njg-link.njg-open {
stroke-width: 3;
stroke-opacity: 1
}
</style>
</head>
<body>
<h1>
View of the 802.15.4 network from the <a href="./netjson.json" target="_blank">./netjson.json</a> <span
id="h1-date-time"></span>
</h1>
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.17/d3.min.js"
integrity="sha512-oJp0DdQuQQrRsKVly+Ww6fAN1GwJN7d1bi8UubpEbzDUh84WrJ2CFPBnT4LqBCcfqTcHR5OGXFFhaPe3g1/bzQ=="
crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="netjsongraph.js/src/netjsongraph.js"></script>
<script>
d3.netJsonGraph("netjson.json");
let months = ['January', 'February', 'March', 'April', 'May', 'June', 'July',
'August', 'September', 'October', 'November', 'December'];
let now = new Date();
document.getElementById("h1-date-time").innerHTML = `${now.getHours()}:${now.getMinutes()}, ${now.getDate()} ${months[now.getMonth()]} ${now.getFullYear()}`;
</script>
</body>
</html>