comparison service/rfid_pn532_py/rfid-console.html @ 1235:d8aa414f21d9

py3, rfid-console rename Ignore-this: 1b28d912e8847685a87c0c9ccb703608 darcs-hash:1812ff3e65cffea158d10f03e565942a684b4bd4
author drewp <drewp@bigasterisk.com>
date Sun, 07 Apr 2019 03:58:51 -0700
parents c571a45c944f
children
comparison
equal deleted inserted replaced
1234:c02ac623e593 1235:d8aa414f21d9
2 <link rel="import" href="/lib/polymer/1.0.9/polymer/polymer.html"> 2 <link rel="import" href="/lib/polymer/1.0.9/polymer/polymer.html">
3 <link rel="import" href="/rdf/rdf-oneshot.html"> 3 <link rel="import" href="/rdf/rdf-oneshot.html">
4 <link rel="import" href="/rdf/rdf-uri.html"> 4 <link rel="import" href="/rdf/rdf-uri.html">
5 <link rel="import" href="/rdf/streamed-graph.html"> 5 <link rel="import" href="/rdf/streamed-graph.html">
6 6
7 <dom-module id="rfid-control"> 7 <dom-module id="rfid-console">
8 <style> 8 <style>
9 button { 9 button {
10 min-width: 60px; 10 min-width: 60px;
11 min-height: 40px; 11 min-height: 40px;
12 } 12 }
17 td, th { 17 td, th {
18 border: 1px solid gray; 18 border: 1px solid gray;
19 } 19 }
20 </style> 20 </style>
21 <template> 21 <template>
22 <div>
23 <streamed-graph url="graph/events" graph="{{graph}}"></streamed-graph>
24 <!-- also get a graph of users so we can look up cards -->
25 </div>
26 22
27 <iron-ajax id="rewrite" url="rewrite" method="POST"></iron-ajax> 23 <iron-ajax id="rewrite" url="rewrite" method="POST"></iron-ajax>
28 24
29 Current reads: 25 Current RFID reads:
30 <table> 26 <table>
31 <tr><th>Card UID</th><th>Card text</th><th></th></tr> 27 <tr><th>Card UID</th><th>Card text</th><th></th></tr>
32 <template is="dom-repeat" items="{{currentReads}}"> 28 <template is="dom-repeat" items="{{currentReads}}">
33 <tr> 29 <tr>
34 <td>{{item.uidDisplay}}</td> 30 <td>{{item.uidDisplay}}</td>
39 </div> 35 </div>
40 </td> 36 </td>
41 </tr> 37 </tr>
42 </template> 38 </template>
43 </table> 39 </table>
44 40
41 <div>
42 <streamed-graph url="graph/events" graph="{{graph}}"></streamed-graph>
43 <!-- also get a graph of users so we can look up cards -->
44 </div>
45 </template> 45 </template>
46 <script> 46 <script>
47 Polymer({ 47 Polymer({
48 is: 'rfid-control', 48 is: 'rfid-console',
49 properties: { 49 properties: {
50 graph: { type: Object, notify: true, observer: "_onGraph" }, 50 graph: { type: Object, notify: true, observer: "_onGraph" },
51 currentReads: { type: Array, value: [] }, 51 currentReads: { type: Array, value: [] },
52 }, 52 },
53 behaviors: [BigastUri], 53 behaviors: [BigastUri],