This project is mirrored from https://github.com/metabase/metabase.
Pull mirroring updated .
- Oct 23, 2024
-
-
Noah Moss authored
Co-authored-by:
Ryan Laurie <iethree@gmail.com>
-
- Oct 22, 2024
-
-
Romeo Van Snick authored
* Fix reference in deprecation notice * Add lock_filled icon * Add view-only tag to the question header for questions with hidden source tables * Simplify the useHasHiddenSourceTables helper * Add typings to useHasHiddenSourceTables * Show 'view-only' badge when the question is not editable * Set up card endpoints * Add test for hidden tables * Add e2e test for View-only tag * Add visibilityType to TableDisplayInfo * Use unfiltered table display info to determine which tables are hidden * Rename util to hooks * Use rem for border-radius * Sign in in beforeEach * Add tests for more visibility types * Fix unit tests * Remove empty file * Add test for unavailable cards * Remove unnecessary card endpoint * Add unit test for inaccessible card * Move ViewOnlyTag to it's own file * Add more unit tests for ViewOnly tag * Use MBQL to create queryies where possible
-
- Oct 14, 2024
-
-
Cam Saul authored
* Collapse `metabase.shared.*` namespaces * Fix Kondo warnings * Does updating the stories-data keys fix the failing tests? * Appease msgcat * Appease msgcat * Fix typo * Make the build happy * Appease fslint
-
Romeo Van Snick authored
* Add eslint-plugin-jest-formatting * Turn on jest formatting for unit.spec and cy.spec files * Fix e2e test formatting * Fix unit test formatting * Fix formatting in frontend/test * Remove commented out code Co-authored-by:
Kamil Mielnik <kamil@kamilmielnik.com> * Fix more files * Fix more lint --------- Co-authored-by:
Kamil Mielnik <kamil@kamilmielnik.com>
-
- Oct 08, 2024
-
-
Alexander Polyankin authored
-
- Oct 01, 2024
-
-
Kamil Mielnik authored
* Allow using metrics with offset in custom expressions * Unskip and update repro
-
- Sep 24, 2024
-
-
Romeo Van Snick authored
* Use default values for parameters in dashboard filters when used from click action * Add test for setting non-specified parameters to default in dashboard accessed via click action
-
- Sep 12, 2024
-
-
Ryan Laurie authored
* more detailed question info small styling updates refine styling to match designs update more e2e test remove some changes small styling updates more question details more question details DateTime to typescript test updates type updates export fix fixes * Icon Updates * consolidate styles * test updates * address review comments
-
Nicolò Pretto authored
-
- Sep 05, 2024
-
-
Oisin Coveney authored
-
Romeo Van Snick authored
* Rename 'Date Filter' to 'All Options' in field filters * Fix i18n test
-
- Aug 29, 2024
-
-
Dennis Schridde authored
== Goal == Hide attached DWH database details from anyone incl. admins: * Do not show them in the UI * Do not permit to change them * Do not serialize them The aim is that customers cannot gain access to (parts of) credentials, and they cannot break a feature they are paying for by changing connection details. == Implementation == The Metabase backend already contains provisions in the implementation of `metabase.models.interface/to-json` for `:model/Database` to hide the `details` of the database in HTTP responses, if the user lacks write permission on the database. We utilize this by adding an `is_attached_dwh` column to the `database` table and rejecting `metabase.models.interface/can-write?` when this flag is enabled. In the "admin" UI, we show a replacement text instead of the edit form when the flag is set. (It might be correct to show this whenever `details` is absent. See below for possible follow-up work.) However, several sections of the frontend code expected the `details` field to always be present. In order to make `details` optional, as the backend seems to handle it, we fix the respective code to treat this case in the way that appears appropriate in the context. Database details are already generally excluded from H2 dump snapshots (see `metabase.cmd.copy/*copy-h2-database-details*`), thus nothing changes there. == How to test == === New behaviour === Setting the `is_attached_dwh` field hides the database details: 1. Configure a database as described in https://www.metabase.com/docs/latest/configuring-metabase/config-file#databases. - In addition to the fields you would normally set, also set `is_attached_dwh: true`. - This also works when adding this flag to a database that previously did not have this flag set. 2. Start your Metabase instance. 3. Verify the database shows up in the "admin" section (`/admin/databases`). 4. Verify that clicking the database to see its details only reveals "This database cannot be modified." 5. Verify that responses from the backend do not include a `details` field for this database. === Original behaviour === Behaviour without setting the `is_attached_dwh` field is unchanged: 1. Configure a database as described in https://www.metabase.com/docs/latest/configuring-metabase/config-file#databases. - Only set the fields you would normally set. Do not set `is_attached_dwh` (or set it to `false`). 2. Start your Metabase instance. 3. Verify the database shows up in the "admin" section (`/admin/databases`). 4. Verify that clicking the database to see its details only reveal the regular edit form, showing connection fields like `host`, `user`, etc. with the values you configured. == How this will be rolled out == 1. Upgrade existing Metabase Cloud instances with data warehouse to a Metabase version that supports `is_attached_dwh`. 2. Set `is_attached_dwh` in the database section of the config file for Metabase Cloud instances with a data warehouse. == Possible follow-up work == In https://github.com/metabase/metabase/issues/25715, absent `database.details` was identified as a bug. Since then, `details` was made `NOT NULL` in the application database, so this bug can no longer occur. However, today backend responses can be missing the `details` field, if the current user lacks write permission to the database setting (see above). Fully re-evaluating the fix to #25715 in this context is outside the scope of this PR. Closes: https://github.com/metabase/harbormaster/issues/5051
-
- Aug 27, 2024
-
-
Raphael Krut-Landau authored
fix(questions + admin/performance): Improve Clear cache button text and question refresh button tooltip (#46791)
-
- Aug 26, 2024
-
-
Uladzimir Havenchyk authored
* fix import order in the files with disabled rules * remove hack * minor
-
- Aug 21, 2024
-
-
Ryan Laurie authored
* QuestionAlertWidget to FC + TS * update e2e tests * use regular alert for unsubscribes * Create Question and Dashboard Sharing Menu * Handle some edge cases * top notch unit tests * more testing and tweaking * fix imports * more tests * add alerts to question sharing menu * add tests for alerts * update e2e tests * use Oisin's toolbarbutton * fix rebase * prompt to save before sharing questions * show prompt to set up notification channels * fix import * update tests and hide on notebook screen * fixes * clean up pulse types * update e2e tests * fix a bunch more tests * more e2e test fixes * maybe green now?
* last one * design updates * make channel setup modal nicer * simpler component props * lint fix * lint fixes -
Alexander Polyankin authored
-
- Aug 20, 2024
-
-
Uladzimir Havenchyk authored
* refactor: sort import members inside destructuring * Show an error message when the temporal unit is not applicable to a dashboard card (#46983) * Fix tests * Add tests * Add tests * Fix types * Fix types --------- Co-authored-by:
Alexander Polyankin <alexander.polyankin@metabase.com>
-
- Aug 13, 2024
-
-
metamben authored
-
- Aug 12, 2024
-
-
Kamil Mielnik authored
* Refactor filter utils to TS * Remove type casts * Improve dimension instantiation * Fix typing
-
- Aug 08, 2024
-
-
Kamil Mielnik authored
* Add test boilerplate * Rename test and add assertions * Add broken test for models * Add unit of time tests * Deduplicate code * Add date parameter tests * Add test for multiple stages * Fix model test setup and refactor getColumnsInfos * Remove redundant assertions * Format codee * Extract createQuestion and createModel * Add unit of time model tests * Add test for model * Extract constants * Add a warning * Build dataset queries with mbql * Introduce queryOrders * Revert redundant change * Improve Question creation
-
- Aug 06, 2024
-
-
Alexander Polyankin authored
Support both name & field ref-based column keys in viz settings on read and upgrade on write (#46383)
-
- Aug 05, 2024
-
-
Kamil Mielnik authored
* Refactor dashboard helpers to TypeScript * Reuse existing helper * Refactor cy.createQuestionAndDashboard to a function helper - there was no good place to put it, so I also created new helpers/api directory - and I moved all helpers using cy.request (with 1 exception, where a CSV download helper also does a bunch of assertions) in there * Merge TS command definitions into a single file * Export types * Make dashboardDetails optional * Export StructuredQuestionDetails * Remove duplicated function * Extract createNativeQuestion to separate file - 1 exported helper per file, no exceptions! * Reuse const * Add test for unit of time parameters * Improve assertions * Extract createDashboardWithParameters * Add tests for time parameters * Fix hardcoded parameter_mappings ids * Format code * Extract checkButtonVisible * Improve test names * Add tests for location parameters * Reuse const * Update test name * Add WidgetStatusButton * Add unit tests for WidgetStatusButton * Rename handler * Remove redundant assertions * Add iconSize prop * Fix styling * Replace WidgetStatusIcon with WidgetStatusButton - Remove WidgetStatusIcon * Fix tooltip issue * Fix tooltip for good * Use default compact button size * Prevent overflow * Fix alignment issues in parameter sidebar - Remove iconSize prop - Simplify StatusConfig * Update padding in Unit of Time input to make it consistent with other inputs in dashboard parameter sidebar * Update unit tests * Rename WidgetStatusButton to WidgetStatus * Explicitly specify what is a button * Update helpers in tests * Update when buttons are displayed according to the new spec, update tests * Simplify label * Remove utils * Adjust padding * Update reset icon * Make the button gray when color is undesired * Remove old definitions * Add missing export * Remove unused type * Add test for location (single value) * Add test for id (single value) * Add more assertions * Add test for id (multiple values) * Improve name * Add tests for number (single and multi value) * Add tests for text (single and multi value) * Rename file * Update comment * Update test name * Use unique ids * Use new color name * Add a test for chevron icons alignment * Lift className up * Make types more specific * Sort attributes * Revert "Make types more specific" This reverts commit 2e6994b5. * Revert "Use new color name" This reverts commit 2cc68df6. * Remove TODO * Introduce editFilter util, refactor chevron assertions to work with any number of chevrons * Connect label to the default value input in ParameterSettings * Add a whitespace in the default value label when required "(required)" is shown * Add parameter sidebar tests for unit of time * Add parameter sidebar tests for date filters * Extract checkParameterSidebarDefaultValue * Add parameter sidebar tests for location - single values * Add parameter sidebar tests for location - multiple values * Use constants for test case names * Add parameter sidebar tests for id parameters - single values * Add parameter sidebar tests for id parameters - multi values * Add parameter sidebar tests for number parameters - single values * Add parameter sidebar tests for number parameters - multi values * Add parameter sidebar tests for text parameters - single values * Add parameter sidebar tests for text parameters - multi values * Extract checkDashboardFilters * Use checkDashboardFilters in time parameters * Use checkParameterSidebarDefaultValue in checkDashboardFilters * Use checkDashboardFilters everywhere * Sort helpers * Rename checkDashboardFilters to checkDashboardParameters * Rename checkOnlyOneButtonVisible to checkStatusIcon * Add test suite for sql filters, coverage for text filter - single value * Add a whitespace in the default value label when required "(required)" is shown - SQL filters - Similar to 930dd3a5 * Add test suite for sql filters, coverage for number filters * Add test for sql filters - date * Remove unused things, rename placeholder to labelOrPlaceholder * Apply label only to 1 input * Add test for sql filters - field parameters * Fix date tests * Make all sql filters tests work * Add assertions for required without default in text filters * Add assertions for required without default in date filters * Add assertions for required without default in field filters * Allow clearing required SQL filters without default value * Add a test to ensure comma-separated numeric values work * Update unit test * Update helper * Update e2e tests * Use != null and == null checks with defaultValue instead of just checking if its truthy/falsy * Run `yarn test-visual:loki` and then `yarn loki approve` - see https://metaboat.slack.com/archives/C505ZNNH4/p1721289287037069 * Use parameterHasNoDisplayValue to account for empty strings * Run `yarn test-visual:loki` and then `yarn loki approve` after merging master - see https://metaboat.slack.com/archives/C505ZNNH4/p1721289287037069 * Run `yarn test-visual:loki` and then `yarn loki approve` - see https://metaboat.slack.com/archives/C505ZNNH4/p1721289287037069 * Run `yarn test-visual:loki` and then `yarn loki approve` - see https://metaboat.slack.com/archives/C505ZNNH4/p1721289287037069
-
Romeo Van Snick authored
* Make number also have custom parameter values * Render the correct label in the dropdown for number inputs * Mock paramter values endpoint in number input test * Add test for custom labels on number input * Fix number input test * Allow entering comma separated values using labels * Only show custom labels in popover * Use getLabel and getValue helpers to avoid indexing confusion * Remove calls to parameter endpoints for number input * Do not parse the value from the label * Add support for number parameters in the source picker modal * Filter number values * Add e2e test for number parameters with custom source * Remove card option for number parameters * Set the correct initial value for number parameters without fields * Do not render number parameter as search box when it is a list * Fix e2e tests for number lists * Remove e2e tests for card source dashboard filters * Add tests for native filter custom source * Show the dropdown when picking the default value for number parameters * Clear values_source_config when changing parameter type * Restore a parameters' values_source_config when changing the parameter type back * Clear and restore values_source_config for template tags when chaning type * Add e2e test for restoring of template tag sources_value_config * Add e2e test for clear and restore of static-list for dashboard parameters * Fix input type for numbers * Fix broken test * Display labels for ParameterValuePicker too * Clear and restore values_source_type when changing parameter type * Clear and restore values_source_type for tag parameters * Clear and restore values_query_type when changing parameter type * Clear and restore value_query_type for parameters tags * Update tests to test for reset to also apply to values_source_config and values_query_type
-
- Jul 29, 2024
-
-
Aleksandr Lesnenko authored
* infer id numeric columns as non metrics * update spec
-
- Jul 26, 2024
-
-
Alexander Polyankin authored
* Add a test * Add a unit test for TextLike
-
- Jul 22, 2024
-
-
Uladzimir Havenchyk authored
- babel is kept to transpile fonts file as swc emotion plugin doesn't handle our case correctly. I didn't find a root cause of wrong behaviour, but the safe past is to keep using babel + emotion plugin for one file and all others can be transpiled with swc - react fast-refresh now handled by swc - swc-loader can't read browserslist config from package.json, so we had to manually specify supported browsers in webpack
-
- Jul 19, 2024
-
-
Alexander Polyankin authored
* Remove can_run_adhoc_query from the FE * Remove can_run_adhoc_query from the FE * Disable can_run_adhoc_query on dashboard Was impacting performance on dashboard load. Timings locally for me: get dash: 3178 -> 199 get metadata: 3604 -> 1002 So dashboard went from 6 seconds to load to 1 second. * Fixup test from disabling can_run_adhoc_query --------- Co-authored-by:
dan sutton <dan@dpsutton.com>
-
lbrdnk authored
* Post sync hook stub for implicit joins testing stub * Add join alias to field lvalues to enable sorting on joined fields * Disable :foreign-keys on Mongo * Require :left-join support for implicit joins instead of :foreign-keys * Update implicit joins tests * Adjust sync-fields-test * Update implicit joins feature check test * Transform post-sync-hook to normal function * Add foreign key relationships only for dbmses without :foreign-keys feature * Update test to handle Oracle correctly * Split convoluted fn * Avoid unnecessary computations for datasets with no fks * Update docstring * Fix driver usage * Transform :foreign-keys to :metadata/key-constraints in test data loading code * Update sync_test.clj * Update driver_test.clj * Update moviedb.clj * Update dataset_definition_test.clj * Update fetch_metadata.clj * Update fields_test.clj * Update driver.clj * Update driver/sql.clj * Set sql driver join support to true for all joins Deriving drivers are expected to set to false where applicable. * Update sqllite.clj * Remove foreign-keys from spark * Remove :foreign-keys from presto * Remove :foreign-keys from Athena * Remove foreign-keys from big query Reading docs it seems fk inference should be ok. Let's see the test results. Act based on that. * Update test_metadata.cljc * Set key-constraints to false for bigquery * Add foreign keys to sqlite manually until sync is fixed * Return driver require to Athena * Correct typo * Add naive primary key heuristic * Update pk fk logic to handle name components correctly * Add alias escaping to presto * Add ordering to test * Add order by to test * Update test * Remove use of rewrite-fields-to-force-using-column-aliases in order by fields * Add exception to alias forcing * Different approach to exception from alias forcing * Alternative approach for prefixing idents in bigq * All seelcted fields by desired alias * Rewrite only fields not from this source table * Update test * Enable breakout-on-fk-field-test for :left-join drivers * Add feature comment * Explicit joins tests foreign-keys removal * Update nested_queries_test.clj * Update remapping tests * Update tests * Update tests to handle sqlite results format * Disable metadata/key-constraints on sqlite during tests until * Address remarks * Remove mt/with-mock-fks-for-drivers-without-fk-constraints * Update bigquery test * Update tests * Adjust row level restrictions * Add parameterized-sql feature * Update comment * Update leftovers * Order keys * Remove foreign keys from frontend * Fix FE unit * Update driver changelog * Address review remark * Update test/metabase/query_processor/test_util.clj Co-authored-by:
metamben <103100869+metamben@users.noreply.github.com> * Update docs/developers-guide/driver-changelog.md Co-authored-by:
metamben <103100869+metamben@users.noreply.github.com> * Update docs/developers-guide/driver-changelog.md Co-authored-by:
metamben <103100869+metamben@users.noreply.github.com> * Update modules/drivers/bigquery-cloud-sdk/src/metabase/driver/bigquery_cloud_sdk/query_processor.clj Co-authored-by:
metamben <103100869+metamben@users.noreply.github.com> * Update docs/developers-guide/driver-changelog.md Co-authored-by:
metamben <103100869+metamben@users.noreply.github.com> * Update test * Update comment and reduce expression * Update comment * Address remarks * Fix merge --------- Co-authored-by:
metamben <103100869+metamben@users.noreply.github.com>
-
- Jul 17, 2024
-
-
Alexander Polyankin authored
-
- Jul 16, 2024
-
-
metamben authored
Fixes #13437.
-
Alexander Polyankin authored
-
- Jul 09, 2024
-
-
Alexander Polyankin authored
-
- Jul 05, 2024
-
-
Alexander Polyankin authored
-
Alexander Polyankin authored
-
- Jul 04, 2024
-
-
Alexander Polyankin authored
-
- Jul 02, 2024
-
-
Nemanja Glumac authored
Fix #35954: SQL-converted question with field filter breaks filtered dashboard if reverted back to its editor version (#44987) * Make sure the query is native * Convert the comment to JSDoc * Add E2E reproduction * Fix mapping * Add test scenarios for the public sharing and embedding * Simplify API payload * Extract and significantly expand the reproduction scope --------- Co-authored-by:
Alexander Polyankin <alexander.polyankin@metabase.com>
-
Alexander Polyankin authored
-
- Jun 28, 2024
-
-
Alexander Polyankin authored
-
- Jun 27, 2024
-
-
Uladzimir Havenchyk authored
-
Alexander Polyankin authored
* Fix numeric parameter parsing * Update frontend/src/metabase-lib/v1/parameters/utils/parameter-parsing.unit.spec.js Co-authored-by:
Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com> * Update frontend/src/metabase-lib/v1/parameters/utils/parameter-parsing.unit.spec.js Co-authored-by:
Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com> --------- Co-authored-by:
Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com> Co-authored-by:
Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
-