-
Notifications
You must be signed in to change notification settings - Fork 2
/
Default.htm
46 lines (39 loc) · 1.08 KB
/
Default.htm
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
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>TQ Memory Stats</title>
<style>
iframe {
display: block; /* iframes are inline by default */
border: none; /* Reset default border */
height: 85vh; /* Viewport-relative units */
width: 90vw;
}
</style>
</head>
<body>
<h1>ThreatQ Performance Metric</h1>
<div class="select-container"></div>
<iframe id="myIframe" src="./blank.html"></iframe>
<script src="http://d3js.org/d3.v3.js"></script>
<script>
d3.csv("graphList.csv", function(error, data) {
var select = d3.select(".select-container")
.append("select");
select
.on("change", function(d) {
var theSelect = d3.select(this).property("value");
var theIframe = document.getElementById('myIframe');
var theUrl;
theUrl = theSelect
theIframe.src = theUrl;
});
select.selectAll("option")
.data(data)
.enter()
.append("option")
.attr("value", function (d) { return d.value; })
.text(function (d) { return d.label; });
});
</script>
</body>
</html>