7 changed files with 50 additions and 48 deletions
@ -1,3 +1,4 @@ |
|||
/lib/ |
|||
/node_modules/ |
|||
/site/netgraph.js |
|||
/site/dygraph.min.js |
|||
|
@ -0,0 +1,4 @@ |
|||
#!/bin/sh |
|||
|
|||
# copy dygraph.min.js into site, and add one line that fixes an ES6 import bug. |
|||
cat node_modules/dygraphs/dist/dygraph.min.js | awk -e '/^\/\/\#/ { print "Dygraph.default = Dygraph;" } { print }' > site/dygraph.min.js |
@ -0,0 +1,39 @@ |
|||
<!doctype html> |
|||
<html> |
|||
<head> |
|||
<title> netgraph demo </title> |
|||
<script src="dygraph.min.js"></script> |
|||
<script src="netgraph.js"></script> |
|||
|
|||
<style type="text/css"> |
|||
.netgraph-group { |
|||
display: flex; |
|||
flex-direction: row; |
|||
margin-top: 1em; |
|||
margin-bottom: 1em; |
|||
width: 100%; |
|||
height: 15em; |
|||
} |
|||
|
|||
.netgraph { |
|||
display: flex; |
|||
flex: 1 1 auto; |
|||
width: 100%; |
|||
margin-left: 1em; |
|||
margin-right: 1em; |
|||
} |
|||
</style> |
|||
|
|||
<rrd name="ping" path="collectd/ping/ping-8.8.8.8.rrd" data="value:AVERAGE"></rrd> |
|||
<rrd name="ping-max" path="collectd/ping/ping-8.8.8.8.rrd" data="value:MAX"></rrd> |
|||
<rrd name="dropped" path="collectd/ping/ping_droprate-8.8.8.8.rrd" data="value:MAX"></rrd> |
|||
</head> |
|||
<body> |
|||
<h3> Latency to 8.8.8.8 </h3> |
|||
<div class="netgraph-group" line="ping, ping-max" error="dropped" error-threshold="0.5" unit="ms" colors="blue, red"> |
|||
<div class="netgraph" timespan="hour"></div> |
|||
<div class="netgraph" timespan="day"></div> |
|||
<div class="netgraph" timespan="week"></div> |
|||
</div> |
|||
</body> |
|||
</html> |
@ -1,19 +0,0 @@ |
|||
<!doctype html> |
|||
<html> |
|||
<head> |
|||
<script src="netgraph.js"></script> |
|||
<link rel="stylesheet" type="text/css" href="netgraph.css"></link> |
|||
|
|||
<rrd name="ping" path="data/ping/ping-8.8.8.8.rrd" data="value:AVERAGE"></rrd> |
|||
<rrd name="ping-max" path="data/ping/ping-8.8.8.8.rrd" data="value:MAX"></rrd> |
|||
<rrd name="dropped" path="data/ping/ping_droprate-8.8.8.8.rrd" data="value:MAX"></rrd> |
|||
</head> |
|||
<body> |
|||
<h3> Latency to 8.8.8.8 </h3> |
|||
<div class="graph-row" line="ping, ping-max" error="dropped" error-threshold="0.5" unit="ms" colors="red, orange"> |
|||
<div class="graph" timespan="hour"></div> |
|||
<div class="graph" timespan="day"></div> |
|||
<div class="graph" timespan="week"></div> |
|||
</div> |
|||
</body> |
|||
</html> |
@ -1,16 +0,0 @@ |
|||
.graph-row { |
|||
display: flex; |
|||
flex-direction: row; |
|||
margin-top: 1em; |
|||
margin-bottom: 1em; |
|||
width: 100%; |
|||
height: 15em; |
|||
} |
|||
|
|||
.graph { |
|||
display: flex; |
|||
flex: 1 1 auto; |
|||
width: 100%; |
|||
margin-left: 1em; |
|||
margin-right: 1em; |
|||
} |
Loading…
Reference in new issue