Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Jan 05, 2023
    • Anton Kulyk's avatar
      Improve sample state fixture (#27399) · 22c19cb6
      Anton Kulyk authored
      * Remove not used `StaticEntitiesProvider`
      
      * Fix typos
      
      * Convert sample database fixture to TypeScript
      
      * Fix `EnhancedState` typing
      
      * Remove global eslint comment
      
      * Fix invalid import
      
      * Fix incorrect type
      22c19cb6
    • Anton Kulyk's avatar
      Merge MetabaseSettings and metabase-types settings type (#27528) · 73b6ee7d
      Anton Kulyk authored
      * Add missing fields to `Settings` type
      
      * Make `MetabaseSettings` use up-to-date setting types
      
      * Fix type errors
      73b6ee7d
    • Anton Kulyk's avatar
      Improve `renderWithProviders` test utility (#27398) · c7483334
      Anton Kulyk authored
      * Fix error about redux store fixture
      
      * Always add settings and embedding reducers
      
      * Add `value` to `SettingDefinition` type
      
      * Add `settings` type to admin state branch type
      
      * Add `users` to entities state
      
      * Convert `__support__/ui` to TypeScript
      
      * Fix error when rendering with router mock
      
      * Remove `form` from redux state
      
      * Address feedback
      
      * Fix tests setup
      
      * Add return type
      c7483334
    • Aleksandr Lesnenko's avatar
      Add new data tooltip to row chart (#27516) · a713d750
      Aleksandr Lesnenko authored
      * add the new revamped tooltip to row charts
      
      * more specs
      a713d750
    • Gustavo Saiani's avatar
    • Cal Herries's avatar
      Update supported DBs (#27522) · 1099f762
      Cal Herries authored
      1099f762
    • Cal Herries's avatar
      datetime-diff function for MongoDB (#27042) · ba581fa6
      Cal Herries authored
      
      * Fix mongo version checking for now
      
      * Add minor versions for comparison
      
      * Handle nil case
      
      * newline
      
      * Replace _
      
      * Use dbms-version semantic-version instead
      
      * Compare only the major and minor version
      
      * Fix mongo database-supports?
      
      * Fix duplicate require
      
      * Fix typo
      
      * Remove expressions from version check
      
      * Fix various mongo expressions
      
      `trim`, `rtrim`, `ltrim` needed to be wrapped in `{"input" expr}` object
      `replace` needed to be wrapped in `{"input" expr "find" ...
      "replacement" ...}' object
      `substring` needed to fill in the 3rd argument, optional in mbql but
      required in mongo. Also to use a 1 based index
      
      * Generalize semantic-version-gte
      
      * Used synced dbms_version for testing feature support
      
      * Expressions are only supported by mongo 4.2+
      
      * Disable some tests
      
      * Fix mongo division
      
      Handle nulls with an upfront condition check.
      Handle multiple divisors.
      
      * Remove unused namespace
      
      * Throw exeception if using replace on mongo < 4.4
      
      * Skip test because of #27249
      
      * Move minimum Mongo CI version to 4.2
      
      * Fix sorting by expressions
      
      $sort needs to come before $project otherwise we can only see the
      projected fields, however expressions are only added in $project.
      
      So now if a sort includes an expression, we will use $addFields to be
      able to sort by that expression.
      
      * Disable tests for expressions inside aggregations
      
      To be addressed by #27275
      
      * Handle aggregation nested in an expression
      
      * Remove :truncation-start workaround
      
      * Enable tests for expressions inside aggregations
      
      * Fix datetime-math-tests
      
      * Make sure dbms_version is included when fetching database for store
      
      * Update doc for replace to indicate it should replace all occurrences
      
      * Add mongo datetime-diff
      
      * Fix database-supports?
      
      * Fix order-by-test
      
      * Handle embedded special aggregations (#27315)
      
      * Handle embedded special aggregations
      * Preserve aggregation options for nested aggregations
      * Use top-level aggregation name as group name
      
      * Disable nil punning on semantic version check (#27317)
      
      * Remove nil punning from database-supports?
      
      * Formatting
      
      * Refactor based on Tamas' suggestions
      
      * Change datetime-diff from case statement to multimethod
      
      Co-authored-by: default avatarCase Nelson <case@metabase.com>
      Co-authored-by: default avatarTamás Benkő <tamas@metabase.com>
      Co-authored-by: default avatarmetamben <103100869+metamben@users.noreply.github.com>
      ba581fa6
    • Ngoc Khuat's avatar
      `metabase.util.schema` to Malli (#27471) · 6d7f778e
      Ngoc Khuat authored
      6d7f778e
    • Cal Herries's avatar
      Fix: Setting a very high Session Timeout causes instance to stop working (#27347) · 304552fd
      Cal Herries authored
      
      * Limit session timeout amount to less than 1 million
      
      * Limit the max timeout to 100 years
      
      * Validate on BE too
      
      * Typo
      
      * Add comment to FE
      
      * Fix BE validation
      
      * Fix BE validation
      
      * Add BE test
      
      * Change FE validation to mirror BE validation
      
      * Add unit test for SessionTimeoutSetting
      
      * Refactor FE unit tests
      
      * Move comment
      
      * Add check for positive amount to BE validation
      
      * Add more BE tests
      
      * Refactor validate function
      
      * Remove cleanup()
      
      * Use ToBeInTheDocument instead
      
      * Use getByText
      
      * Remove conditional expect
      
      * Remove unused import
      
      * Refactor for clarity
      
      * Formatting
      
      * Validate session-timeout in getter too
      
      * Add docstring to check-session-timeout and make private
      
      * Change getter to print warning string instead of throw exception
      
      * Format import
      
      * i18n and use log/warn in getter, and throw 400 in setter
      
      * Reorder require
      
      * Use cam's suggestion
      
      Co-authored-by: default avatarCam Saul <1455846+camsaul@users.noreply.github.com>
      
      Co-authored-by: default avatarCam Saul <1455846+camsaul@users.noreply.github.com>
      304552fd
  2. Jan 04, 2023
    • Aleksandr Lesnenko's avatar
    • Jeff Bruemmer's avatar
      update api docs (#27510) · 49a2b1db
      Jeff Bruemmer authored
      49a2b1db
    • Gustavo Saiani's avatar
    • Tim Macdonald's avatar
      Upgrade Mongo to 4.2 in workflow to skip driver checks (#27498) · 9495211c
      Tim Macdonald authored
      (Should have been part of [#27176])
      9495211c
    • metamben's avatar
      Cherry pick be data apps minus apps and pages (#27413) · 3b8f0d88
      metamben authored
      
      * Implicit action pre-fetch values (#25940)
      
      * [Apps] Implicit action pre-fetch values
      
      WIP To return a parameter-id: value map in order to prefill ui.
      
      * Use jsonstring encoded parameters
      
      * Change parameters exposed by implicit actions
      
      Previously, we would look at a model's source-table to determine which
      parameters were valid for implicit actions. So if an implicit action is
      on a User model that hides the user.password column, you could still
      update or insert the password.
      
      With this commit, if the model doesn't expose a source table column, it
      is not a valid parameter. In the example user.password could not be
      inserted/updated or fetched for prefilling.
      
      * Fixing tests
      
      * Show data app page ID params in editing mode (#25943)
      
      * Data apps layout updates (#25930)
      
      * play with grid sizes to make apps feel appier [ci skip]
      
      * move app nav to bar inside app
      
      * only hide other header buttons outside of edit mode
      
      * tweak overflow issue
      
      * fix header width on data apps
      
      * add control to see app contents
      
      * set data apps layout constants contextually [ci skip]
      
      * remove hardcoded value [ci skip]
      
      * extract conextual header styles [ci skip]
      
      * set max-width on paramaters for data apps [ci skip]
      
      * move data apps nav deeper, only show if not editing [ci skip]
      
      * add spacing to contents trigger, rm old code [ci skip]
      
      * rm table thing for now [ci skip]
      
      * Fixes for data app layout updates (#25962)
      
      * Reorder import
      
      * Fix type
      
      * Fix missing translation, move out URL
      
      * Remove not used import
      
      * Rework `getSelectedItems` utility for data apps
      
      * Fix selected data app page highlighting
      
      * Don't reload app navbar on page change
      
      * Change nav item links look
      
      * Remove `DataAppPageSidebarLink`
      
      * Turn nav into HTML list
      
      * Use styled components
      
      * Fix edit button covered by visualizations
      
      * Fix opening homepage
      
      * Remove redundant prop
      
      Co-authored-by: default avatarAnton Kulyk <kuliks.anton@gmail.com>
      
      * First take at parameterized data app page titles (#25938)
      
      * Bring `DataAppContext` back
      
      * Pass `onFocus` and `onBlur` to `EditableText`
      
      * Export `EditableTextProps`
      
      * Add basic `DataAppPageTitle` component
      
      * Use `DataAppPageTitle`
      
      * Fix component name
      
      * Add primitive autocompletion to page title input
      
      * Add `title_template` to `DataAppNavItem` type
      
      * Tweak value management in `DataAppPageTitle`
      
      * Handle `null` values in titles more gracefully
      
      * Don't show suggestions without detail cards
      
      * Don't add whitespace when pasting a token
      
      * Don't update app's collection all the time
      
      * Add data app related selectors to dashboard selectors
      
      * Add redux state to keep title template changes
      
      * Update page title template on page save
      
      * Wire up `DataAppPageTitle` with dashboard code
      
      * Fix unit tests
      
      * Reset state on exiting editing mode
      
      * Add back button to template data picker
      
      * Fix test that didn't include pk on insert
      
      * Use the actual pk value
      
      Co-authored-by: default avatarAnton Kulyk <kuliks.anton@gmail.com>
      Co-authored-by: default avatarKyle Doherty <5248953+kdoh@users.noreply.github.com>
      
      * Revert "Remove data app permission code (#26016)"
      
      This reverts commit b8c92cf1.
      
      * Remove unused imports
      
      * Don't require the table_id on result_metadata elements (#26073)
      
      In some cases (which ones still has to be clarified) the result metadata doesn't
      contain the table_id and so no parameters are provided. In fact the table ID is
      probably not needed anyway because fields are already table specific.
      
      * Support filtering cards by used model (#26088)
      
      This change adds a new filter option for the GET /card endpoint.
      
      * Support filtering apps using a given model (#26124)
      
      * Handle type errors more cleanly (#26120)
      
      * [Apps] Handle type errors more cleanly
      
      Adds a number of tests for different db datatypes, these can be expanded
      on as we solve.
      
      Catches most exceptions during execution and logs then throws a generic
      message that leaks less of the details.
      
      * Make sure we order-by expected results
      
      * Fix tests, allow purposeful exception through
      
      * Accept model-ids for scaffolding apps (#26139)
      
      * [Apps] Accept model-ids for scaffolding apps
      
      WIP - accept model-ids but there's still some issues, might be able to
      start building UI from this point though.
      
      * Maybe working model
      
      * Work with card__n table-ids passed in. Fix problems with detail page
      
      * Dynamically add actions that exist on models
      
      * Update tests for existing custom actions
      
      * Can't def tru
      
      * Address review comments
      
      * Add required to action parameters (#26296)
      
      Looks at `database_required` field values for implicit actions, and
      `required` template-tags for custom query actions. Bubble those values
      up onto `action.parameters`. Finally, look at `requires_pk` to see if pk
      fields should be marked as required regardless.
      
      * Cleanup scaffolded back button (#26317)
      
      * Forward action execution error messages to the frontend (#26469)
      
      This is a crude temporary solution necessary to be able to debug problems related to executing actions.
      Although error parsing has been implemented for Postgres (only) with the goal to provide information for
      the FE like `{"errors":{"id":"violates foreign key constraint note_subject_id_fkey"}}`. This code doesn't
      care about the error message itself, it just forwards the error message from the DB to the FE.
      
      * Actions for public pages (#26554)
      
      * [Apps] Testing out public dashboards
      
      * Add WIP endpoints for public execution
      
      * Add throttle check to public execution route
      
      * Bump attempts-threshold to 1000
      
      * Bump threshold to 5000
      
      * Add test
      
      * Fix linter
      
      * Review changes
      
      * Fix lint
      
      * Run publicly shared actions with full permissions (#26610)
      
      * Support actions with MySQL and MariaDB (#26573)
      
      Support actions with MySQL/MariaDB
      
      * Check permissions for implicit actions (#26652)
      
      * Check permissions when executing implicit actions
      
      * Fix some action tests and reduce permissions boilerplate
      
      * Revert "[Apps] Disable data-apps prior to release (#25982)"
      
      This reverts commit 51147027.
      
      * WIP: Unify action representation (#26717) (#27349)
      
      * [Apps] WIP initial db migrations for giving implicit actions an action_id and removing card from query_action
      
      * Make crud work for http actions
      
      * Make implicit crud work
      
      * Rename implicit_action.namespace to kind. Rewrite merged-model-actions to actions-with-implicit-parameters
      
      * Fix query action creation
      
      * Make actions.test-util/with-action create a holding model
      
      * Fix unified-action-create-test
      
      * Fix get-action-test
      
      * Add tests for creating implicit and http dashcard actions
      
      * Enable query action in dashcard-action-create-update-test
      
      * Fix metabase.api.dashboard-test/dashcard-query-action-execution-test
      
      * Fix metabase.api.dashboard-test/dashcard-http-action-execution-test
      
      * Fix metabase.api.dashboard-test/dashcard-action-execution-auth-test
      
      * Fix metabase.api.dashboard-test/dashcard-action-execution-granular-auth-test
      
      * Make implicit action execution work
      
      * Scaffolding implicit actions from table
      
      * Fix metabase.api.action-test
      
      * Make scaffolding work with existing models. Update with-action macro to allow multiple actions
      
      * Fix metabase.api.public-test
      
      * Remove unused names from metabase.models.action
      
      * Remove some unused imports
      
      * Remove an unused import
      
      * Remove model_action and fix a bunch of tests
      
      * Fix dashcard-implicit-action-only-expose-and-allow-model-fields
      
      * Fix action type inheritance
      
      * Fill in remarks and add description to action
      
      * Add forward migration for existing actions and rollbacks that remove existing actions
      
      * Prevent overwriting parameters of custom actions
      
      * Support setting description on actions
      
      * Update migration to work with mysql - rollback is still not quite working in mysql due to database_id fk
      
      * Rename with-action macro to with-actions and document it
      
      * Remove report_card.is_write
      
      * Fix some more tests
      
      * Fix rollback across all appdb drivers, add not null constraints, use action.name to hold implicit slugs
      
      * Pull name and description from is_write card
      
      * Add name to scaffolded implicit actions
      
      * Remove ModelAction
      
      * Remove is_write from comments too
      
      * Different databases reference capture groups in regexp_replace differently. Also drop model_action table
      
      * Update migrations to pass linter.
      
      Introduce ${capturegroup.ref} to handle the different ways to reference
      capture groups within a regexp_replace. This allows collapsing large
      data migrations into a single `sql` element that the linter requires.
      
      * Add kind to action-mapper so we can sort as we wish
      
      * Add name to with-temp Action
      
      * Adjust FE to query actions migration (#26764)
      
      * Remove `is_write` card notion
      
      * Remove action `slug` from action types
      
      * Fix typo in `estimateCardSize` name
      
      * Remove hanging card's `is_write` prop
      
      * Remove not used writeback actions
      
      * Update endpoints
      
      * Remove not used prop
      
      * Remove action `slug` usage
      
      * Update actions entity
      
      * Tweak action creator to handle new actions shape
      
      * Fix saving action dashcards
      
      * Fix actions API usage
      
      How did that work before? :thinking:
      
      
      
      * Pass `database_id` when creating query actions
      
      * Remove custom list API implementation for actions
      
      * Clean up types
      
      Co-authored-by: default avatarTamás Benkő <tamas@metabase.com>
      
      * Change regexp_replace to substring to support mysql - this is ok because we have consistent json serialization.
      
      * Check permissions on the model in the action API
      
      * Remove unused required namespace
      
      * Throw an exception when demoting a model with actions to question
      
      * Allow saved parameters on implicit actions to add to implicit parameters
      
      Co-authored-by: default avatarCase Nelson <case@metabase.com>
      Co-authored-by: default avatarAnton Kulyk <kuliks.anton@gmail.com>
      
      Co-authored-by: default avatarmetamben <103100869+metamben@users.noreply.github.com>
      Co-authored-by: default avatarCase Nelson <case@metabase.com>
      
      * empty commit to kick CI
      
      * bump CI
      
      * Fix down migrations
      
       change v45.00-002 sets up a fk fk_query_action_ref_action_id. h2 v2 for
       some strange reason requires us to remove the constraint before we can
       remove the primary key. But then we have to restore the state that
       v45.00-002 creates manualy
      
      * Allow for version for `(migrate! :down 45)`
      
      * Remove data apps parts not planned for 0.46
      
      Removed app container, app scaffolding and pages (dashboards with is_app_page)
      
      * Address linter issues
      
      * Make some cosmetic changes to reduce the diff
      
      * Make new permission API endpoints use defendpoint-schema
      
      * Fix bad automerge
      
      * Skip Mongo 4.2 instead of 4.0
      
      Co-authored-by: default avatarCase Nelson <case@metabase.com>
      Co-authored-by: default avatarAnton Kulyk <kuliks.anton@gmail.com>
      Co-authored-by: default avatarKyle Doherty <5248953+kdoh@users.noreply.github.com>
      Co-authored-by: default avatardan sutton <dan@dpsutton.com>
      3b8f0d88
    • Gustavo Saiani's avatar
      Style Google SSO Button to fit mobile · 9666e34b
      Gustavo Saiani authored
      9666e34b
    • Noah Moss's avatar
      Update data perms graph API to accept sandboxes and save them transactionally... · c21af527
      Noah Moss authored
      Update data perms graph API to accept sandboxes and save them transactionally with the permissions graph (#27434)
      
      * basic implementation and happy path tests
      
      * error handling & include changed sandboxes in result
      
      * whitespace fix
      c21af527
    • Jeff Bruemmer's avatar
    • Alexander Polyankin's avatar
  3. Jan 03, 2023
    • Case Nelson's avatar
      Mongo remove v3 support (#27176) · 9c6997bb
      Case Nelson authored
      
      * Fix mongo version checking for now
      
      * Add minor versions for comparison
      
      * Handle nil case
      
      * newline
      
      * Replace _
      
      * Use dbms-version semantic-version instead
      
      * Compare only the major and minor version
      
      * Fix mongo database-supports?
      
      * Fix duplicate require
      
      * Fix typo
      
      * Remove expressions from version check
      
      * Fix various mongo expressions
      
      `trim`, `rtrim`, `ltrim` needed to be wrapped in `{"input" expr}` object
      `replace` needed to be wrapped in `{"input" expr "find" ...
      "replacement" ...}' object
      `substring` needed to fill in the 3rd argument, optional in mbql but
      required in mongo. Also to use a 1 based index
      
      * Generalize semantic-version-gte
      
      * Used synced dbms_version for testing feature support
      
      * Expressions are only supported by mongo 4.2+
      
      * Disable some tests
      
      * Fix mongo division
      
      Handle nulls with an upfront condition check.
      Handle multiple divisors.
      
      * Remove unused namespace
      
      * Throw exeception if using replace on mongo < 4.4
      
      * Skip test because of #27249
      
      * Move minimum Mongo CI version to 4.2
      
      * Fix sorting by expressions
      
      $sort needs to come before $project otherwise we can only see the
      projected fields, however expressions are only added in $project.
      
      So now if a sort includes an expression, we will use $addFields to be
      able to sort by that expression.
      
      * Disable tests for expressions inside aggregations
      
      To be addressed by #27275
      
      * Handle aggregation nested in an expression
      
      * Remove :truncation-start workaround
      
      * Enable tests for expressions inside aggregations
      
      * Fix datetime-math-tests
      
      * Make sure dbms_version is included when fetching database for store
      
      * Update doc for replace to indicate it should replace all occurrences
      
      * Fix order-by-test
      
      * Handle embedded special aggregations (#27315)
      
      * Handle embedded special aggregations
      * Preserve aggregation options for nested aggregations
      * Use top-level aggregation name as group name
      
      * Disable nil punning on semantic version check (#27317)
      
      * Optimize produced query for division when dividing by literals
      
      * Rename var
      
      * Use reduce to build division
      
      * Fix reduction
      
      * Clean up formatting and document some details
      
      Co-authored-by: default avatarCallum Herries <hi@callumherries.com>
      Co-authored-by: default avatarTamás Benkő <tamas@metabase.com>
      Co-authored-by: default avatarmetamben <103100869+metamben@users.noreply.github.com>
      9c6997bb
    • Cam Saul's avatar
      [Toucan 2 Prep] Add `define-*-hydration-method` macros (#27475) · 13f5d3d8
      Cam Saul authored
      * [Toucan 2 Prep] Add helper for extending `IModel`; namespace Toucan properties
      
      * Clean namespaces
      
      * Test fixes :wrench:
      
      * [Toucan 2 Prep] Add `define-*-hydration-method` macros
      
      * Sort namespaces
      
      * Disable Eastwood `:unused-private-vars` linter
      13f5d3d8
    • Luis Paolini's avatar
      Simplify dockerfile (#27463) · 84725d36
      Luis Paolini authored
      Simplify the main Dockerfile removing custom circleci images
      84725d36
    • Bryan Maass's avatar
      Start malli-dev mode in (dev/start!) iff is-dev? (#27473) · d2f10e9f
      Bryan Maass authored
      - add the rest of malli reserved aliases
      - malli.util :as [mu -> mut] (had collision with metabase.util.malli)
      d2f10e9f
    • Cam Saul's avatar
      [Toucan 2 Prep] Add helper for extending `IModel`; namespace Toucan properties (#27474) · 2d22d3af
      Cam Saul authored
      * [Toucan 2 Prep] Add helper for extending `IModel`; namespace Toucan properties
      
      * Clean namespaces
      
      * Test fixes :wrench:
      2d22d3af
    • Cal Herries's avatar
      datetime-diff function for athena (#27205) · ae59ec81
      Cal Herries authored
      * Add datetime-diff implementation for athena
      
      * Don't run some tests for drivers not supporting timestamptz
      
      * Fix for date types
      
      * Use date-trunc helper
      
      * Add comment about Athena's timestamp with time zone type
      
      * Add datetime-diff-time-zones-athena-test
      
      * Fix typo
      
      * Fix typo
      
      * Rewrite comment
      
      * Tidying
      
      * Add athena-datetime-diff-mixed-types-test
      
      * Fix typo
      
      * Adjust comments + formatting
      
      * Adjust comments
      
      * Format SQL query
      
      * Align requires
      ae59ec81
    • Cal Herries's avatar
      datetime-diff function for SQLite (#27076) · ff2934bf
      Cal Herries authored
      * Add sqlite datetime-diff
      
      * Refactor sqlite
      
      * Exclude sqlite from datetime-diff-type-test
      
      * Fix sqlite temporal fields losing type info on sql.qp->honeysql
      
      * Leave the default impl for sql.qp/date
      ff2934bf
    • Cal Herries's avatar
      datetime-diff function for Oracle (#27196) · 3779a169
      Cal Herries authored
      * Add oracle datetime-diff
      
      * Remove duplicate method impls
      
      * Remove unused require
      3779a169
  4. Dec 31, 2022
  5. Dec 29, 2022
  6. Dec 28, 2022
Loading