Mercurial > code > home > repos > homeauto
view service/arduinoNode/static/index.html @ 976:6754aa8aab38
clean up rdf-observe demo ui
Ignore-this: 8795333fe63ccd47e8c3e9584efaa43d
darcs-hash:20150414090151-312f9-dffbf118217e3d5080b5f87a0731659c1028784e
author | drewp <drewp@bigasterisk.com> |
---|---|
date | Tue, 14 Apr 2015 02:01:51 -0700 |
parents | f3023410d875 |
children | 0daa8cbbd8f6 |
line wrap: on
line source
<!doctype html> <html> <head> <title>arduinoNode</title> <meta charset="utf-8" /> <link rel="import" href="/lib/polymer/0.5.2/polymer/polymer.html"> <link rel="import" href="/lib/polymer/0.5.2/core-ajax/core-ajax.html"> <link rel="import" href="/room/ari/static/rdf-observe.html"> <link rel="import" href="/room/ari/static/rdf-oneshot.html"> <link rel="import" href="static/output-widgets.html"> <style> body { font-family: monospace; } </style> </head> <body layout vertical fullbleed> <script> window.NS = { dev: 'http://projects.bigasterisk.com/device/', room: 'http://projects.bigasterisk.com/room/', rdfs: 'http://www.w3.org/2000/01/rdf-schema#', }; </script> <polymer-element name="linked-uri" noscript attributes="href"> <template> <a href="{{href}}">{{href}}</a> </template> </polymer-element> <polymer-element name="arduinonode-boards" noscript> <template> <style> h1 { margin: 0; font-size: 130%; } ul { padding-left: 5px; } .board, .device { border: 1px solid gray; border-radius: 10px; margin: 13px; padding: 7px; box-shadow: 2px 5px 5px rgba(0, 0, 0, 0.14); } .board { background: rgb(244, 244, 244); } .device { background: #fff; } </style> <core-ajax url="boards" auto="true" handleAs="json" response="{{ret}}"></core-ajax> <template repeat="{{board in ret.boards}}"> <div class="board"> <h1>Board <linked-uri href="{{board.uri}}"></linked-uri></h1> <h2>Devices</h2> <ul> <template repeat="{{dev in board.devices}}"> <div class="device"> <h1> {{dev.className}} <linked-uri href="{{dev.uri}}"></linked-uri> </h1> <template if="{{dev.watchPrefixes.length}}"> <div>watching:</div> <ul> <template repeat="{{prefix in dev.watchPrefixes}}"> <!-- <rdf-observe graph="http://dash:9059/graph" xtodo="get host here" subject="{{prefix[0]}}" predicate="{{prefix[1]}}" out="{{out}}"> </rdf-observe> <div>{{prefix[0]}}, {{prefix[1]}}, {{out['room:temperatureF']['@value']}}</div> --> </template> </ul> </template> <template if="{{dev.outputWidgets.length}}"> <div>send output:</div> <ul> <template repeat="{{out in dev.outputWidgets}}"> <div> <output-widget-any desc="{{out}}"></output-widget-any> </div> </template> </ul> </template> </div> </template> </ul> </div> </template> </template> </polymer-element> <arduinonode-boards></arduinonode-boards> <polymer-element name="data-dump" noscript> <template> <rdf-observe graph="http://dash:9059/graph" subject="http://bigasterisk.com/homeauto/board1/oneWire/" predicate="room:temperatureF" out="{{out}}"> </rdf-observe> <div>sees: {{out['room:temperatureF']['@value']}}</div> <rdf-observe graph="http://dash:9059/graph" subject="http://bigasterisk.com/homeauto/board1/oneWire/" predicate="http://projects.bigasterisk.com/room/temperatureRetries" out="{{out2}}"> </rdf-observe> <div>sees2: {{out2['room:temperatureRetries']['@value']}}</div> </template> </polymer-element> <!-- <data-dump></data-dump> --> </body> </html>