-
- Downloads
[MLv2] Implement `automatic-insights` drill (#36443)
Automatic insights drills have some unusual conditions. This adds `metabase.lib.metadata/editable?` and checks it before returning any drills. On settings: In the app, `MetabaseSettings` is a global singleton and the settings are sometimes updated in place. In the JS testing environment several mock settings instances can exist at once, and the global singleton does not necessarily have the values we want for any given test. This PR makes `metabase.lib.metadata/setting` check for `describe` and `it` to see if we're in the testing environment, and to trust the metadata's `settings` in that case.
Showing
- src/metabase/lib/drill_thru.cljc 15 additions, 11 deletionssrc/metabase/lib/drill_thru.cljc
- src/metabase/lib/drill_thru/automatic_insights.cljc 40 additions, 15 deletionssrc/metabase/lib/drill_thru/automatic_insights.cljc
- src/metabase/lib/drill_thru/quick_filter.cljc 0 additions, 1 deletionsrc/metabase/lib/drill_thru/quick_filter.cljc
- src/metabase/lib/drill_thru/underlying_records.cljc 22 additions, 12 deletionssrc/metabase/lib/drill_thru/underlying_records.cljc
- src/metabase/lib/js/metadata.cljs 9 additions, 3 deletionssrc/metabase/lib/js/metadata.cljs
- src/metabase/lib/metadata.cljc 16 additions, 0 deletionssrc/metabase/lib/metadata.cljc
- src/metabase/lib/schema/drill_thru.cljc 4 additions, 2 deletionssrc/metabase/lib/schema/drill_thru.cljc
- test/metabase/lib/drill_thru/automatic_insights_test.cljc 160 additions, 0 deletionstest/metabase/lib/drill_thru/automatic_insights_test.cljc
- test/metabase/lib/drill_thru_test.cljc 23 additions, 8 deletionstest/metabase/lib/drill_thru_test.cljc
- test/metabase/lib/test_metadata.cljc 2 additions, 1 deletiontest/metabase/lib/test_metadata.cljc
Loading
Please register or sign in to comment