 (defcomponent header [app owner opts]
   (will-mount [_]
               (go (while true
-                    (let [avcCount (<! (es-count))]
-                      (om/update! app [:es-count] avcCount))
+                    (let [docCount (<! (es-count))]
+                      (om/update! app [:es-count] docCount))
                     (<! (timeout poll-interval)))))
   (render [_]
           (html [:h2 (:header-text app) " with " (-> app :es-count str commify) " raw data in ES"])))


(defn es-count []
  (let [c (chan)]
    (go (let [{{avcCount :count} :body} (<! (http/get (es-url :count)))]
          (>! c avcCount)))
    c))

(defn es-agg [post-body]

                        {:on-click #(om/set-state! owner :n (dec n))}
                        "-"]])))

