-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
44 lines (32 loc) · 929 Bytes
/
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
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<title>Main</title>
<style>body { padding: 0; margin: 0; }</style>
<script src="elm.js"></script>
<!-- These scripts link to the Vega/Vega-Lite runtime -->
<script src="https://cdn.jsdelivr.net/npm/vega@5"></script>
<script src="https://cdn.jsdelivr.net/npm/vega-lite@4"></script>
<script src="https://cdn.jsdelivr.net/npm/vega-embed@6"></script>
</head>
<body>
<div id="elm-app"></div>
<div id="outages-counts-summary"></div>
<div id="outages-lengths-summary"></div>
<script>
Elm.Main
.init({
node: document.getElementById("elm-app")
})
.ports.elmToJS.subscribe(function(namedSpecs) {
for (let name of Object.keys(namedSpecs)) {
vegaEmbed(`#${name}`, namedSpecs[name], {
actions: false,
logLevel: vega.Warn
}).catch(console.warn);
}
});
</script>
</body>
</html>