Mercurial > code > home > repos > homeauto
comparison service/arduinoNode/static/output-widgets.html @ 1066:a6639d55ad4b
route output url through output-sender
Ignore-this: aae9d5973afaa870bf4b7eee33dbce06
darcs-hash:1c922020f377444a21b03a3b2132f7fe0cb71459
author | drewp <drewp@bigasterisk.com> |
---|---|
date | Mon, 21 Mar 2016 04:26:14 -0700 |
parents | 77e7e8d76a81 |
children | 6614416dd2c3 |
comparison
equal
deleted
inserted
replaced
1065:71a753f65d25 | 1066:a6639d55ad4b |
---|---|
3 <link rel="import" href="/lib/polymer/1.0.9/color-picker-element/dist/color-picker.html"> | 3 <link rel="import" href="/lib/polymer/1.0.9/color-picker-element/dist/color-picker.html"> |
4 <link rel="import" href="/room/ari/static/rdf-uri.html"> | 4 <link rel="import" href="/room/ari/static/rdf-uri.html"> |
5 | 5 |
6 <dom-module id="output-sender"> | 6 <dom-module id="output-sender"> |
7 <template> | 7 <template> |
8 <iron-ajax id="output" url="../output" method="PUT"></iron-ajax> | 8 <iron-ajax id="output" url="{{output}}" method="PUT"></iron-ajax> |
9 Set <a href$="{{subj}}">{{compactUri(subj)}}</a>'s | 9 Set <a href$="{{subj}}">{{compactUri(subj)}}</a>'s |
10 <span>{{compactUri(pred)}}</span> to | 10 <span>{{compactUri(pred)}}</span> to |
11 </template> | 11 </template> |
12 <script> | 12 <script> |
13 Polymer({ | 13 Polymer({ |
14 is: 'output-sender', | 14 is: 'output-sender', |
15 behaviors: [BigastUri], | 15 behaviors: [BigastUri], |
16 properties: { | 16 properties: { |
17 output: { type: String, value: "output" }, // url to PUT outputs | |
17 streamedGraph: { notify: true, observer: 'onGraphChange' }, | 18 streamedGraph: { notify: true, observer: 'onGraphChange' }, |
18 subj: { notify: true }, | 19 subj: { notify: true }, |
19 pred: { notify: true }, | 20 pred: { notify: true }, |
20 value: { notify: true, observer: 'browserChangedValue' } | 21 value: { notify: true, observer: 'browserChangedValue' } |
21 }, | 22 }, |
109 </script> | 110 </script> |
110 </dom-module> | 111 </dom-module> |
111 | 112 |
112 <dom-module id="output-slider"> | 113 <dom-module id="output-slider"> |
113 <template> | 114 <template> |
114 <output-sender streamed-graph="{{streamedGraph}}" subj="{{subj}}" pred="{{pred}}" value="{{value}}"></output-sender> | 115 <output-sender streamed-graph="{{streamedGraph}}" output="{{output}}" subj="{{subj}}" pred="{{pred}}" value="{{value}}"></output-sender> |
115 <input type="range" min="{{min}}" max="{{max}}" step="{{step}}" value="{{value::input}}"> <span>{{value}}</span> | 116 <input type="range" min="{{min}}" max="{{max}}" step="{{step}}" value="{{value::input}}"> <span>{{value}}</span> |
116 </template> | 117 </template> |
117 <script> | 118 <script> |
118 Polymer({ | 119 Polymer({ |
119 is: 'output-slider', | 120 is: 'output-slider', |
120 properties: { | 121 properties: { |
122 output: { notify: true }, | |
121 streamedGraph: { notify: true }, | 123 streamedGraph: { notify: true }, |
122 max: { notify: true }, | 124 max: { notify: true }, |
123 min: { notify: true }, | 125 min: { notify: true }, |
124 step: { notify: true } | 126 step: { notify: true } |
125 }, | 127 }, |