comparison service/arduinoNode/static/index.html @ 975:f3023410d875

polymer board debug page with working output widgets Ignore-this: 3157d0c47a91afe47b30a5f182629d93 darcs-hash:20150414063012-312f9-69ac15a9c7bab2b3b5ca00142fe4435ded7d6d0f
author drewp <drewp@bigasterisk.com>
date Mon, 13 Apr 2015 23:30:12 -0700
parents
children 4d2df276baae
comparison
equal deleted inserted replaced
974:f707210c13bd 975:f3023410d875
1 <!doctype html>
2 <html>
3 <head>
4 <title>arduinoNode</title>
5 <meta charset="utf-8" />
6 <link rel="import" href="/lib/polymer/0.5.2/polymer/polymer.html">
7 <link rel="import" href="/lib/polymer/0.5.2/core-ajax/core-ajax.html">
8 <link rel="import" href="/lib/polymer/0.5.2/paper-button/paper-button.html">
9 <link rel="import" href="/lib/polymer/0.5.2/core-resizable/core-resizable.html">
10 <link rel="import" href="/room/ari/static/rdf-observe.html">
11 <link rel="import" href="/room/ari/static/rdf-oneshot.html">
12 <link rel="import" href="static/output-widgets.html">
13
14 <style>
15 body {
16 font-family: monospace;
17 }
18 </style>
19 </head>
20 <body layout vertical fullbleed>
21 <script>
22 window.NS = {
23 dev: 'http://projects.bigasterisk.com/device/',
24 room: 'http://projects.bigasterisk.com/room/',
25 rdfs: 'http://www.w3.org/2000/01/rdf-schema#',
26 };
27 </script>
28
29 <polymer-element name="linked-uri" noscript attributes="href">
30 <template>
31 <a href="{{href}}">{{href}}</a>
32 </template>
33 </polymer-element>
34
35 <polymer-element name="arduinonode-boards" noscript>
36 <template>
37 <style>
38 h1 {
39 margin: 0;
40 font-size: 130%;
41 }
42 ul {
43 padding-left: 5px;
44 }
45 .board, .device {
46 border: 1px solid gray;
47 border-radius: 10px;
48 margin: 13px;
49 padding: 7px;
50 box-shadow: 2px 5px 5px rgba(0, 0, 0, 0.14);
51 }
52 .board {
53 background: rgb(244, 244, 244);
54 }
55 .device {
56 background: #fff;
57 }
58 </style>
59 <core-ajax
60 url="boards"
61 auto="true"
62 handleAs="json"
63 response="{{ret}}"></core-ajax>
64 <template repeat="{{board in ret.boards}}">
65 <div class="board">
66 <h1>Board <linked-uri href="{{board.uri}}"></linked-uri></h1>
67 <h2>Devices</h2>
68 <ul>
69 <template repeat="{{dev in board.devices}}">
70 <div class="device">
71 <h1>
72 Device <linked-uri href="{{dev.uri}}"></linked-uri>
73 (class {{dev.className}})
74 </h1>
75 <div>watching:</div>
76 <ul>
77 <template repeat="{{prefix in dev.watchPrefixes}}">
78 <div>{{prefix[0]}}, {{prefix[1]}}, ?obj</div>
79 </template>
80 </ul>
81
82 <div>send output:</div>
83 <ul>
84 <template repeat="{{out in dev.outputWidgets}}">
85 <div>
86 <output-widget-any desc="{{out}}"></output-widget-any>
87 </div>
88 </template>
89 </ul>
90 </div>
91 </template>
92 </ul>
93
94 </div>
95 </template>
96 </template>
97
98 </polymer-element>
99 <arduinonode-boards></arduinonode-boards>
100
101
102 <polymer-element name="data-dump" noscript>
103 <template>
104 <rdf-observe
105 graph="http://bang:9059/graph"
106 subject="sensor:motion0"
107 predicate="room:sees"
108 out="{{out}}">
109 </rdf-observe>
110 <div>sees: {{out['room:sees']}}</div>
111 </template>
112 </polymer-element>
113 <!-- <data-dump></data-dump> -->
114 </body>
115 </html>