Skip to content
Snippets Groups Projects
Commit 7d5d336b authored by Sameer Al-Sakran's avatar Sameer Al-Sakran
Browse files

include card in collections metrics

parent 4305d4d7
Branches
Tags
No related merge requests found
......@@ -212,12 +212,14 @@
:num_cards_per_label (medium-histogram cardlabels :label_id)}))
(defn collection-metrics
(defn- collection-metrics
"Get metrics on collection usage"
[]
(let [collections (db/select 'Collection)
cards (db/select ['Card :collection_id])]
{:collections (count collections)
:cards_in_collections (count (filter (comp nil?) (map :collection_id cards)))
:cards_not_in_collections (count (filter nil? (map :collection_id cards)))
:num_cards_per_collection (medium-histogram cards :collection_id)}
)
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment