Mercurial > code > home > repos > homeauto
annotate service/wifi/index.html @ 1464:32d134dbfb1e
start ts config files, but this doesn't share the streamed-graph code properly yet
Ignore-this: ef4e6fdf3369939b062caa5fdc2788e9
darcs-hash:e30e71ea5e8e9958c254c9210cdccde7a74b96bb
author | drewp <drewp@bigasterisk.com> |
---|---|
date | Tue, 17 Dec 2019 23:16:53 -0800 |
parents | 517cbb905d4c |
children | 4bbc68603168 |
rev | line source |
---|---|
1223 | 1 <!doctype html> |
2 <html> | |
1444 | 3 |
4 <head> | |
5 <title>wifi</title> | |
6 <meta charset="utf-8"> | |
1464
32d134dbfb1e
start ts config files, but this doesn't share the streamed-graph code properly yet
drewp <drewp@bigasterisk.com>
parents:
1461
diff
changeset
|
7 <script src="/rdf/common_paths_and_ns.js?v3"></script> |
32d134dbfb1e
start ts config files, but this doesn't share the streamed-graph code properly yet
drewp <drewp@bigasterisk.com>
parents:
1461
diff
changeset
|
8 <script type="module" src="build/wifi.bundle.js"></script> |
32d134dbfb1e
start ts config files, but this doesn't share the streamed-graph code properly yet
drewp <drewp@bigasterisk.com>
parents:
1461
diff
changeset
|
9 <link rel="stylesheet" href="/rdf/streamed-graph.css"> |
1444 | 10 </head> |
11 | |
12 <body class="rdfBrowsePage"> | |
1464
32d134dbfb1e
start ts config files, but this doesn't share the streamed-graph code properly yet
drewp <drewp@bigasterisk.com>
parents:
1461
diff
changeset
|
13 <streamed-graph url="/sse_collector/graph/network" graph="{{graph}}"></streamed-graph> |
1461
517cbb905d4c
remote suspend, wifi group arg
drewp <drewp@bigasterisk.com>
parents:
1444
diff
changeset
|
14 |
1464
32d134dbfb1e
start ts config files, but this doesn't share the streamed-graph code properly yet
drewp <drewp@bigasterisk.com>
parents:
1461
diff
changeset
|
15 <dom-bind> |
32d134dbfb1e
start ts config files, but this doesn't share the streamed-graph code properly yet
drewp <drewp@bigasterisk.com>
parents:
1461
diff
changeset
|
16 <style> |
32d134dbfb1e
start ts config files, but this doesn't share the streamed-graph code properly yet
drewp <drewp@bigasterisk.com>
parents:
1461
diff
changeset
|
17 #subjectRequest { |
32d134dbfb1e
start ts config files, but this doesn't share the streamed-graph code properly yet
drewp <drewp@bigasterisk.com>
parents:
1461
diff
changeset
|
18 width: 50em; |
32d134dbfb1e
start ts config files, but this doesn't share the streamed-graph code properly yet
drewp <drewp@bigasterisk.com>
parents:
1461
diff
changeset
|
19 } |
1444 | 20 </style> |
1464
32d134dbfb1e
start ts config files, but this doesn't share the streamed-graph code properly yet
drewp <drewp@bigasterisk.com>
parents:
1461
diff
changeset
|
21 <div id="out"></div> |
1223 | 22 |
1444 | 23 <script type="module"> |
24 import { render } from '/lib/lit-html/1.0.0/lit-html.js'; | |
25 const sg = document.querySelector('streamed-graph'); | |
26 | |
27 const out = document.querySelector('#out'); | |
28 const startPainting = () => { | |
1464
32d134dbfb1e
start ts config files, but this doesn't share the streamed-graph code properly yet
drewp <drewp@bigasterisk.com>
parents:
1461
diff
changeset
|
29 if (!sg.graph || !sg.graph.store) { |
1444 | 30 setTimeout(startPainting, 100); |
31 return; | |
32 } | |
33 | |
34 let dirty = true; | |
1223 | 35 |
1444 | 36 const repaint = () => { |
37 if (!dirty) { | |
38 return; | |
39 } | |
1464
32d134dbfb1e
start ts config files, but this doesn't share the streamed-graph code properly yet
drewp <drewp@bigasterisk.com>
parents:
1461
diff
changeset
|
40 render(graphView(sg.graph.store, /*showGroups=*/false), out); |
1444 | 41 dirty = false; |
42 }; | |
1223 | 43 |
1444 | 44 sg.addEventListener('graph-changed', (ev) => { |
45 dirty = true; | |
46 requestAnimationFrame(repaint); | |
47 }); | |
48 repaint(); | |
49 }; | |
50 setTimeout(startPainting, 10); | |
1464
32d134dbfb1e
start ts config files, but this doesn't share the streamed-graph code properly yet
drewp <drewp@bigasterisk.com>
parents:
1461
diff
changeset
|
51 document.querySelector('dom-bind').style.display = 'block'; // not sure why polymer hides this and never shows it |
1444 | 52 </script> |
1464
32d134dbfb1e
start ts config files, but this doesn't share the streamed-graph code properly yet
drewp <drewp@bigasterisk.com>
parents:
1461
diff
changeset
|
53 </dom-bind> |
1444 | 54 <script> |
55 | |
56 </script> | |
1461
517cbb905d4c
remote suspend, wifi group arg
drewp <drewp@bigasterisk.com>
parents:
1444
diff
changeset
|
57 |
517cbb905d4c
remote suspend, wifi group arg
drewp <drewp@bigasterisk.com>
parents:
1444
diff
changeset
|
58 <form method="POST" action="remoteSuspend"><button>Suspend windows/VR machine</button></form> |
517cbb905d4c
remote suspend, wifi group arg
drewp <drewp@bigasterisk.com>
parents:
1444
diff
changeset
|
59 <!-- also put wakeonlan actions down here --> |
517cbb905d4c
remote suspend, wifi group arg
drewp <drewp@bigasterisk.com>
parents:
1444
diff
changeset
|
60 |
1444 | 61 </body> |
62 | |
1464
32d134dbfb1e
start ts config files, but this doesn't share the streamed-graph code properly yet
drewp <drewp@bigasterisk.com>
parents:
1461
diff
changeset
|
63 </html> |