Mercurial > code > home > repos > homeauto
diff service/wifi/index.html @ 1474:f91ba30b4f75
build adjustments. now seems to read streamedgraph correctly.
Ignore-this: 2768ea249aefb81d4720607e815d77c1
darcs-hash:7414b3c41ebf8a76d651de848a5db99e919bb644
author | drewp <drewp@bigasterisk.com> |
---|---|
date | Tue, 31 Dec 2019 02:45:25 -0800 |
parents | 4bbc68603168 |
children | 2e598cbcabf4 |
line wrap: on
line diff
--- a/service/wifi/index.html Sun Dec 29 19:41:48 2019 -0800 +++ b/service/wifi/index.html Tue Dec 31 02:45:25 2019 -0800 @@ -1,67 +1,43 @@ -<!doctype html> +<!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"> - - <dom-bind> - - - <style> - #subjectRequest { - width: 50em; - } - </style> - - <streamed-graph url="/sse_collector/graph/network" graph="{{graph}}"></streamed-graph> - - <wifi-table graph="{{graph}}" show-groups="true"></wifi-table> - - <script type="module"> - import { render } from '/lib/lit-html/1.0.0/lit-html.js'; - const sg = document.querySelector('streamed-graph'); + <head> + <title>wifi</title> + <meta charset="utf-8" /> + <script src="/rdf/common_paths_and_ns.js?v3"></script> + <link rel="stylesheet" href="/rdf/streamed-graph.css" /> + </head> - const out = document.querySelector('#out'); - const startPainting = () => { - if (!sg.graph || !sg.graph.store) { - setTimeout(startPainting, 100); - return; + <body class="rdfBrowsePage"> + pre dombind + <dom-bind> + inside dombind + <style> + #subjectRequest { + width: 50em; } - - let dirty = true; - - const repaint = () => { - if (!dirty) { - return; - } - render(graphView(sg.graph.store, /*showGroups=*/false), out); - dirty = false; - }; + </style> +sg: + <streamed-graph + url="graph/events" + realurl="sse_collector/graph/network" + static="['demo.n3']" + graph="{{graph}}" + ></streamed-graph> - 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 + wifi-display: + <wifi-display graph="{{graph}}" show-groups="true"></wifi-display> + + </dom-bind> + <form method="POST" action="remoteSuspend"> + <button>Suspend windows/VR machine</button> + </form> + <!-- also put wakeonlan actions down here --> + + <script type="module" src="build/bundle.js"></script> + <script type="module"> + 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> - + + </body> </html>