Mercurial > code > home > repos > homeauto
annotate service/wifi/index.html @ 672:f424809cba8d
npm run build works now, accessing streamed-graph. But, s-g isn't in the output bundle yet.
Ignore-this: 2b08220ad8d275f4dd242c3aa1a8647a
author | drewp@bigasterisk.com |
---|---|
date | Sun, 29 Dec 2019 19:41:48 -0800 |
parents | 540dd68af9f2 |
children | f2215949c0c9 |
rev | line source |
---|---|
175
c81a451f9b26
rewrites for better graph export, removal of dhcp reader
drewp@bigasterisk.com
parents:
diff
changeset
|
1 <!doctype html> |
c81a451f9b26
rewrites for better graph export, removal of dhcp reader
drewp@bigasterisk.com
parents:
diff
changeset
|
2 <html> |
641
5fd7aef3b2b2
index page updates. include wifi badg data.
drewp@bigasterisk.com
parents:
428
diff
changeset
|
3 |
5fd7aef3b2b2
index page updates. include wifi badg data.
drewp@bigasterisk.com
parents:
428
diff
changeset
|
4 <head> |
5fd7aef3b2b2
index page updates. include wifi badg data.
drewp@bigasterisk.com
parents:
428
diff
changeset
|
5 <title>wifi</title> |
5fd7aef3b2b2
index page updates. include wifi badg data.
drewp@bigasterisk.com
parents:
428
diff
changeset
|
6 <meta charset="utf-8"> |
662
540dd68af9f2
start ts config files, but this doesn't share the streamed-graph code properly yet
drewp@bigasterisk.com
parents:
659
diff
changeset
|
7 <script src="/rdf/common_paths_and_ns.js?v3"></script> |
540dd68af9f2
start ts config files, but this doesn't share the streamed-graph code properly yet
drewp@bigasterisk.com
parents:
659
diff
changeset
|
8 <script type="module" src="build/wifi.bundle.js"></script> |
540dd68af9f2
start ts config files, but this doesn't share the streamed-graph code properly yet
drewp@bigasterisk.com
parents:
659
diff
changeset
|
9 <link rel="stylesheet" href="/rdf/streamed-graph.css"> |
641
5fd7aef3b2b2
index page updates. include wifi badg data.
drewp@bigasterisk.com
parents:
428
diff
changeset
|
10 </head> |
5fd7aef3b2b2
index page updates. include wifi badg data.
drewp@bigasterisk.com
parents:
428
diff
changeset
|
11 |
5fd7aef3b2b2
index page updates. include wifi badg data.
drewp@bigasterisk.com
parents:
428
diff
changeset
|
12 <body class="rdfBrowsePage"> |
659 | 13 |
662
540dd68af9f2
start ts config files, but this doesn't share the streamed-graph code properly yet
drewp@bigasterisk.com
parents:
659
diff
changeset
|
14 <dom-bind> |
672
f424809cba8d
npm run build works now, accessing streamed-graph. But, s-g isn't in the output bundle yet.
drewp@bigasterisk.com
parents:
662
diff
changeset
|
15 |
f424809cba8d
npm run build works now, accessing streamed-graph. But, s-g isn't in the output bundle yet.
drewp@bigasterisk.com
parents:
662
diff
changeset
|
16 |
662
540dd68af9f2
start ts config files, but this doesn't share the streamed-graph code properly yet
drewp@bigasterisk.com
parents:
659
diff
changeset
|
17 <style> |
540dd68af9f2
start ts config files, but this doesn't share the streamed-graph code properly yet
drewp@bigasterisk.com
parents:
659
diff
changeset
|
18 #subjectRequest { |
540dd68af9f2
start ts config files, but this doesn't share the streamed-graph code properly yet
drewp@bigasterisk.com
parents:
659
diff
changeset
|
19 width: 50em; |
540dd68af9f2
start ts config files, but this doesn't share the streamed-graph code properly yet
drewp@bigasterisk.com
parents:
659
diff
changeset
|
20 } |
641
5fd7aef3b2b2
index page updates. include wifi badg data.
drewp@bigasterisk.com
parents:
428
diff
changeset
|
21 </style> |
672
f424809cba8d
npm run build works now, accessing streamed-graph. But, s-g isn't in the output bundle yet.
drewp@bigasterisk.com
parents:
662
diff
changeset
|
22 |
f424809cba8d
npm run build works now, accessing streamed-graph. But, s-g isn't in the output bundle yet.
drewp@bigasterisk.com
parents:
662
diff
changeset
|
23 <streamed-graph url="/sse_collector/graph/network" graph="{{graph}}"></streamed-graph> |
f424809cba8d
npm run build works now, accessing streamed-graph. But, s-g isn't in the output bundle yet.
drewp@bigasterisk.com
parents:
662
diff
changeset
|
24 |
f424809cba8d
npm run build works now, accessing streamed-graph. But, s-g isn't in the output bundle yet.
drewp@bigasterisk.com
parents:
662
diff
changeset
|
25 <wifi-table graph="{{graph}}" show-groups="true"></wifi-table> |
175
c81a451f9b26
rewrites for better graph export, removal of dhcp reader
drewp@bigasterisk.com
parents:
diff
changeset
|
26 |
641
5fd7aef3b2b2
index page updates. include wifi badg data.
drewp@bigasterisk.com
parents:
428
diff
changeset
|
27 <script type="module"> |
5fd7aef3b2b2
index page updates. include wifi badg data.
drewp@bigasterisk.com
parents:
428
diff
changeset
|
28 import { render } from '/lib/lit-html/1.0.0/lit-html.js'; |
5fd7aef3b2b2
index page updates. include wifi badg data.
drewp@bigasterisk.com
parents:
428
diff
changeset
|
29 const sg = document.querySelector('streamed-graph'); |
5fd7aef3b2b2
index page updates. include wifi badg data.
drewp@bigasterisk.com
parents:
428
diff
changeset
|
30 |
5fd7aef3b2b2
index page updates. include wifi badg data.
drewp@bigasterisk.com
parents:
428
diff
changeset
|
31 const out = document.querySelector('#out'); |
5fd7aef3b2b2
index page updates. include wifi badg data.
drewp@bigasterisk.com
parents:
428
diff
changeset
|
32 const startPainting = () => { |
662
540dd68af9f2
start ts config files, but this doesn't share the streamed-graph code properly yet
drewp@bigasterisk.com
parents:
659
diff
changeset
|
33 if (!sg.graph || !sg.graph.store) { |
641
5fd7aef3b2b2
index page updates. include wifi badg data.
drewp@bigasterisk.com
parents:
428
diff
changeset
|
34 setTimeout(startPainting, 100); |
5fd7aef3b2b2
index page updates. include wifi badg data.
drewp@bigasterisk.com
parents:
428
diff
changeset
|
35 return; |
5fd7aef3b2b2
index page updates. include wifi badg data.
drewp@bigasterisk.com
parents:
428
diff
changeset
|
36 } |
5fd7aef3b2b2
index page updates. include wifi badg data.
drewp@bigasterisk.com
parents:
428
diff
changeset
|
37 |
5fd7aef3b2b2
index page updates. include wifi badg data.
drewp@bigasterisk.com
parents:
428
diff
changeset
|
38 let dirty = true; |
175
c81a451f9b26
rewrites for better graph export, removal of dhcp reader
drewp@bigasterisk.com
parents:
diff
changeset
|
39 |
641
5fd7aef3b2b2
index page updates. include wifi badg data.
drewp@bigasterisk.com
parents:
428
diff
changeset
|
40 const repaint = () => { |
5fd7aef3b2b2
index page updates. include wifi badg data.
drewp@bigasterisk.com
parents:
428
diff
changeset
|
41 if (!dirty) { |
5fd7aef3b2b2
index page updates. include wifi badg data.
drewp@bigasterisk.com
parents:
428
diff
changeset
|
42 return; |
5fd7aef3b2b2
index page updates. include wifi badg data.
drewp@bigasterisk.com
parents:
428
diff
changeset
|
43 } |
662
540dd68af9f2
start ts config files, but this doesn't share the streamed-graph code properly yet
drewp@bigasterisk.com
parents:
659
diff
changeset
|
44 render(graphView(sg.graph.store, /*showGroups=*/false), out); |
641
5fd7aef3b2b2
index page updates. include wifi badg data.
drewp@bigasterisk.com
parents:
428
diff
changeset
|
45 dirty = false; |
5fd7aef3b2b2
index page updates. include wifi badg data.
drewp@bigasterisk.com
parents:
428
diff
changeset
|
46 }; |
175
c81a451f9b26
rewrites for better graph export, removal of dhcp reader
drewp@bigasterisk.com
parents:
diff
changeset
|
47 |
641
5fd7aef3b2b2
index page updates. include wifi badg data.
drewp@bigasterisk.com
parents:
428
diff
changeset
|
48 sg.addEventListener('graph-changed', (ev) => { |
5fd7aef3b2b2
index page updates. include wifi badg data.
drewp@bigasterisk.com
parents:
428
diff
changeset
|
49 dirty = true; |
5fd7aef3b2b2
index page updates. include wifi badg data.
drewp@bigasterisk.com
parents:
428
diff
changeset
|
50 requestAnimationFrame(repaint); |
5fd7aef3b2b2
index page updates. include wifi badg data.
drewp@bigasterisk.com
parents:
428
diff
changeset
|
51 }); |
5fd7aef3b2b2
index page updates. include wifi badg data.
drewp@bigasterisk.com
parents:
428
diff
changeset
|
52 repaint(); |
5fd7aef3b2b2
index page updates. include wifi badg data.
drewp@bigasterisk.com
parents:
428
diff
changeset
|
53 }; |
5fd7aef3b2b2
index page updates. include wifi badg data.
drewp@bigasterisk.com
parents:
428
diff
changeset
|
54 setTimeout(startPainting, 10); |
662
540dd68af9f2
start ts config files, but this doesn't share the streamed-graph code properly yet
drewp@bigasterisk.com
parents:
659
diff
changeset
|
55 document.querySelector('dom-bind').style.display = 'block'; // not sure why polymer hides this and never shows it |
641
5fd7aef3b2b2
index page updates. include wifi badg data.
drewp@bigasterisk.com
parents:
428
diff
changeset
|
56 </script> |
662
540dd68af9f2
start ts config files, but this doesn't share the streamed-graph code properly yet
drewp@bigasterisk.com
parents:
659
diff
changeset
|
57 </dom-bind> |
641
5fd7aef3b2b2
index page updates. include wifi badg data.
drewp@bigasterisk.com
parents:
428
diff
changeset
|
58 <script> |
5fd7aef3b2b2
index page updates. include wifi badg data.
drewp@bigasterisk.com
parents:
428
diff
changeset
|
59 |
5fd7aef3b2b2
index page updates. include wifi badg data.
drewp@bigasterisk.com
parents:
428
diff
changeset
|
60 </script> |
659 | 61 |
62 <form method="POST" action="remoteSuspend"><button>Suspend windows/VR machine</button></form> | |
63 <!-- also put wakeonlan actions down here --> | |
64 | |
641
5fd7aef3b2b2
index page updates. include wifi badg data.
drewp@bigasterisk.com
parents:
428
diff
changeset
|
65 </body> |
5fd7aef3b2b2
index page updates. include wifi badg data.
drewp@bigasterisk.com
parents:
428
diff
changeset
|
66 |
672
f424809cba8d
npm run build works now, accessing streamed-graph. But, s-g isn't in the output bundle yet.
drewp@bigasterisk.com
parents:
662
diff
changeset
|
67 </html> |