       (fn [ this ]
         (reset! dom-node (reagent/dom-node this))
         (go
-          (swap! series-state assoc :series-data (<! (<<< fetch-series-data series @query-window-secs)))))
+          (swap! series-state assoc :series-data
+                 (<! (<<< fetch-series-data series @query-window-secs)))))
 
       :reagent-render
-      (fn [ ]
+      (fn [ & rest ]
         @window-width
         @series-state
         [:div

                    {:width (.-clientWidth node)
                     :height (.-clientHeight node)})]])})))

(defn series-pane [ series-name ]
  [:div.series-pane
   [:div.series-pane-header
    [:span.series-name series-name]]
   [series-tsplot series-name @query-window-secs]])

(defn series-list [ ]
  [:div
   (for [ series (:series @dashboard-state) ]
     ^{ :key series } [series-pane series])])

(defn end-edit [ text state ]
  (let [ qws (js/parseInt text) ]
    (reset! query-window-secs qws)))

(defn input-field [ on-enter ]
  (let [ state (reagent/atom { :text "" }) ]
    (fn []
      [:input {:value (:text @state)
               :onChange #(swap! state assoc :text (.. % -target -value))

  [:div.header
   [:span#app-name
    "Metlog"]
   [input-field @query-window-secs #(end-edit % dashboard-state)]])

(defn dashboard [ ]
  [:div
