changeset 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 71a753f65d25
children dfb284fb025c
files service/arduinoNode/static/output-widgets.html
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/service/arduinoNode/static/output-widgets.html	Mon Mar 21 04:25:40 2016 -0700
+++ b/service/arduinoNode/static/output-widgets.html	Mon Mar 21 04:26:14 2016 -0700
@@ -5,7 +5,7 @@
 
 <dom-module id="output-sender">
   <template>
-    <iron-ajax id="output" url="../output" method="PUT"></iron-ajax>
+    <iron-ajax id="output" url="{{output}}" method="PUT"></iron-ajax>
     Set <a href$="{{subj}}">{{compactUri(subj)}}</a>'s
     <span>{{compactUri(pred)}}</span> to
   </template>
@@ -14,6 +14,7 @@
      is: 'output-sender',
      behaviors: [BigastUri],
      properties: {
+       output: { type: String, value: "output" }, // url to PUT outputs
        streamedGraph: { notify: true, observer: 'onGraphChange' },
        subj: { notify: true },
        pred: { notify: true },
@@ -111,13 +112,14 @@
 
 <dom-module id="output-slider">
   <template>
-    <output-sender streamed-graph="{{streamedGraph}}" subj="{{subj}}" pred="{{pred}}" value="{{value}}"></output-sender>
+    <output-sender streamed-graph="{{streamedGraph}}" output="{{output}}" subj="{{subj}}" pred="{{pred}}" value="{{value}}"></output-sender>
     <input type="range" min="{{min}}" max="{{max}}" step="{{step}}" value="{{value::input}}"> <span>{{value}}</span>
   </template>
   <script>
    Polymer({
      is: 'output-slider',
      properties: {
+       output: { notify: true },
        streamedGraph: { notify: true }, 
        max: { notify: true },
        min: { notify: true },