Skip to content
Snippets Groups Projects
Commit a87e2db1 authored by Simon Belak's avatar Simon Belak
Browse files

Fetch entire dashboard for comparison

parent 71069de0
Branches
Tags
No related merge requests found
......@@ -9,7 +9,9 @@
[metric :refer [Metric]]
[segment :refer [Segment]]
[table :refer [Table]]]
[toucan.db :as db]))
[toucan
[db :as db]
[hydrate :refer [hydrate]]]))
; Should be POST, GET for testing convinience
(api/defendpoint GET "/database/:id"
......@@ -39,9 +41,10 @@
"Create an automagic comparison dashboard based on dashboard with ID
`dashboard-id`, comparing segments with IDs `left-id` and `right-id`."
[dashboard-id left-id right-id]
[(-> (magic.comparison/comparison-dashboard (Dashboard dashboard-id)
(Segment left-id)
(Segment right-id))
[(-> (Dashboard dashboard-id)
api/check-404
(hydrate [:ordered_cards [:card :in_public_dashboard] :series])
(magic.comparison/comparison-dashboard (Segment left-id) (Segment right-id))
dashboard/save-transient-dashboard!
:id)])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment