This project is mirrored from https://github.com/metabase/metabase.
Pull mirroring updated .
- Jan 10, 2023
-
-
Anton Kulyk authored
-
Anton Kulyk authored
* Delete `QuestionHistoryModal` * Delete `HistoryModal` * Delete `AdminEmptyText` * Delete `EditWarning` * Delete `Expandable` * Remove a bunch of question loaders * Delete `CandidateListLoader` * Delete `QuestionName` * Revert "Remove a bunch of question loaders" This reverts commit 209dbac68dec92083d6e3bdf34ff42ace76a3870. * Remove `QuestionAndResultLoader`
-
Tim Macdonald authored
* Do not let API users archive the last superuser [Fixes #26759] * DRY up admin-archiving check * Fix is_superuser bug in with-single-admin-user * Get count of values correctly on H2
-
Tim Macdonald authored
We were explicitly keeping ParameterCards and dashboard.parameters in sync, but that's not necessary
-
dpsutton authored
* fix api/database/<id>/fields to include table's name including name and display name for field, and table name (not display name) which was original complaint. * tests
-
Alexander Polyankin authored
-
Anton Kulyk authored
* Convert `VirtualizedList` to TypeScript * Add `VirtualizedSelectList` component * Virtualize raw table list * Virtualize model and question list * Fix rendering virtualized lists in tests
-
Anton Kulyk authored
* Move out `ArchiveQuestionModal` * Move out `QuestionMoveToast`
-
Anton Kulyk authored
* Install and enable plugins * Run eslint auto fix * Fix linter issues (part 1) * Fix Visualization test * Fix Pie Visualization test * Add `getIcon` and `queryIcon` helpers * Fix `VisibilityToggler` tests * Fix `QuestionActivityTimeline` tests * Fix formatting tests * Fix `EntityMenuItem` tests * Fix `ClampedText` tests * Fix `ObjectRelationships` tests * Fix `EmailAttachmentPicker` tests * Fix `SavedQuestionHeaderButton` tests * Fix `DatabaseEngineWarning` tests * Fix `Tooltip` tests * Fix `TippyPopoverWithTrigger` tests * Fix `TippyPopover` tests * Fix `TableLabel` tests * Fix `TableInfo` tests * Fix `ModerationStatusIcon` tests * Fix `Sidebar` tests * Fix `PermissionSelect` tests * Fix `PinnedItemCard` tests * Fix widget tests * Fix `DimensionSemanticTypeLabel` tests * Fix `ListSearchField` tests * Fix `ControlledPopoverWithTrigger` tests * Fix `FieldFingerprintInfo` tests * Fix `ErrorActionButton` tests * Fix `QueryValidationError` tests * Fix `LineAreaBarRenderer` tests * Fix `DataSelector` tests * Fix `PivotTable` tests * Fix `ItemPicker` tests * Fix `TokenField` tests * Fix `TagEditorParam` tests * Fix tests * Fix tests * Run prettier * Fix tests
-
Tim Macdonald authored
[Fixes #16293]
-
- Jan 09, 2023
-
-
Aleksandr Lesnenko authored
* allow including weekday to formatted dates * specs
-
Ariya Hidayat authored
-
Ryan Laurie authored
* remove panning logic from map boundary calculation * add map viz percy tests * wait for map load in visual tests
-
Anton Kulyk authored
* Install `eslint-plugin-jest` * Enable `eslint-plugin-jest` * Run eslint auto fix * Fix linter issues * Fix get-column-key * Fix extra space * Fix ChartSettingFieldPicker * Fix eslint issues * Remove redundant describe
-
adam-james authored
Since the frontend sends a date-style string with various differences from how Java's Date Formatter expects things, we need to post-process some bits. The 'D' -> 'd' string replacement was missed in the post processing fn, and so in some cases it was missed altogether, causing this bug. Existing tests in `metabase.pulse.render.datetime-test` and `metabase.pulse.render.table-test` should already catch this issue. Prior to the change they would fail, but they now pass after adding this PR's changes.
-
Noah Moss authored
* oxford comma for parameter values with more than 2 items * refactor logic to use a better translated string and fix tests
-
metamben authored
-
Cam Saul authored
-
Anton Kulyk authored
* Add `LoadingState` component * Add `EmptyState` component * Use `EmptyState` in `DataPickerView` * Add loading and empty states to card picker * Add loading and empty states to raw data picker * Handle case when there's no tree data * Add tests
-
Gustavo Saiani authored
-
Nick Fitzpatrick authored
* temp * Adding cypress test * removing test * unskipping test
-
Anton Kulyk authored
* Add shared helpers for mocking endpoints * Add a11y props to simplify testing * Hide back button when can't go back * Fix prop type error * Add data picker tests * Fix comment * Rename `server` to `server-mocks` * Exclude common from coverage * Fix type error * Replace `waitFor` with `findByText`
-
Nick Fitzpatrick authored
-
Mahatthana (Kelvin) Nomsawadi authored
* Fix double aggregation not working on some fields. This fix adds make sure the table field source is `fields` as this is done in the previous version before we changed it in PR#25267 which introduces the bug in issue#27462 * Add a reproduction * Address review: Improve test readability
-
- Jan 06, 2023
-
-
Ryan Laurie authored
* create pivot table viz directory * extract and type utils and partitions object * extract RowToggleIcon component * extract PivotTableCell component * add unit tests for pivotTable utils * add PivotTable unit tests
-
Anton Kulyk authored
* Remove `titleTemplateChange` from dashboard reducer * Remove `breadcrumbs` from app reducers * Always use real reducers in `renderWithProviders` * Update `ModerationReviewButton` tests * Update `QueryValidationError` tests * Update `LastEditInfoLabel` tests * Update `ProfileLink` tests * Update table visualization tests * Update `QuestionInfoSidebar` tests * Remove `screen.debug` call * Use `getByText` instead of `queryByText` * Fix prop errors in `ViewHeader` tests * Update `DatabaseEditApp` tests * Remove `currentUser` prop from `renderWithProviders` * Update `RenderWithProvidersOptions` type * Fix failing tests
-
Anton Kulyk authored
-
Anton Kulyk authored
* Extract `setup` helper * Use more readable test string * Use `not.toBeInTheDocument` vs `toBeNull` * Fix missing assertions * Fix error about `widget` not being an element * Fix missing `key` prop * Improve new dashboard modal tests * Remove not used import * Fix typo * Add missing `key` props * Use `waitFor` instead of `act`
-
Noah Moss authored
* fetch gtap from table and group * make tests more repl-friendly
-
Anton Kulyk authored
* Add `mockSettings` utility * Use `mockSettings` in sidebar tests * Use `mockSettings` in database edit app tests * Use `mockSettings` in update info form * Use `mockSettings` in caching utils * Use `mockSettings` in question cache TTL field * Use `mockSettings` in new dashboard modal * Use `mockSettings` in question info sidebar * Use `mockSettings` in save question modal * Use `mockSettings` in profile link * Ensure settings are passed to redux in tests * Update signature * Fix test
-
Cam Saul authored
-
Gustavo Saiani authored
-
dpsutton authored
``` docker run \ -p 3000:3000 \ -v $PWD/my_log4j2.xml:/tmp/my_log4j2.xml \ -e JAVA_OPTS=-Dlog4j.configurationFile=/tmp/my_log4j2.xml \ metabase/metabase:v0.45.1 ``` From https://github.com/metabase/metabase/issues/27497 Note that this specifies `log4j.configurationFile` and not "log4j2.configurationFile" that we set in our bootstrap.clj. I'm not sure if this is supposed to work or not but we'll give it a shot. the Automatic Configuration section of https://logging.apache.org/log4j/2.x/manual/configuration.html specifies that: 1. Log4j will inspect the "log4j2.configurationFile" system property and, if set, will attempt to load the configuration using the ConfigurationFactory that matches the file extension. Note that this is not restricted to a location on the local file system and may contain a URL. I'm not sure if that other property will work due to some other mechanism or log4j2 has an undocumented back-compat mechanism.
-
Luis Paolini authored
* Rethinking the change completely * Apply suggestions from code review Co-authored-by:
Jeff Bruemmer <jeff.bruemmer@gmail.com> Co-authored-by:
Jeff Bruemmer <jeff.bruemmer@gmail.com>
-
metamben authored
* Always return fields selected by $project in native MongoDB queries * Keep _id at the position specified in $project if it's included there or at first position if it's not included
-
- Jan 05, 2023
-
-
dpsutton authored
* upgrade clojure cli version * bump clojure cli in dockerfile * use expanded cache paths * list cache contents * ls repository * enumerate m2 cache * remove count of cached dirs * restore `~` in cache paths * Revert "remove count of cached dirs" This reverts commit e768912b31075c7b19b4a3ccdb66c0248ea06c87. * Revert "Revert "remove count of cached dirs"" This reverts commit 9eeaff2190d78714770d8ec9f64b015c75085876. * trailing slash seems harmless but unnecessary
-
dpsutton authored
* nit alignment * point to var so changes are picked up need to refresh this ns after changing the middleware since these add a bit more helpful doc strings. But capture previous function value so more annoying at repl * Ensure MB_API_KEY is set for notify endpoint Previously when the MB_API_KEY was unset: ``` ❯ http POST "localhost:3000/api/notify/db/1?scan=schema" HTTP/1.1 403 Forbidden <other headers removed> Forbidden ``` And now: ``` ❯ http POST "localhost:3000/api/notify/db/1?scan=schema" HTTP/1.1 403 Forbidden <other headers removed> MB_API_KEY is not set. See https://www.metabase.com/docs/latest/configuring-metabase/environment-variables#mb_api_key for details ``` An annoying thing in the tests. We set `"-Dmb.api.key=test-api-key"` in the `:test` alias for CI, but not in regular dev mode. So annoyingly we either have tests that would fail in the repl in regular dev, or use `mt/with-temporary-setting-values [api-key "test-api-key"]` when writing tests that only matter for local stuff. c'est la vie * Translate error message Using site locale because this in an `+apikey` context, not an `+auth` context. The importance of that is that there is no logged in user so no way to get a user locale, and it just falls back to the server locale anyways. So lets just use that. * Fix temp settings when they are env-based An annoying bit here. `api-key` setting in the notify test is set in the env in the `:test` alias. ```clojure notify-test=> (mt/with-temporary-setting-values [api-key nil] (mw.auth/api-key)) "test-api-key" ;; where did the nil go? ``` But there are two bugs in `mt/with-temporary-setting-values`: 1. It gets the current env value and then temporarily sets it to the current value. Note that `do-with-temp-env-var-value` is called with `env-var-value` which is the current value in the environment. All of this work for nothing ``` - (if-let [env-var-value (and (not raw-setting?) (#'setting/env-var-value setting-k))] - (do-with-temp-env-var-value setting env-var-value thunk) + (if (and (not raw-setting?) (#'setting/env-var-value setting-k)) + (do-with-temp-env-var-value setting-k value thunk) ``` So cannot possibly do what we want. 2. The second bug is that the pathway through `mt/with-temporary-setting-values` did not convert `:api-key` to `:mb-api-key`. So even if it put our new value in above, it would put `:api-key nil` in the env, but when we look for it it would look for `:mb-api-key` and we would not find it. Thus the use of `setting-env-map-name`. Then clean up the few other places that did it kinda right, but not necessarily. Seems the "correct" way to do this is get the setting name, munge it, prepend with mb. The other call sites were using variants of `(keyword (str "mb-" (name setting-name)))` which is close but could miss the munging. * Safely set env/env keys There are two ways that we put things into the env/env so they appear as environmentally set variables. - explicitly with `mt/with-temp-env-var-value`. This simulates a user setting these values and they are specified in the env way: mb-email-smtp-port, "MB_DISABLE_SCHEDULER", etc. At the call site you are aware that they are env related so get the mb prefix - incidentally with `mt/with-temporary-setting-values`. Settings are always referred to by their "nice" internal name like `api-key`, etc. But if a setting is found to be an env variable, we override it in env/env. But we have to make sure the key is set properly with an mb- prefix. Owing to this, we have to conditionally add the mb- prefix if not already present. * cleanup the constants a bit * Fix some site-url tests The tests themselves are testing useful stuff: site-url doesn't return a broken value if it fails the verification when set as an env variable. But the tests themselves were a bit nonsensical in their setup: ``` @@ -62,21 +62,19 @@ (deftest site-url-settings-normalize (testing "We should normalize `site-url` when set via env var we should still normalize it (#9764)" (mt/with-temp-env-var-value [mb-site-url "localhost:3000/"] - (mt/with-temporary-setting-values [site-url nil] - (is (= "localhost:3000/" - (setting/get-value-of-type :string :site-url))) - (is (= "http://localhost:3000" - (public-settings/site-url))))))) + (is (= "localhost:3000/" + (setting/get-value-of-type :string :site-url))) + (is (= "http://localhost:3000" + (public-settings/site-url)))))) ``` Why would it set an env-variable version [mb-site-url "localhost:3000/"] then try to blank it out with `(mt/with-temporary-setting-values [site-url nil])`. Fixing the bug in how we set env var values made this nonsensical stuff break. Now we just have to do the obvious thing: set the env var to a bad value, assert that (setting/get-value-of-type :string :site-url) is that value, but assert that the _setting_ is a well-formatted value or nil if we can't solve it (the "asd_12w31%$;" case). Setting the env value then setting a temporary value to nil didn't make much sense. And the fix made that set the env var to nil. * fixup last tests * Don't modify things from `with-temp-env-var-value` this allows us to set non-mb-prefixed env vars. not sure if necessary but let's roll with it. * fix last of the tests
-
Bryan Maass authored
* fix automatic dox generation for malli+defendpoint - there isn't a concept of not having an error message for a schema \o/ - warn but don't break when the schema is invalid - polish the descriptions a little "a nullable a vector" -> "a nullable vector" * gitignore malli types files * schema -> defendpoint api/setting GET :key + docs example * schema -> defendpoint api/action + dox generation * quickfix + add smaller trivial tests * add imported clj kondo rules to git * add with-api-error-message to fix some tests * use mu/with-api-error-message * fix tests * finish defendpoint migration for api/action ns * do not stringify errors * fix devtime annoyance with malli-dox generation * more polish - add length to numerics - respond to review * unused var linter fix * fix off by 1 in umd/description * aligator eats the big number + update action.md
-
adam-james authored
* Disallow axis ranges with the same min/max, which causes divide by zero error The group-axes private fn is used to try group series axes together if the ranges of the series are 'close enough', which is calculated by determining the percentage overlap the ranges share. As the comparison is made, the first series in the list will always be compared with itself, and should have 1.0 (100%) overlap, as the ranges are going to be identical. The divide by zero issue arises when this first series, and potentially any other series, has a 'range' where the min and max are the same. This happens if the series has the same value in every row. With this change, these ranges are considered invalid, and we avoid the divide by zero. * Unskip e2e repro
-
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
-