              :onClick #(alert-history
                         key
                         (fn [r]
-                          (swap! app-state assoc :history
-                                 (get-in r [:hits :hits]))
                           (om/root alert-detail
                                    {:history (get-in r [:hits :hits])}
                                    {:target app-root})))}

(defn build-main []
  (om/root alert-list app-state {:target app-root}))

(defn main []
  (current-alerts)
  (build-main))

(enable-console-print!)

(defonce app-state (atom {:text "Alert Viewer"
                          :stats nil
                          :alerts nil}))

