This project is mirrored from https://github.com/metabase/metabase.
Pull mirroring updated .
- Dec 09, 2022
-
-
Cam Saul authored
* Make Dimension unique on `field_id` and deduplicate * Fix rollback for new migrations * Don't require migration comments to contain 'added' anymore since it's part of the version ID now * Don't require 'Added <version>' in migration comments anymore * Fix SerDes test that created duplicate dimensions for one Field * Silly fix to fix MySQL 5.7
-
- Dec 08, 2022
-
-
Cam Saul authored
* ≈ [WIP] [ci skip] * Minor cleanup [ci skip] * Code cleanup. [ci skip] * Kondo in CI should fetch library configs * Bump Methodical version * Change name to `=?` * Add `#exactly` reader tag * Add `#schema` data reader * Fix dev deps indentation and add `algo.generic` * Add `approx=` * Improved version of `#approx` * Just check in third party Kondo config for now instead of fighting CI * Update test/metabase/test_runner/assert_exprs/approximately_equal_test.clj Co-authored-by:
Tim Macdonald <tim@metabase.com> * Address PR feedback and fix sequence comparison Co-authored-by:
Tim Macdonald <tim@metabase.com>
-
metamben authored
* Store DBMS version in Database * Add DBMS version to anonymous stats * Add dbms_version sync tests * Add test for DBMS versions in anonymous stats
-
- Dec 06, 2022
-
-
Case Nelson authored
* Disable field value scanning for inactive fields Fixes #26863 Adds `last-used-at` to `metabase_fieldvalues` table. This is used to track when full FieldValues are fetched, which should always happen through `get-or-create-full-field-values!` If an inactive FieldValues is queried, they will be updated immediately to be returned to the user and a new last-used-at will be set so that sync will start picking it up. During field values sync, if `last-used-at` occurred more than 14 days ago, then we will no longer query and synchronize this field until it is queried for again. * Fix flaky test by waiting half a second for last-used-at to change * Updates from review * Remove flakiness from test by checking sync
-
- Nov 29, 2022
-
-
Mahatthana (Kelvin) Nomsawadi authored
* Match static combo chart colors with app viz colors * Match colors when individual series color is set * Remove tests that test colors Since colors is now determined in FE * Fix static viz Series type * Match static progress bar colors with app viz colors * Simplify Clojure code, makes it more idiomatic * Fix certain combo charts don't respect whitelabel colors * Make Clojure code more idiomatic * Fix Series type * Add colors back to static internal page * Simplify type predicate * fix colors matching for multiple series with mulitple metrics or dimensions * Handle legends not formatted in static viz in some cases * Fix failed BE tests after BE API changed * Fix failed BE tests after BE API changed * Add multiple series dashcard test to `getSeriesWithColors` test * Add `getSeriesWithLegends` tests * Fix URL `/_internal/static-viz` not loading due to API change * Correctly render legend when having dashcard title set * Simplify combo-chart API don't really need `settings-seqs` yet * Make static combo chart component type easier to understand * Address review: refactor `render-multiple-lab-chart` * Make variable names easier to understand * Simplify color API * Address review on `body.clj` * Address review, make parameter name more consistent * Fix multiple scalars not rendering * Remove unused imports
-
- Nov 28, 2022
-
-
john-metabase authored
* Adds rollback where necessary to v45 migrations * Adds linter for migrations requiring rollback key * Removes unused writeback table migrations * Removes migrate down-one subcommand
-
- Nov 15, 2022
-
-
Alexander Polyankin authored
-
Aleksandr Lesnenko authored
* fix showing placeholder series * row chart polish * wip * don't use nice x ticks for stacked expand chart * make grouped row not clickable * update specs * update specs
-
- Nov 08, 2022
-
-
Ngoc Khuat authored
* Change the remaning columns that has text type in mysql,mariadb to longtext
-
- Oct 24, 2022
-
-
Aleksandr Lesnenko authored
* static pie labels * visual tests * Quick fix to prevent non-temporal labels from datetime formatting * show values pie BE * Text fix
* add specs * renamt show_labels to show_values * Test fix * update spec Co-authored-by:Adam James <adam.vermeer2@gmail.com> Co-authored-by:
Tim Macdonald <tim@tsmacdonald.com>
-
Cam Saul authored
* Fix Collection created_at migrations for H2 * Fix MySQL/MariaDB set created_at for empty collections * Fix MySQL/MariaDB one last time
-
- Oct 21, 2022
-
-
Cam Saul authored
* Add created_at to Collection * Simplified migrations [ci skip] * Add SQL for H2 and MySQL; add tests * Sort namespaces * Test fixes
* Test fixes * Test fixes * Make sure MySQL/MariaDB Liquibase generator sets the current timestamp function for ADD COLUMN
-
- Oct 19, 2022
-
-
Case Nelson authored
* [Apps] Remove emitters Emitters were created when we thought that we would be adding actions to multiple places in metabase. Instead we've coalesced to actions being a core feature of data-apps and are executed from within them. Attaching actions to models, as a form of re-use rather than a form of execution, means that actions can still be executed directly from a model, if we want to allow that in the future. * Fix lint errors * Move perform-action! tests out of the api. Since we want to keep the implicit bulk functionality but remove those endpoints move the tests to the actions namespace. * Fix linter * Change driver test to use function instead of endpoint
-
metamben authored
* Create app collections in the "apps" collection namespace * Add test macro for setting global app permissions for "All Users" * Introduce app permission audit table
-
- Oct 11, 2022
-
-
Case Nelson authored
* [Apps] Model Actions Adding migration and endpoints for model_action. * model action execution Changing the execution endpoints again, still working on implicit action execution tests. Need to also test the parameters fetch. * Re-add execution route for dashcard action_id until Front End catches up * Add name to model_action GET * Hydrate model-action on dashcards * Rename and combine hydration of model_action to action * Implicit action execution support. Use slug columns as parameter ids * Go through model-action when using GET /action * FE integration fixes * Move action execution to use new parameter shape Now, parameters should be a map of parameter-id to value Parameter-id should be mapped on the FE. So the action parameter-id not the unmapped dashboard parameter-id. * Bring ModelAction into copy code * Generate target of implicit actions to match http actions * Update action test to place action on model * Add unique constraint to model_action for (card_id, slug) * Add missing require * model_action.slug needs to be varchar for mysql constraint * Fix test from unique constraint * Consistent ordering for tests * Addressing Code Reviews and Scaffold changes * Add type: implicit to implicit model actions * Update src/metabase/api/model_action.clj Co-authored-by:
metamben <103100869+metamben@users.noreply.github.com> * Allow changing card_id with PUT to dashcard for model-actions * Update tests after merge * Fix implicit delete and add better test coverage * Addressing review changes Add PUT test Add schema for dashboard-id and dashcard-id params Fix select ordering in test * Model Actions: Frontend (#25646) * save actions in models * list model actions on detail page (#25648) * Link Dashcards to model-based actions (#25770) * Link dashcards to model-based actions * address review comments * Data apps model actions implicit creator (#25807) * Link dashcards to model-based actions * address review comments * Link dashcards to model-based actions * Allow implicit actions to be used like explicit ones * address review comments Co-authored-by:
Anton Kulyk <kuliks.anton@gmail.com> Co-authored-by:
metamben <103100869+metamben@users.noreply.github.com> Co-authored-by:
Ryan Laurie <30528226+iethree@users.noreply.github.com> Co-authored-by:
Anton Kulyk <kuliks.anton@gmail.com> Co-authored-by:
Kyle Doherty <5248953+kdoh@users.noreply.github.com>
-
Aleksandr Lesnenko authored
* support static row chart on the backend * update and add types * update types * add chart columns helper, dataset grouping * add viz settings helpers * fix text measuring * add generic row chart component for static and dynamic rendering * update deps * fix jest config for d3 * allow importing cljs in static viz * add a hook for getting chart columns and series * add a static row chart * build cljs before static viz * specs * add stories, moved isomorphic row chart component to the shared folder * update import * fix backend merge * remove an extra line * one more extra line * exclude unused props from the row chart * cleanup * review * fix types * fix log scale * add visual spec, fix goal label truncate * review * fix mock path * fix specs
-
- Oct 07, 2022
-
-
Mahatthana (Kelvin) Nomsawadi authored
* Basic static gauge chart * Add gauge segment min max labels * Add gauge segment label * Cleanup code * Fix React list key error * Remove hard-coded colors * Make the everything calculates at the gauge center * Make gauge segment data easier to understand * Example scaling chart to avoid label overflow * Avoid long labels overflow by scaling the gauge chart down * Match gauge needle color with the design * Fix hard coded gauge segment label anchor calculation * Fix static gauge chart not rotate gauge needle correctly * Add E2E for static gauge chart * Fix `transform-origin: center` not working with BE static chart * Truncate long segment label so charts can never be too small * Fix gauge segment not connected to each other * Static chart refactor part 1 * Final static gauge chart refactoring * Simplify clojure chart render function * Fix relative imports * Make overlapping gauge labels more legible * Make GaugeLabelData property orders consistent * Make a function easier to read * Make the calculation more correct though the behavior would still be the same * Separate presentational component out of the Gauge component * Remove unused tap> * Fix gauge chart not working on chart tester in internal static viz page * Fix gauge chart not rendered with Lato font * Improve internal page static chart tester option clarity * Support column settings in gauge charts * Add unit tests for static gauge chart utils * Address review * Fix unittest failure
-
- Sep 29, 2022
-
-
Cam Saul authored
* Make Database details NOT NULL; add defaults for Database created_at and updated_at * Add default value for `:details` to SerDes load-xform * Fix MySQL UTF-8 test
-
- Sep 27, 2022
-
-
Mahatthana (Kelvin) Nomsawadi authored
* Refactor static waterfall chart to use a single entrypoint * Consolidate static watetrfall chart * Update waterfall chart text size to match combo-chart * Move `<Values />` from XYChart/ to be under components/ Since it'll be used by waterfall chart * Fix `<Values />` key error (forgot to add key attribute) * Show data point values on waterfall chart * Fix failed BE tests * Fix test -> wrong `waterfall-type` used. And test both types The waterfall component was changed to take a type argument, instead of having 2 functions for nearly identical output. The failing test just passed the wrong string to the key argument. * Change waterfall keys from strings to Clojure keys * Remove redundant test. Categorical also handled in `waterfall-test` * Fix clj-kondo lint error * Cleanup conditional statements * Miscellaneous code cleanup * Update waterfall test to render data point values * Fix waterfall chart data point values not center in the bar * Make some API for static waterfall chart with total saner Co-authored-by:
Adam James <adam.vermeer2@gmail.com>
-
- Sep 16, 2022
-
-
Aleksandr Lesnenko authored
* remove unused static chart types * add visual tests for single series charts
-
- Sep 06, 2022
-
-
Cam Saul authored
* Rename DashboardCard `sizeX` and `sizeY` to `size_x` and `size_y` (#16344) * Fix migration * Fix MySQL/MariaDB
-
- Aug 25, 2022
-
-
Case Nelson authored
* [App] Add action_id to dashcard and endpoint for execution With app forms, we will be inlining action execution. So this PR is in preparation for that inlining and removing the need for createing Emitters in order to execute actions. Mirrors card querying from dashcards. This expects parameter_mappings of the dashboardcard to hold the mappings for execution, in the same shape as other dashcards. Instead of referencing a card_id, we reference an action_id. Emitters may be removed entirely in a future PR. * Fix extra require lint * Add checks for superuser and feature enabled to execution route. Fix code review comments * Add missing comment to migration
-
metamben authored
-
- Aug 23, 2022
-
-
Alexander Polyankin authored
-
- Aug 22, 2022
-
-
Case Nelson authored
* [Apps] Initial migrations and endpoints Addresses #24879 and #24880, part of #24861 `App` is a container that brings various dashboards together into a cohesive unit. The field `nav_items` is used for sidebar navigation within the app. The items in it will be managed by the front end and could contain link definitions to dashboards or arbitrary urls.
-
Alexander Polyankin authored
-
- Aug 18, 2022
-
-
Aleksandr Lesnenko authored
* fix static viz waterfall colors * tests * Pass colors into StaticChart as third argument This might not be the best design, so changes are welcome, but I added this to properly consider the case where the application-colors are different, but the chart has no viz-settings: application-colors were being ignored (as they were passed into options, but not pulled out of options into the colors arg). * review Co-authored-by:
Adam James <adam.vermeer2@gmail.com>
-
- Aug 10, 2022
-
-
Case Nelson authored
* Move writeback migrations to 45 * Empty commit to trigger GitHub Actions * [Actions] Simplify emitter schema model emitter_action was dropped since emitters just have a singular action and the join table was unecessary. emitter_action.action_id columns moved onto emitter table. Dropped CardEmitter and DashboardEmitter pre-insert, pre-update, pre-delete since they were used in tests only and normal operation would see the emitter inserted first. Since previous code may have 'orphaned' emitters without an action, we delete emitters without action to be safe. * Handle flakiness with geojson java.net.UnknownHostException errors (#24523) * Handle flakiness with geojson java.net.UnknownHostException errors In CI seems like we are getting errant errors: ```clojure geojson.clj:62 It validates URLs and files appropriately http://0xc0000200 expected: (valid? geojson) actual: #error { :cause "Invalid IP address literal: 0xc0000200" :via [{:type clojure.lang.ExceptionInfo :message "Invalid GeoJSON file location: must either start with http:// or https:// or be a relative path to a file on the classpath. URLs referring to hosts that supply internal hosting metadata are prohibited." :data {:status-code 400, :url "http://0xc0000200"} :at [metabase.api.geojson$valid_url_QMARK_ invokeStatic "geojson.clj" 62]} {:type java.net.UnknownHostException :message "0xc0000200" :at [java.net.InetAddress getAllByName "InetAddress.java" 1340]} {:type java.lang.IllegalArgumentException :message "Invalid IP address literal: 0xc0000200" :at [sun.net.util.IPAddressUtil validateNumericFormatV4 "IPAddressUtil.java" 150]}] ``` Not clear if this change has a hope of fixing it: if it doesn't resolve once its possible it is cached somewhere in the network stack, or it won't resolve if you ask again. But gonna give it a shot. Set the property `"networkaddress.cache.negative.ttl"` to `"0"` > networkaddress.cache.negative.ttl (default: 10) > Indicates the caching policy for un-successful name lookups from the name service. The value is specified as an integer to indicate the number of seconds to cache the failure for un-successful lookups. > A value of 0 indicates "never cache". A value of -1 indicates "cache forever". From https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/net/InetAddress.html in the hopes that we can try multiple times. Restores the original value after the test completes so we don't inadvertently change behavior elsewhere. If we get an error of java.net.UnknownHostException we try again if we have attempts remaining. If we get a boolean it means the ip resolution worked so we can rely on the response (checking if it resolves locally or not) * add a delay * comment out test Co-authored-by:
Cam Saul <github@camsaul.com> Co-authored-by:
dpsutton <dan@dpsutton.com>
-
- Aug 05, 2022
-
-
Cam Saul authored
* Move writeback migrations to 45 * Empty commit to trigger GitHub Actions * Handle flakiness with geojson java.net.UnknownHostException errors (#24523) * Handle flakiness with geojson java.net.UnknownHostException errors In CI seems like we are getting errant errors: ```clojure geojson.clj:62 It validates URLs and files appropriately http://0xc0000200 expected: (valid? geojson) actual: #error { :cause "Invalid IP address literal: 0xc0000200" :via [{:type clojure.lang.ExceptionInfo :message "Invalid GeoJSON file location: must either start with http:// or https:// or be a relative path to a file on the classpath. URLs referring to hosts that supply internal hosting metadata are prohibited." :data {:status-code 400, :url "http://0xc0000200"} :at [metabase.api.geojson$valid_url_QMARK_ invokeStatic "geojson.clj" 62]} {:type java.net.UnknownHostException :message "0xc0000200" :at [java.net.InetAddress getAllByName "InetAddress.java" 1340]} {:type java.lang.IllegalArgumentException :message "Invalid IP address literal: 0xc0000200" :at [sun.net.util.IPAddressUtil validateNumericFormatV4 "IPAddressUtil.java" 150]}] ``` Not clear if this change has a hope of fixing it: if it doesn't resolve once its possible it is cached somewhere in the network stack, or it won't resolve if you ask again. But gonna give it a shot. Set the property `"networkaddress.cache.negative.ttl"` to `"0"` > networkaddress.cache.negative.ttl (default: 10) > Indicates the caching policy for un-successful name lookups from the name service. The value is specified as an integer to indicate the number of seconds to cache the failure for un-successful lookups. > A value of 0 indicates "never cache". A value of -1 indicates "cache forever". From https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/net/InetAddress.html in the hopes that we can try multiple times. Restores the original value after the test completes so we don't inadvertently change behavior elsewhere. If we get an error of java.net.UnknownHostException we try again if we have attempts remaining. If we get a boolean it means the ip resolution worked so we can rely on the response (checking if it resolves locally or not) * add a delay * comment out test Co-authored-by:
dpsutton <dan@dpsutton.com> Co-authored-by:
Case Nelson <case@metabase.com>
-
- Aug 04, 2022
-
-
metamben authored
See https://github.com/metabase/metabase/issues/22867 for context.
-
- Jul 27, 2022
-
-
Ngoc Khuat authored
* revert #23658 * keep the migration to add native_query_snippet.template_tag, add a new migration to drop it * Remove snippet parameter support in fully parametrized check Co-authored-by:
Tamás Benkő <tamas@metabase.com>
-
- Jul 26, 2022
-
-
dpsutton authored
* Set a timeout for `isValidTimeout` When using ssh with db connections: Our theory is that the db connection has no idea that it sits on top of an ssh connection. And if the ssh connection dies (ie, `show full processlist` and then `kill <id>` from that list in mysql) the db connection has no idea it is dead. "It" is valid but its ssh transport is dead. > It is possible to customize how c3p0's DefaultConnectionTester tests > when no preferredTestQuery or automaticTestTable are available. Please > see Configuring DefaultConnectionTester.isValidTimeout and Configuring > DefaultConnectionTester.QuerylessTestRunner. from https://www.mchange.com/projects/c3p0/#automaticTestTable > Configuring DefaultConnectionTester.isValidTimeout > Under circumstances when the JDBC 4+ isValid(...) test will be used by > c3p0's built in DefaultConnectionTester (see below), by default the test > will never time out. If you would the test to timeout and fail, set the > following key > com.mchange.v2.c3p0.impl.DefaultConnectionTester.isValidTimeout > to the desired timeout, in seconds. https://www.mchange.com/projects/c3p0/#configuring_dctivt * Bump to 6 seconds. Worried 3 might be a bit too quick
-
- Jul 21, 2022
-
-
Braden Shepherdson authored
-
- Jul 14, 2022
-
-
Alexander Polyankin authored
-
- Jul 13, 2022
-
-
Ngoc Khuat authored
-
- Jul 12, 2022
-
-
Noah Moss authored
* first pass at parameters in text cards on FE * trying to get translations working * relative datetime formatting * copy changes and 'Text card' header * default text when no params * hide header for text cards with height of 1 with params when in param mapping mode * show UI text in mobile mode * minor fixes * enforce that a text card variable can only be mapped to one parameter * more value formatting * noop * fix backend tests * add back a couple pieces of frontend logic commented out * misc cleanup * attempt at adding a FE unit test * revert unit test, doesn't work * add a couple of basic cypress tests and fix a couple of bugs * basic unit tests for cljc * fix error * expanded unit tests * simplify ns * add cypress test for instance language translation * basic handling for a couple cases of :date/all-options * trs docstring clarification * whitespace tweaks * fix cypress test * minor refactor of tag-names * move cljc file from utils to new parameters dir * reorder functions * fix lint * add test assertion that locale is correctly reset back to english, and add a comment * fix bug where existing parameter mapping target was not being found * clojure logic tweaks * move text card header text to the Text component config * simplify header logic, and pull out isLoading into a function to reduce complexity * address alex's css feedback * fix trs comment
-
- Jul 06, 2022
-
-
Ngoc Khuat authored
-
Ngoc Khuat authored
* change metabase_fieldvalues.type from text to varchar so we could have a defaultValue * change report_card.parameters and report_card.parameter_mappings to nullable * metabase_fieldvalues.type is not nullable * varchar(254) -> varchar(32)
-
- Jul 05, 2022
-
-
Ngoc Khuat authored
* Store Sandboxed FieldValues * locked-filter -> linked-filter * resolve Noah and Braden comments * Ensure current code does not confuse with the new added FieldValues type (#23601) * makes sure the old code returns the correct FieldValues after adding new FieldValues types * use threading macro to make at test easier to read * Job to clean expired advanced field values (#23437) * add a clean job * merge upstream * use java-time for max-age var * simplify a reduce function and update some tests to make it easier to understand
-
- Jun 29, 2022
-
-
Gustavo Saiani authored
-