This project is mirrored from https://github.com/metabase/metabase.
Pull mirroring updated .
- Aug 07, 2024
-
-
lbrdnk authored
* Add :relative-time-interval mbql function * Add relativeDateFilterPartsRelativeTimeInterval * Update display-name-method :relative-time-interval * Update desugar-relative-time-interval * Define relative-time-filter op * Add or update tests * Update tests * Update display-name-method * Update test * Fix positive relative-time-interval shift * Add checkins:1-per-day:60 dataset * Update var name * Bail out from optimization of relative-time-interval desugared filters * Update dataset kondo hook * Generate cache required for kondo hooks in kondo.sh * Rename dataset
-
- Aug 06, 2024
-
-
metamben authored
-
Chris Truter authored
-
Chris Truter authored
-
Oleksandr Yakushev authored
* perf: Optimize validation * Bump Malli version * perf: Optimize validation
-
- Aug 05, 2024
-
-
Ngoc Khuat authored
-
Chris Truter authored
### Description This change should fix some explosions in stats due to phantom fields, while also making things a bit more rigorous. - Record the table schema in query_field - especially useful for unknown tables - Allow null table names in query_field - they might be phantoms, or they might not - We still have the option to filter them out in tools we build on top - Tighten up matching logic to consider schema
-
- Aug 02, 2024
-
-
John Swanson authored
* Fix coll permissions for audit collection We've had a function in `models.collection` for a while that has taken a permissions set and returned a set of collection IDs that the user has permissions on. I refactored this recently, but didn't notice that it was actually doing the permissions checks slightly incorrectly. Specifically, because it only looks at the user's permissions and the collection IDs and doesn't use `mi/can-read?` or `mi/can-write?`, it's completely indifferent to whether a collection is an audit collection or not. This is arguably not a *permissions* issue: the two errors that could come about here are: - someone sees the audit collection even though the audit feature is disabled, or - someone is presented with the audit collection in a context where only writable collections should be present - when they try to actually write to it, it fails (since then we're doing the real permissions check). The primary motivation for this fix was to prevent audit dashboards and cards from appearing in the list of stale items. * Fix hardcoded collection ID We were creating a timeline in a fixed collection ID, that in tests happened to be the ID of the Metabase Analytics collection.
-
lbrdnk authored
* Update values-from-card-query * Add test * Update values-from-card-query * Add missing issue no
-
Chris Truter authored
-
Ngoc Khuat authored
-
- Aug 01, 2024
-
-
lbrdnk authored
* Avoid adding temporal-unit to lhs cols * Use :default temporal-unit * Simplify logic, update comments * Update substitute-field-filter-test * Update align-temporal-unit-with-param-type-test * Update field-filter-date-test * Use end-excludding gte lt filter for DateTime fields * Update substitute-field-filter-test * Update align-temporal-unit-with-param-type-test * Update field-filter-date-test * Update bigquery test + comment * Update date-str->qp-aware-offset-dt * Add guard for unexpected date string format This is just for the completeness, I haven't encountered it. * Address review remarks * Update comment
-
Chris Truter authored
* Squash * Clean up query modifier for validating card references (#46283) * Fixup bad git merge on test expectation * Tweak docstrings and de-densify logic
-
-
lbrdnk authored
* Add :relative-time-interval mbql function * Add relativeDateFilterPartsRelativeTimeInterval * Update display-name-method :relative-time-interval * Update desugar-relative-time-interval * Define relative-time-filter op * Add or update tests * Update tests * Update display-name-method * Update test * Fix positive relative-time-interval shift
-
Ngoc Khuat authored
-
- Jul 31, 2024
-
-
John Swanson authored
* Allow filtering on collection * Add `effective_ancestors` to collection data Note: I removed the `qv=` comparator. I think it'.s better to be more explicit about what exactly we're asserting. In particular, I hadn't updated the `:count` when we were filtering on collection type, so the count was still the total for *every* collection even though the results were being restricted by the collection. However the `qv=-data` function was still reporting that everything was OK, because it was accounting for other data from the App DB by just asserting that the count we'd specified was lower than the actual count. I'd argue it's better for tests to fail locally because I have garbage in my app DB (which I can clean up) than succeed when they really shouldn't. * Consolidate effective ancestors For the Search API, we're currently returning slightly different ancestors: - it never has the Root Collection, and - the ancestors don't have a `personal_owner_id` We could change the API (and maybe will soon - it seems pretty unexpected to have `effective_ancestors` sometimes act one way and sometimes act another) but for now we can just reshape things to look the same as they did before, while using the same code under the hood.
-
Noah Moss authored
Co-authored-by:
Sloan Sparger <sloansparger@users.noreply.github.com>
-
Emmad Usmani authored
* echarts pie * setup rendering pipeline for static pie chart (#43547) * setup rendering pipeline for static pie chart * remove more donut code from BE * compute viz settings for static pie chart (#43548) * compute viz settings for static pie chart * create chartModel for pie chart (#43549) * create chartModel for pie chart * render static pie chart (#43550) * render static pie chart * render static pie chart legend (#43551) * disable animation * alter static-viz pie chart be tests to account for echarts-impl The old implementation had a different implementation for legends, separate from the 'categorical/donut' js render. Echarts nicely combines the legend into the pie render, so we don't need to worry about that stuff anymore. Instead, I've written a simple set of assertions on the echarts pie implementation now. * Get rid of this test that was attempting to use old code path * echarts pie * One last spot where we don't need old pie stuff anymore. * add loki specs * save snapshots * fix small slices disappearing * update snapshots * add repro story for exteremely small slice * add snapshot * fix rounded total * fix percent formatting in legend * fix date dimension formatting * fix binned and relative date dimension labels on legend * add specs and snapshots for null and unaggregated dimensions * hide overlaping labels on chart * fix null dimension color * show error when metric column has a negative value * move legend to botom * make dot margin smaller * add columns to legend * sort legend vertically * dont use grid if only one row for legend * never hide legend in static viz * fix empty column culling * show single legend item * add long dimension name story * fix long dimension name in legend * right justify percentages in legend * remove negative error and re-add stories * handle negative values * create chart definition for dynamic pie chart * render chart with responsiveness * add comment for borderWidth calculation * center legend * fix legend centering * add story for missing currency formatting * fix missing currency formatting * fix graalvm crashing * fix column settings computation * add another currency formatting repro * fix wrong order of col settings computations * convert colors to hex * fix colors missing from viz settings * temp todo comment * fix colors in dynamic viz * update snapshots * fix crashing due to invalid dimension/metric setting * fix chart crashing for boolean dimension with labels on chart * add repro * fix regression in label formatting * fix labels on small slices * update specs * emphasis state for slice hover * recreate old label hiding logic * include height measurement in getIsLabelVisible * move d3 slices to chart model * fix labels on static viz * wip basic hover state and tooltip * fix emphasis style getting stuck by memoizing everything * update total display value * fix stuck emphasis by setting notMerge to false for pie only * handle other slice in tooltip * fix bugs in total graphic * use OTHER_SLICE_KEY const in static viz legend * implement legend and connect to hover state * implement click actions * fix slice not clickable * handle all zero slices * add repro * update specs * update pie_chart.cy.spec.js * update chart_drill.cy.spec.js * add repro for single column legend * use minimum 2 legend columns * fix legend text overlap * use more margin for single row legend * update specs * add repro for 28568 * add repro for 38424 * fix percent label not showing on large slices * hide total text when chart is small * replace comment about animations * show warning for mixed positive and negative values * delete old chart files * fix type errors * update d3 import * update specs * remove branch from uberjar.yml * dont put single slice into other * fix lint errors and pie render test * update more d3 imports * remove unused settings * revert preview-card-width change * remove unused import * remove majorWidth option from formatting * use debounceLeading refresh mode in ChartWithLegend * remove TOTAL_GRAPHIC_OPTION constant * delete unit test for pie chart * fix failing test by doing set comparison instead * fix typo in comment * remove SUNBURST_SERIES_OPTION constant * fix lint by removing unused eslint-disable * move default color computation to getValue * fix static pie test to show that we will always render the legend * update pie border color for night mode and embedding * fix styles for embedding case and add stories * skip embedding stories --------- Co-authored-by:
Adam James <adam.vermeer2@gmail.com>
-
Alexander Solovyov authored
-
- Jul 30, 2024
-
-
Alexander Polyankin authored
-
John Swanson authored
* Make an internal API for retrieving stale content This introduces the `metabase.stale` module, which has one public function (so far): `metabase.stale/find-candidates`. This takes a set of `collection-ids`, a cutoff date, and pagination/sort info. Next, we introduce an HTTP API endpoint that will figure out the appropriate set of `collection-ids` for a given user/request, call this function, and return the results in the shape we want. Also: for e2e tests, we need a way to mark a card or dashboard as stale. I think the easiest way to do this is to just create a testing endpoint that we can call to update the `last_used_at` or `last_viewed_at` of the card/dashboard to set it to ~7 months ago. --------- Co-authored-by:
bryan <bryan.maass@gmail.com>
-
Cal Herries authored
-
Chris Truter authored
-
Ngoc Khuat authored
-
- Jul 29, 2024
-
-
Braden Shepherdson authored
Expands and refactors `metabase.util.memoize` to support better cross-platform memoization. **Better basic memoization** Use `clojure.core.memoize/memo` (and its clone in CLJS) rather than `clojure.core/memoize` for the "everything forever" strategy. **Bounded memoization** There are a few places (eg. `u/kebab-case-en`) where we want zero-overhead *hits* and expect the input space to be fixed. To guard against runaway memory usage, this **bounded** strategy dumps the entire cache when it overflows. It logs an INFO level note when that happens - the intent here is that the threshold should never actually get hit! **Fast JVM versions** In the special case where the function to memoize takes exactly 1 argument which is a valid map key, we can use `ConcurrentHashMap.computeIfAbsent` as the basis of the cache and have much less overhead. `fast-memo` and `fast-bounded` implement this in CLJ; in CLJS they just call `memo` and `bounded`.
-
Cal Herries authored
Co-authored-by:
Ngoc Khuat <qn.khuat@gmail.com>
-
Chris Truter authored
-
Chris Truter authored
-
- Jul 26, 2024
-
-
Oleksandr Yakushev authored
* perf: Optimize metabase.lib.schema.util/unique-uuids? * perf: Allocation improvements on sync-db/fingerprinting path
-
Alexander Polyankin authored
* Remove unused dimension options * Fix test
-
Braden Shepherdson authored
The `dashboard_load_id` is attached to the body for queries, not as a query parameter. This correctly receives the `dashboard_load_id` and uses it for `/query` calls.
-
bryan authored
* pull sdk info into data on-thread * include api tests for query_execution and view_log * Try mt/test-helpers-set-global-values! - disambiguate names used in tests * pass test + cleanup test helper * make sure view logging is enabled in test
-
Alexander Polyankin authored
* Remove unused properties * Remove unused properties * Remove comment * Experiment * Simplify * general cleanup and adding dashboard links handling * fix tests, link cards; sort output * include databases from queries, not just tables, fix card sort * use a simplified get-databases that doesn't throw * Fix tests --------- Co-authored-by:
Braden Shepherdson <braden@metabase.com>
-
Braden Shepherdson authored
This was missed in the original PR #45394 due to clumsy `git` wrangling; my bad.
-
Cal Herries authored
-
- Jul 25, 2024
-
-
adam-james authored
* fix conditional formatting color lookup with correct col names The column names for color lookup are expected to be the same as the :name key of each column, and applying column formatting broke this lookup. This fixes it. * move overflow-x into pulse body div to exlude card title from scroll * add a test for conditional formatting w/ a hidden row. This still fails at the moment, working on a fix yet. * apply conditional formatting in static viz even when col is hidden Conditional formatting that depends on a hidden column was not being rendered in the static viz, but now we pass all columns into the color selector fn, thus when rendering the table with the ordered/hidden columns, all other columns will still use their appropriate conditional formatting * I missed a linter warning * fix tab rendering * fix test * fix up tests with some better structural searching
-
metamben authored
Add Azure managed identity support --------- Co-authored-by:
Case Nelson <case@metabase.com>
-
bryan authored
* Adds a middleware that sets 2 dynamic vars - These vars will be used to insert context for embedding analytics * migration adding embedding_client and embedding_version to qe and vl tables * clarify function api * headers come in -> dynamic vars -> written to db When the vars are set we insert their values into query execution and query_log under embedding_client and embedding_version. * update update migrations * add predconditions to migrations * fix tablenames + dataset_test * Code Review responses - remove commented out requires - clarify test for merge-count-maps
-
John Swanson authored
* Lock down the trash collection more Oops. I was very thorough in checking that you couldn't modify the trash collection in the sense of moving things to or from it. I missed the most obvious thing: actually modifying the trash collection itself. So if someone wanted, they could change the name of the Trash to "Definitely Not the Trash". * Remove the Trash Collection from serialization Serialization tests were failing due to the previous change, but this got me thinking, and I realized that serializing the Trash collection is completely unnecessary. We want to create it programatically on startup (which we are) and then nothing should change it afterwards.
-