Show disposed subscriptions in the subs section

This commit is contained in:
Daniel Compton 2017-11-17 15:52:57 +13:00
parent 92fa6efb1b
commit 9395e12c48
1 changed files with 3 additions and 2 deletions

View File

@ -39,6 +39,7 @@
(case op-type (case op-type
:sub/create "trace--sub-create" :sub/create "trace--sub-create"
:sub/run "trace--sub-run" :sub/run "trace--sub-run"
:sub/dispose "trace--sub-run"
:event "trace--event" :event "trace--event"
:render "trace--render" :render "trace--render"
:re-frame.router/fsm-trigger "trace--fsm-trigger" :re-frame.router/fsm-trigger "trace--fsm-trigger"
@ -86,7 +87,7 @@
filter-items (rf/subscribe [:traces/filter-items]) filter-items (rf/subscribe [:traces/filter-items])
filter-type (r/atom :contains) filter-type (r/atom :contains)
input-error (r/atom false) input-error (r/atom false)
categories (r/atom #{:event :sub/run :sub/create}) categories (r/atom #{:event :sub/run :sub/create :sub/dispose})
trace-detail-expansions (r/atom {:show-all? false :overrides {}})] trace-detail-expansions (r/atom {:show-all? false :overrides {}})]
(fn [] (fn []
(let [toggle-category-fn (fn [category-keys] (let [toggle-category-fn (fn [category-keys]
@ -112,7 +113,7 @@
:on-click #(toggle-category-fn #{:event})} :on-click #(toggle-category-fn #{:event})}
"events"] "events"]
[:li.filter-category {:class (when (contains? @categories :sub/run) "active") [:li.filter-category {:class (when (contains? @categories :sub/run) "active")
:on-click #(toggle-category-fn #{:sub/run :sub/create})} :on-click #(toggle-category-fn #{:sub/run :sub/create :sub/dispose})}
"subscriptions"] "subscriptions"]
[:li.filter-category {:class (when (contains? @categories :render) "active") [:li.filter-category {:class (when (contains? @categories :render) "active")
:on-click #(toggle-category-fn #{:render})} :on-click #(toggle-category-fn #{:render})}