                    (state/update-value [:fetching] false cursor)
                    (state/update-value [:data] response cursor))}))
 
+(defn log-append-handler
+  [service from-timestamp]
+  (handler/get
+    (routes/path-for-backend :service-logs (select-keys service [:id]))
+    {:on-call    (state/update-value [:fetching] true cursor)
+     :params     {:from from-timestamp}
+     :on-success (fn [response]
+                   (state/update-value [:fetching] false cursor)
+                   (state/update-value [:data] (-> (state/get-value cursor)
+                                                   :data
+                                                   (concat response)) cursor))}))
+
 (defn- init-state
   []
   (state/set-value {:filter      {:predicate ""}

  (mixin/refresh
    (fn [service]
      (when (not (:fetching (state/get-value cursor)))
        (log-handler service)))))

(def init-state-mixin
  (mixin/init
    (fn [_]
      (init-state))))

(rum/defc form < rum/reactive
                 init-state-mixin

        [:span "There are no logs available for the service."]
        (map
          (fn [item]
            (line item timestamp)) filtered-items))]]))
