Skip to content
Snippets Groups Projects
Unverified Commit b8907454 authored by adam-james's avatar adam-james Committed by GitHub
Browse files

Multi Series Dashcards Render with Filters Applied To All Series (#43428)


* Multi Series Dashcards Render with Filters Applied To All Series

Fixes: #39083

Multi-series dashcards now properly render when a subscription is set up with filters that impact the values of each
card in the multi-series card.

* Small refactor for executing dashcards in a pulse context.

- move execute-dashboard-subscription to pulse.util
- this fn now will also execute all card series cards
  and put those results into a list on the key :series-results in the dashcard
  which is then used in the render multimethod to send the correct data to the javascript context

A small todo was taken care of as well, we can now use :dashboard-subscription in the :context key

* Fix up render fn

The shape of hte data going into the javascript was a bit unclear before. This keeps things a little more
understandable.

Next step is probably to create some Malli schemas inside the js_svg namespace to document and enforce the needed data shapes

* pull :data up a level from :result in the series cards

* Update src/metabase/pulse/render/body.clj

Co-authored-by: default avatarNgoc Khuat <qn.khuat@gmail.com>

* Remove unneeded let

* set/rename-keys won't work here because we raise the :data key

I've realised a suggested change to just use set/rename-keys won't do what we need. We need instead to raise :data
from within the result key up to the same level (and dissoc result).

I've renamed the helper function to make its purpose a bit clearer

---------

Co-authored-by: default avatarNgoc Khuat <qn.khuat@gmail.com>
parent 60bb8d61
Branches
Tags
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment