 
 (defn error-handler [event-chan]
   (fn [{:keys [status status-text]}]
-    (put! event-chan {:path :event :value {:status true
-                                           :class "alert alert-danger"
-                                           :text status-text}})))
+    (put! event-chan {:event :alert :value {:status true
+                                            :class "alert alert-danger"
+                                            :text status-text}})))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Adding new sensor

                        :onClick (fn [_]
                                   (put! event-chan {:event :adding-device :value false}))}
               "Cancel"]]]
            (bs/text-input-control cursor owner :device :description "Description" true)
            (location-input cursor owner)
            (bs/text-input-control cursor owner :device :name "Name")
            (bs/checkbox cursor owner :device :privacy "Private")]]]
         [:div.col-md-12
          [:h3 "Create sensor:"]

      (render [_]
        (html
         (let [{:keys [description privacy location name
                       device_id editable privacy]} cursor
                       devices   (:devices properties)
                       selected? (= (:selected devices) device_id)]
           [:tr {:onClick (fn [_] (om/update! devices :selected (if selected? nil device_id)))
                 :class (when selected? "success")
                 :id (str table-id "-selected")}
            [:td description]
            [:td name]
            [:td (common/location-col location)]
            [:td (privacy-label privacy)]
            [:td (count (filter #(not (:synthetic %)) (:readings cursor)))]
            [:td (string/join ", " (mapv :type (filter #(not (:synthetic %)) (:readings cursor))))]
            [:td device_id]]))))))


(defn devices-table [editing-chan properties]
