Skip to content

Commit

Permalink
Fix setup-ui-from-runtime-config
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmonettas committed Dec 18, 2023
1 parent 807629a commit 3116fa6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
28 changes: 14 additions & 14 deletions src-dbg/flow_storm/debugger/ui/main.clj
Original file line number Diff line number Diff line change
Expand Up @@ -280,20 +280,20 @@
"This function is meant to be called after all the system has started,
to configure the part of UI that depends on runtime state."
[]
(when-let [{:keys [recording? total-order-recording?] :as runtime-config} (runtime-api/runtime-config rt-api)]
(log (str "Runtime config retrieved :" runtime-config))
(let [all-flows-ids (->> (runtime-api/all-flows-threads rt-api)
(map first)
(into #{}))]
(ui-utils/run-later
(dbg-state/set-runtime-config runtime-config)
(set-recording-btn recording?)
(timeline-screen/set-recording-check total-order-recording?)
(printer-screen/update-prints-controls)


(doseq [fid all-flows-ids]
(create-flow {:flow-id fid}))))))
(ui-utils/run-later
(when-let [{:keys [recording? total-order-recording?] :as runtime-config} (runtime-api/runtime-config rt-api)]
(log (str "Runtime config retrieved :" runtime-config))
(let [all-flows-ids (->> (runtime-api/all-flows-threads rt-api)
(map first)
(into #{}))]
(dbg-state/set-runtime-config runtime-config)
(set-recording-btn recording?)
(timeline-screen/set-recording-check total-order-recording?)
(printer-screen/update-prints-controls)


(doseq [fid all-flows-ids]
(create-flow {:flow-id fid}))))))


(defn start-ui [config]
Expand Down
4 changes: 2 additions & 2 deletions src-dbg/flow_storm/debugger/websocket.clj
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@
(on-start))

(onOpen [^WebSocket conn ^ClientHandshake handshake-data]
(log (format "Got a connection %s" conn))
(when on-open
(on-open conn))
(log (format "Got a connection %s" conn)))
(on-open conn)))

(onMessage [conn message]
(on-message conn message))
Expand Down

0 comments on commit 3116fa6

Please sign in to comment.