Mercurial > code > home > repos > homeauto
view 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 |
line wrap: on
line source
<!doctype html> <html> <head> <title>wifi</title> <meta charset="utf-8"> <script src="/rdf/common_paths_and_ns.js?v3"></script> <script type="module" src="build/wifi.bundle.js"></script> <link rel="stylesheet" href="/rdf/streamed-graph.css"> </head> <body class="rdfBrowsePage"> <streamed-graph url="/sse_collector/graph/network" graph="{{graph}}"></streamed-graph> <dom-bind> <style> #subjectRequest { width: 50em; } </style> <div id="out"></div> <script type="module"> import { render } from '/lib/lit-html/1.0.0/lit-html.js'; const sg = document.querySelector('streamed-graph'); const out = document.querySelector('#out'); const startPainting = () => { if (!sg.graph || !sg.graph.store) { setTimeout(startPainting, 100); return; } let dirty = true; const repaint = () => { if (!dirty) { return; } render(graphView(sg.graph.store, /*showGroups=*/false), out); dirty = false; }; sg.addEventListener('graph-changed', (ev) => { dirty = true; requestAnimationFrame(repaint); }); repaint(); }; setTimeout(startPainting, 10); document.querySelector('dom-bind').style.display = 'block'; // not sure why polymer hides this and never shows it </script> </dom-bind> <script> </script> <form method="POST" action="remoteSuspend"><button>Suspend windows/VR machine</button></form> <!-- also put wakeonlan actions down here --> </body> </html>