Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore cruft fields #9687

Merged
merged 5 commits into from Aug 15, 2019
Merged

Ignore cruft fields #9687

merged 5 commits into from Aug 15, 2019

Conversation

sbelak
Copy link
Contributor

@sbelak sbelak commented Apr 4, 2019

This slightly reworks the logic when we mark a field as :preview_display:=false:

  • the (existing) length criteria is applied only to fields with special_type nil or JSON. Reason being that if the field has some domain meaning (and hence a special type), you probably want to see it.
  • if the field's name starts with _ it's very likely some sort of cruft and can safely be ignored.

Also makes x-rays ignore fields with :preview_display = false.

@camsaul
Copy link
Member

camsaul commented Apr 11, 2019

I think applying the length criteria only to those special types makes sense. 👍

I think that Fields starting with _ are cruft would be a reasonable assumption in most cases, my big worry is for the 1% of people who for some reason named some or all of their non-crufty Fields wacky names that begin with underscores. They'll have a really confusing time when they sync their DB and nothing shows up. It might be a reasonable assumption for 99% of people but I would put money on bugs coming in about Fields not syncing from the other 1%.

Maybe I am just being paranoid about trying not to break things more than necessary. I would be interested to hear @salsakran's thoughts on this

@sbelak
Copy link
Contributor Author

sbelak commented Apr 11, 2019

In retrospective this has a nasty behaviour in that each time it will overwrite the value for preview_display even if manually overwritten (but the same holds for the code we have in place now).

@sbelak sbelak requested a review from camsaul as a code owner August 14, 2019 12:09
@sbelak
Copy link
Contributor Author

sbelak commented Aug 14, 2019

Reviving this with just the uncontroversial parts (& tests)

Copy link
Member

@camsaul camsaul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

@sbelak sbelak merged commit 846aab7 into master Aug 15, 2019
camsaul added a commit that referenced this pull request Aug 16, 2019
* Compute Content-Security-Policy hashes for inline JS (#10504)

* Split out inline JS from index/init templates to separate files

* Read inline JS from resources at run time

* Calculate inline JS hashes for CSP header from content

* Move inline JS to resource sub-directory

* Update and memoize inline JS loading

* Revert debug code

* Deduplicate `resp/response` calls

* Fix paths to moved inline JS resources

* Force creation of test data DB so things don't get left in the cache

This fix was provided by @camsaul.

* Combine and `defonce` inline JS hashes

* s/inlinejs/inline-js/

* Ensure that Metabase JAR is readable by `metabase` container user (#10510)

If the umask of the user that builds the image is xx7, the JAR will not be
world readable in the resulting image.

* Remove `--add-modules=java.xml.bind` Java option (#10521)

Fixes #10244. @camsaul confirmed that it is no longer needed.

* Join on collection table's ID, not the joining table's `collection_id` (#10481)

* Join on collection table's ID, not the joining table's `collection_id`

This caused each record that joins on collection, to be duplicated for each
existing collection:

`LEFT JOIN collection collection ON card.collection_id = collection_id`

should be

`LEFT JOIN collection collection ON card.collection_id = collection.id`

* Test fixes from @Cam on EE

* Insights: correctly handle infinities in results (#10502)

Filter out models with infinities

* Transfer log events as JSON objects and allow filtering on front-end (#10522)

* Return log events as JSON objects from API; render on front-end

Site UUID added to log events.

* Remove superfluous memoization of site UUID retrieval

Settings are already cached.

* Transfer timestamps in ISO-8601 format

* Move `metabase.metabot.instance/local-process-uuid` to `metabase.public-settings`

* Use `local-process-uuid` in stead of `site-uuid`

`site-uuid` is not unique across processes, which is what we want to
associate with log events.

* Remove unused import

* Allow log events to be filtered by process UUID on front-end

* Move process selector out of loading wrapper

Otherwise, if there are process UUIDs with no log events, the selector is
removed with the log event list.

* Figured out how to add docs to `defonce`

* Fix ns declaration

* Linter appeasement

* Merge log events received from back-end with previously received ones

This allows responses from multiple back-end instances to be spliced
together.

* Use MB components in stead of plain, styled HTML tags

The select is only displayed if more than one process UUID was found.

* Linter appeasement

* Move `metabase.public-settings/local-process-uuid` to `metabase.config`

* Fix sorting on multiple log event fields

* Flatten `Select` children to allow nested arrays of children

* Generate options directly under parent Select

* Limit the number of log events that we render

* Docstring and style updates

* Update editor config with Clojure files max line length

* Ensure that `NumericWrapper` is imported before use

* Cleanup layout

* Bump HoneySQL version (#10559)

The new version (0.9.5) includes @camsaul's Turkish upper case fix:
seancorfield/honeysql#237

* Factor out test for access to localStorage (#10533)

* Factor out test for access to localStorage

This allows code that uses localStorage to test against
`window.hasLocalStorage`, in stead of handling exceptions generated when
access to localStorage is denied.

* Move check for localStorage to metabase/lib/dom

* Fix typo in warning message (#10556)

* revert text color to #74838f (#10560)

* revert text-medium color to #74838f

* use light instead of medium on preview button

* MBTL (#10105)

Add transforms and domain models

* Added page about maps and updated nav (#10495)

* Added page about maps and updated nav

* Clarified step 1

* Added more details throughout

* Quick URL change

* Added additional resource!

* fix typo: 'sdisplay' to 'display'

* Add message with link to docs for fields without any filter widgets (#10340)

* Correct proxy command line [ci skip] (#10430)

* Bump Toucan version to include Turkish lower case fix (#10581)

* Wrap `tru` and `trs` macro results in `str` (#10571)

* Add versions of `trs` and `tru` that wrap results in `str`

The pre-existing `trs` and `tru` were renamed to `lazy-trs` and `lazy-tru`
respectively, and new `trs` and `tru` funcs were added, wrapping the result
of its lazy counterpart in `str`.

This way the normal use case of `trs` and `tru` is improved by no longer
requiring that it be wrapped in `str`.

Cases where the translated result is passed to `str` anyway, the lazy
version can be used.

* `(str (trs ...))` → `(trs ...)`

And the same for `tru`.

* Allow `defsetting` descriptions to use lazy versions of `trs`/`tru`

* Use `lazy-trs`/`lazy-tru` where `str` is applied separately

* Remove unnecessary `vec` from `tru`/`trs` macros

* puppetlabs.i18n does not have a `lazy-tru`

* Missed some settings that now need to use `lazy-tru`

* Only use `lazy-tru` in top-level `def`s

If the localized strings are looked up on module import, before locales are
loaded, the lookup will fail and the original input string will be used.

* Fix bad usages of `tru` that should be `lazy-tru`

* s/lazy-tr/deferred-tr/g

* Avoid `tr*` macros being used in top-level (compile time) statements

Because localizations are not yet loaded at compile time.

* Add type hint for `str*` wrapping of `trs`/`tru`

* Fix assigned function's return type hint

* Expand docstrings for `i18n/tr[su]`

* Use `trs` and `tru` from metabase.util.i18n instead of puppetlabs.i18n.core

* Defer compile time translation lookups

These changes were pointed out by exceptions generated by `i18n/str*`.

* Remove unused `require`d function

* New compile time `trs` usages caught by `lein uberjar`

* Ensure that error message from db driver is a string

It is necessary to ensure that the error message is a string, because some
db driver errors come from statically declared error messages, using
`deferred-tru`. Like those in
`metabase.driver.common/connection-error-messages`.

Fixes #10347 and #10473.

* Remove string type hint from `humanize-connect-error-message`

* Don't disable preview for fields with non-trivial type  (#9687)

* Don't create API callback if no database is associated with card (#10573)

* Don't create API callback if no database is associated with card

Fixes #10538

* Return empty array to avoid mapping over null
salsakran pushed a commit that referenced this pull request Aug 20, 2019
* Compute Content-Security-Policy hashes for inline JS (#10504)

* Split out inline JS from index/init templates to separate files

* Read inline JS from resources at run time

* Calculate inline JS hashes for CSP header from content

* Move inline JS to resource sub-directory

* Update and memoize inline JS loading

* Revert debug code

* Deduplicate `resp/response` calls

* Fix paths to moved inline JS resources

* Force creation of test data DB so things don't get left in the cache

This fix was provided by @camsaul.

* Combine and `defonce` inline JS hashes

* s/inlinejs/inline-js/

* Ensure that Metabase JAR is readable by `metabase` container user (#10510)

If the umask of the user that builds the image is xx7, the JAR will not be
world readable in the resulting image.

* Remove `--add-modules=java.xml.bind` Java option (#10521)

Fixes #10244. @camsaul confirmed that it is no longer needed.

* Join on collection table's ID, not the joining table's `collection_id` (#10481)

* Join on collection table's ID, not the joining table's `collection_id`

This caused each record that joins on collection, to be duplicated for each
existing collection:

`LEFT JOIN collection collection ON card.collection_id = collection_id`

should be

`LEFT JOIN collection collection ON card.collection_id = collection.id`

* Test fixes from @Cam on EE

* Insights: correctly handle infinities in results (#10502)

Filter out models with infinities

* Transfer log events as JSON objects and allow filtering on front-end (#10522)

* Return log events as JSON objects from API; render on front-end

Site UUID added to log events.

* Remove superfluous memoization of site UUID retrieval

Settings are already cached.

* Transfer timestamps in ISO-8601 format

* Move `metabase.metabot.instance/local-process-uuid` to `metabase.public-settings`

* Use `local-process-uuid` in stead of `site-uuid`

`site-uuid` is not unique across processes, which is what we want to
associate with log events.

* Remove unused import

* Allow log events to be filtered by process UUID on front-end

* Move process selector out of loading wrapper

Otherwise, if there are process UUIDs with no log events, the selector is
removed with the log event list.

* Figured out how to add docs to `defonce`

* Fix ns declaration

* Linter appeasement

* Merge log events received from back-end with previously received ones

This allows responses from multiple back-end instances to be spliced
together.

* Use MB components in stead of plain, styled HTML tags

The select is only displayed if more than one process UUID was found.

* Linter appeasement

* Move `metabase.public-settings/local-process-uuid` to `metabase.config`

* Fix sorting on multiple log event fields

* Flatten `Select` children to allow nested arrays of children

* Generate options directly under parent Select

* Limit the number of log events that we render

* Docstring and style updates

* Update editor config with Clojure files max line length

* Ensure that `NumericWrapper` is imported before use

* Cleanup layout

* Bump HoneySQL version (#10559)

The new version (0.9.5) includes @camsaul's Turkish upper case fix:
seancorfield/honeysql#237

* Factor out test for access to localStorage (#10533)

* Factor out test for access to localStorage

This allows code that uses localStorage to test against
`window.hasLocalStorage`, in stead of handling exceptions generated when
access to localStorage is denied.

* Move check for localStorage to metabase/lib/dom

* Fix typo in warning message (#10556)

* revert text color to #74838f (#10560)

* revert text-medium color to #74838f

* use light instead of medium on preview button

* MBTL (#10105)

Add transforms and domain models

* Added page about maps and updated nav (#10495)

* Added page about maps and updated nav

* Clarified step 1

* Added more details throughout

* Quick URL change

* Added additional resource!

* fix typo: 'sdisplay' to 'display'

* Add message with link to docs for fields without any filter widgets (#10340)

* Correct proxy command line [ci skip] (#10430)

* Bump Toucan version to include Turkish lower case fix (#10581)

* Wrap `tru` and `trs` macro results in `str` (#10571)

* Add versions of `trs` and `tru` that wrap results in `str`

The pre-existing `trs` and `tru` were renamed to `lazy-trs` and `lazy-tru`
respectively, and new `trs` and `tru` funcs were added, wrapping the result
of its lazy counterpart in `str`.

This way the normal use case of `trs` and `tru` is improved by no longer
requiring that it be wrapped in `str`.

Cases where the translated result is passed to `str` anyway, the lazy
version can be used.

* `(str (trs ...))` → `(trs ...)`

And the same for `tru`.

* Allow `defsetting` descriptions to use lazy versions of `trs`/`tru`

* Use `lazy-trs`/`lazy-tru` where `str` is applied separately

* Remove unnecessary `vec` from `tru`/`trs` macros

* puppetlabs.i18n does not have a `lazy-tru`

* Missed some settings that now need to use `lazy-tru`

* Only use `lazy-tru` in top-level `def`s

If the localized strings are looked up on module import, before locales are
loaded, the lookup will fail and the original input string will be used.

* Fix bad usages of `tru` that should be `lazy-tru`

* s/lazy-tr/deferred-tr/g

* Avoid `tr*` macros being used in top-level (compile time) statements

Because localizations are not yet loaded at compile time.

* Add type hint for `str*` wrapping of `trs`/`tru`

* Fix assigned function's return type hint

* Expand docstrings for `i18n/tr[su]`

* Use `trs` and `tru` from metabase.util.i18n instead of puppetlabs.i18n.core

* Defer compile time translation lookups

These changes were pointed out by exceptions generated by `i18n/str*`.

* Remove unused `require`d function

* New compile time `trs` usages caught by `lein uberjar`

* Ensure that error message from db driver is a string

It is necessary to ensure that the error message is a string, because some
db driver errors come from statically declared error messages, using
`deferred-tru`. Like those in
`metabase.driver.common/connection-error-messages`.

Fixes #10347 and #10473.

* Remove string type hint from `humanize-connect-error-message`

* Don't disable preview for fields with non-trivial type  (#9687)

* Don't create API callback if no database is associated with card (#10573)

* Don't create API callback if no database is associated with card

Fixes #10538

* Return empty array to avoid mapping over null

* Operations guide breakout (#10569)

* Splitting the operations guide into separate pages

* Added a description to the Operations Guide nav

* Renamed the files and updated the navigation

* FAQ section of the docs (#10587)

* FAQ section of the docs

* Made links relative

* Link & TOC changes

* Fixing duplicate header, adding data collection URL

* Removed the "option is turned off by default" wording

* Don't return table data for archive searches (#10627)

Fixes #10439

* Fix docs links, small text changes (#10613)

* Fingerprinting: correctly handle datetimes that are also FKs (#10621)

* Test fixes [ci druid]

* Disable failing test for now
walterl added a commit that referenced this pull request Aug 20, 2019
* Compute Content-Security-Policy hashes for inline JS (#10504)

* Split out inline JS from index/init templates to separate files

* Read inline JS from resources at run time

* Calculate inline JS hashes for CSP header from content

* Move inline JS to resource sub-directory

* Update and memoize inline JS loading

* Revert debug code

* Deduplicate `resp/response` calls

* Fix paths to moved inline JS resources

* Force creation of test data DB so things don't get left in the cache

This fix was provided by @camsaul.

* Combine and `defonce` inline JS hashes

* s/inlinejs/inline-js/

* Ensure that Metabase JAR is readable by `metabase` container user (#10510)

If the umask of the user that builds the image is xx7, the JAR will not be
world readable in the resulting image.

* Remove `--add-modules=java.xml.bind` Java option (#10521)

Fixes #10244. @camsaul confirmed that it is no longer needed.

* Join on collection table's ID, not the joining table's `collection_id` (#10481)

* Join on collection table's ID, not the joining table's `collection_id`

This caused each record that joins on collection, to be duplicated for each
existing collection:

`LEFT JOIN collection collection ON card.collection_id = collection_id`

should be

`LEFT JOIN collection collection ON card.collection_id = collection.id`

* Test fixes from @Cam on EE

* Insights: correctly handle infinities in results (#10502)

Filter out models with infinities

* Transfer log events as JSON objects and allow filtering on front-end (#10522)

* Return log events as JSON objects from API; render on front-end

Site UUID added to log events.

* Remove superfluous memoization of site UUID retrieval

Settings are already cached.

* Transfer timestamps in ISO-8601 format

* Move `metabase.metabot.instance/local-process-uuid` to `metabase.public-settings`

* Use `local-process-uuid` in stead of `site-uuid`

`site-uuid` is not unique across processes, which is what we want to
associate with log events.

* Remove unused import

* Allow log events to be filtered by process UUID on front-end

* Move process selector out of loading wrapper

Otherwise, if there are process UUIDs with no log events, the selector is
removed with the log event list.

* Figured out how to add docs to `defonce`

* Fix ns declaration

* Linter appeasement

* Merge log events received from back-end with previously received ones

This allows responses from multiple back-end instances to be spliced
together.

* Use MB components in stead of plain, styled HTML tags

The select is only displayed if more than one process UUID was found.

* Linter appeasement

* Move `metabase.public-settings/local-process-uuid` to `metabase.config`

* Fix sorting on multiple log event fields

* Flatten `Select` children to allow nested arrays of children

* Generate options directly under parent Select

* Limit the number of log events that we render

* Docstring and style updates

* Update editor config with Clojure files max line length

* Ensure that `NumericWrapper` is imported before use

* Cleanup layout

* Bump HoneySQL version (#10559)

The new version (0.9.5) includes @camsaul's Turkish upper case fix:
seancorfield/honeysql#237

* Factor out test for access to localStorage (#10533)

* Factor out test for access to localStorage

This allows code that uses localStorage to test against
`window.hasLocalStorage`, in stead of handling exceptions generated when
access to localStorage is denied.

* Move check for localStorage to metabase/lib/dom

* Fix typo in warning message (#10556)

* revert text color to #74838f (#10560)

* revert text-medium color to #74838f

* use light instead of medium on preview button

* MBTL (#10105)

Add transforms and domain models

* Added page about maps and updated nav (#10495)

* Added page about maps and updated nav

* Clarified step 1

* Added more details throughout

* Quick URL change

* Added additional resource!

* fix typo: 'sdisplay' to 'display'

* Add message with link to docs for fields without any filter widgets (#10340)

* Correct proxy command line [ci skip] (#10430)

* Bump Toucan version to include Turkish lower case fix (#10581)

* Wrap `tru` and `trs` macro results in `str` (#10571)

* Add versions of `trs` and `tru` that wrap results in `str`

The pre-existing `trs` and `tru` were renamed to `lazy-trs` and `lazy-tru`
respectively, and new `trs` and `tru` funcs were added, wrapping the result
of its lazy counterpart in `str`.

This way the normal use case of `trs` and `tru` is improved by no longer
requiring that it be wrapped in `str`.

Cases where the translated result is passed to `str` anyway, the lazy
version can be used.

* `(str (trs ...))` → `(trs ...)`

And the same for `tru`.

* Allow `defsetting` descriptions to use lazy versions of `trs`/`tru`

* Use `lazy-trs`/`lazy-tru` where `str` is applied separately

* Remove unnecessary `vec` from `tru`/`trs` macros

* puppetlabs.i18n does not have a `lazy-tru`

* Missed some settings that now need to use `lazy-tru`

* Only use `lazy-tru` in top-level `def`s

If the localized strings are looked up on module import, before locales are
loaded, the lookup will fail and the original input string will be used.

* Fix bad usages of `tru` that should be `lazy-tru`

* s/lazy-tr/deferred-tr/g

* Avoid `tr*` macros being used in top-level (compile time) statements

Because localizations are not yet loaded at compile time.

* Add type hint for `str*` wrapping of `trs`/`tru`

* Fix assigned function's return type hint

* Expand docstrings for `i18n/tr[su]`

* Use `trs` and `tru` from metabase.util.i18n instead of puppetlabs.i18n.core

* Defer compile time translation lookups

These changes were pointed out by exceptions generated by `i18n/str*`.

* Remove unused `require`d function

* New compile time `trs` usages caught by `lein uberjar`

* Ensure that error message from db driver is a string

It is necessary to ensure that the error message is a string, because some
db driver errors come from statically declared error messages, using
`deferred-tru`. Like those in
`metabase.driver.common/connection-error-messages`.

Fixes #10347 and #10473.

* Remove string type hint from `humanize-connect-error-message`

* Only throttle failed login attempts

This will not work until metabase/throttle#1 has been merged, and
Metabase's deps updated to include that change.

* Don't disable preview for fields with non-trivial type  (#9687)

* Don't create API callback if no database is associated with card (#10573)

* Don't create API callback if no database is associated with card

Fixes #10538

* Return empty array to avoid mapping over null

* Throttle logins on request support, with custom header support

If the `:mb-session-throttle-source-header` config option is set, a login
request's source is read from that header in the HTTP request, instead of
using `(:remote-addr request)`. The concrete use case for this is setting
is `X-Forwarded-For`.

* Update test expectations to reflect fixes in `throttle` lib

* Expand `X-Forwarded-For` header source IP test

* Add test for per request source throttling

* Rename variable

* Factor out injection of HTTP 400 status into error

* Replace remaining uses of `throttle-check` with `with-throttling`

* Re-add `throttle-check` for use in `forgot_password` endpoint

The usage semantics of this endpoint is different, in that it doesn't have
a concept of the failed request. Therefore all requests need to be
throttled.

* Operations guide breakout (#10569)

* Splitting the operations guide into separate pages

* Added a description to the Operations Guide nav

* Renamed the files and updated the navigation

* Bump throttle version

* Initialize new `source-address-header` setting during setup

* Replace request source header config with public setting

* Update `with-throttling` usage to new multi-throttler form

* Parameterize `cleaned-throttlers` to make it more generally applicable

* Add test for throttling on `forgot_password` endpoint

* Update docstring

* Only throttle Google auth requests when throttling is enabled

* Don't initialize source address header setting last

It nukes the returned response object from `set-session-cookie`.

* Linter fixes and appeasement

* FAQ section of the docs (#10587)

* FAQ section of the docs

* Made links relative

* Link & TOC changes

* Fixing duplicate header, adding data collection URL

* Removed the "option is turned off by default" wording

* Don't return table data for archive searches (#10627)

Fixes #10439

* Fix docs links, small text changes (#10613)

* Fingerprinting: correctly handle datetimes that are also FKs (#10621)

* Center chart with legend (#10406)

* Simplify function implementation

* Replace consecutive `get`s with single `get-in`s

* Fix comment styling

* Ensure that `source-address-header` setting is always (safely) lower cased

* Add test for `metabase.util/lower-case-end`
salsakran pushed a commit that referenced this pull request Aug 20, 2019
* 0.33 instrumentation [WIP] (#10610)

* wip instrumentation

* add nqf instrumentation

* Fix data-metabase-event that wasn't being forwarded

* Merge master into release-0.33.x (#10634)

* Compute Content-Security-Policy hashes for inline JS (#10504)

* Split out inline JS from index/init templates to separate files

* Read inline JS from resources at run time

* Calculate inline JS hashes for CSP header from content

* Move inline JS to resource sub-directory

* Update and memoize inline JS loading

* Revert debug code

* Deduplicate `resp/response` calls

* Fix paths to moved inline JS resources

* Force creation of test data DB so things don't get left in the cache

This fix was provided by @camsaul.

* Combine and `defonce` inline JS hashes

* s/inlinejs/inline-js/

* Ensure that Metabase JAR is readable by `metabase` container user (#10510)

If the umask of the user that builds the image is xx7, the JAR will not be
world readable in the resulting image.

* Remove `--add-modules=java.xml.bind` Java option (#10521)

Fixes #10244. @camsaul confirmed that it is no longer needed.

* Join on collection table's ID, not the joining table's `collection_id` (#10481)

* Join on collection table's ID, not the joining table's `collection_id`

This caused each record that joins on collection, to be duplicated for each
existing collection:

`LEFT JOIN collection collection ON card.collection_id = collection_id`

should be

`LEFT JOIN collection collection ON card.collection_id = collection.id`

* Test fixes from @Cam on EE

* Insights: correctly handle infinities in results (#10502)

Filter out models with infinities

* Transfer log events as JSON objects and allow filtering on front-end (#10522)

* Return log events as JSON objects from API; render on front-end

Site UUID added to log events.

* Remove superfluous memoization of site UUID retrieval

Settings are already cached.

* Transfer timestamps in ISO-8601 format

* Move `metabase.metabot.instance/local-process-uuid` to `metabase.public-settings`

* Use `local-process-uuid` in stead of `site-uuid`

`site-uuid` is not unique across processes, which is what we want to
associate with log events.

* Remove unused import

* Allow log events to be filtered by process UUID on front-end

* Move process selector out of loading wrapper

Otherwise, if there are process UUIDs with no log events, the selector is
removed with the log event list.

* Figured out how to add docs to `defonce`

* Fix ns declaration

* Linter appeasement

* Merge log events received from back-end with previously received ones

This allows responses from multiple back-end instances to be spliced
together.

* Use MB components in stead of plain, styled HTML tags

The select is only displayed if more than one process UUID was found.

* Linter appeasement

* Move `metabase.public-settings/local-process-uuid` to `metabase.config`

* Fix sorting on multiple log event fields

* Flatten `Select` children to allow nested arrays of children

* Generate options directly under parent Select

* Limit the number of log events that we render

* Docstring and style updates

* Update editor config with Clojure files max line length

* Ensure that `NumericWrapper` is imported before use

* Cleanup layout

* Bump HoneySQL version (#10559)

The new version (0.9.5) includes @camsaul's Turkish upper case fix:
seancorfield/honeysql#237

* Factor out test for access to localStorage (#10533)

* Factor out test for access to localStorage

This allows code that uses localStorage to test against
`window.hasLocalStorage`, in stead of handling exceptions generated when
access to localStorage is denied.

* Move check for localStorage to metabase/lib/dom

* Fix typo in warning message (#10556)

* revert text color to #74838f (#10560)

* revert text-medium color to #74838f

* use light instead of medium on preview button

* MBTL (#10105)

Add transforms and domain models

* Added page about maps and updated nav (#10495)

* Added page about maps and updated nav

* Clarified step 1

* Added more details throughout

* Quick URL change

* Added additional resource!

* fix typo: 'sdisplay' to 'display'

* Add message with link to docs for fields without any filter widgets (#10340)

* Correct proxy command line [ci skip] (#10430)

* Bump Toucan version to include Turkish lower case fix (#10581)

* Wrap `tru` and `trs` macro results in `str` (#10571)

* Add versions of `trs` and `tru` that wrap results in `str`

The pre-existing `trs` and `tru` were renamed to `lazy-trs` and `lazy-tru`
respectively, and new `trs` and `tru` funcs were added, wrapping the result
of its lazy counterpart in `str`.

This way the normal use case of `trs` and `tru` is improved by no longer
requiring that it be wrapped in `str`.

Cases where the translated result is passed to `str` anyway, the lazy
version can be used.

* `(str (trs ...))` → `(trs ...)`

And the same for `tru`.

* Allow `defsetting` descriptions to use lazy versions of `trs`/`tru`

* Use `lazy-trs`/`lazy-tru` where `str` is applied separately

* Remove unnecessary `vec` from `tru`/`trs` macros

* puppetlabs.i18n does not have a `lazy-tru`

* Missed some settings that now need to use `lazy-tru`

* Only use `lazy-tru` in top-level `def`s

If the localized strings are looked up on module import, before locales are
loaded, the lookup will fail and the original input string will be used.

* Fix bad usages of `tru` that should be `lazy-tru`

* s/lazy-tr/deferred-tr/g

* Avoid `tr*` macros being used in top-level (compile time) statements

Because localizations are not yet loaded at compile time.

* Add type hint for `str*` wrapping of `trs`/`tru`

* Fix assigned function's return type hint

* Expand docstrings for `i18n/tr[su]`

* Use `trs` and `tru` from metabase.util.i18n instead of puppetlabs.i18n.core

* Defer compile time translation lookups

These changes were pointed out by exceptions generated by `i18n/str*`.

* Remove unused `require`d function

* New compile time `trs` usages caught by `lein uberjar`

* Ensure that error message from db driver is a string

It is necessary to ensure that the error message is a string, because some
db driver errors come from statically declared error messages, using
`deferred-tru`. Like those in
`metabase.driver.common/connection-error-messages`.

Fixes #10347 and #10473.

* Remove string type hint from `humanize-connect-error-message`

* Don't disable preview for fields with non-trivial type  (#9687)

* Don't create API callback if no database is associated with card (#10573)

* Don't create API callback if no database is associated with card

Fixes #10538

* Return empty array to avoid mapping over null

* Operations guide breakout (#10569)

* Splitting the operations guide into separate pages

* Added a description to the Operations Guide nav

* Renamed the files and updated the navigation

* FAQ section of the docs (#10587)

* FAQ section of the docs

* Made links relative

* Link & TOC changes

* Fixing duplicate header, adding data collection URL

* Removed the "option is turned off by default" wording

* Don't return table data for archive searches (#10627)

Fixes #10439

* Fix docs links, small text changes (#10613)

* Fingerprinting: correctly handle datetimes that are also FKs (#10621)

* Test fixes [ci druid]

* Disable failing test for now

* v0.33.0

* Only throttle failed login attempts (#10593)

* Compute Content-Security-Policy hashes for inline JS (#10504)

* Split out inline JS from index/init templates to separate files

* Read inline JS from resources at run time

* Calculate inline JS hashes for CSP header from content

* Move inline JS to resource sub-directory

* Update and memoize inline JS loading

* Revert debug code

* Deduplicate `resp/response` calls

* Fix paths to moved inline JS resources

* Force creation of test data DB so things don't get left in the cache

This fix was provided by @camsaul.

* Combine and `defonce` inline JS hashes

* s/inlinejs/inline-js/

* Ensure that Metabase JAR is readable by `metabase` container user (#10510)

If the umask of the user that builds the image is xx7, the JAR will not be
world readable in the resulting image.

* Remove `--add-modules=java.xml.bind` Java option (#10521)

Fixes #10244. @camsaul confirmed that it is no longer needed.

* Join on collection table's ID, not the joining table's `collection_id` (#10481)

* Join on collection table's ID, not the joining table's `collection_id`

This caused each record that joins on collection, to be duplicated for each
existing collection:

`LEFT JOIN collection collection ON card.collection_id = collection_id`

should be

`LEFT JOIN collection collection ON card.collection_id = collection.id`

* Test fixes from @Cam on EE

* Insights: correctly handle infinities in results (#10502)

Filter out models with infinities

* Transfer log events as JSON objects and allow filtering on front-end (#10522)

* Return log events as JSON objects from API; render on front-end

Site UUID added to log events.

* Remove superfluous memoization of site UUID retrieval

Settings are already cached.

* Transfer timestamps in ISO-8601 format

* Move `metabase.metabot.instance/local-process-uuid` to `metabase.public-settings`

* Use `local-process-uuid` in stead of `site-uuid`

`site-uuid` is not unique across processes, which is what we want to
associate with log events.

* Remove unused import

* Allow log events to be filtered by process UUID on front-end

* Move process selector out of loading wrapper

Otherwise, if there are process UUIDs with no log events, the selector is
removed with the log event list.

* Figured out how to add docs to `defonce`

* Fix ns declaration

* Linter appeasement

* Merge log events received from back-end with previously received ones

This allows responses from multiple back-end instances to be spliced
together.

* Use MB components in stead of plain, styled HTML tags

The select is only displayed if more than one process UUID was found.

* Linter appeasement

* Move `metabase.public-settings/local-process-uuid` to `metabase.config`

* Fix sorting on multiple log event fields

* Flatten `Select` children to allow nested arrays of children

* Generate options directly under parent Select

* Limit the number of log events that we render

* Docstring and style updates

* Update editor config with Clojure files max line length

* Ensure that `NumericWrapper` is imported before use

* Cleanup layout

* Bump HoneySQL version (#10559)

The new version (0.9.5) includes @camsaul's Turkish upper case fix:
seancorfield/honeysql#237

* Factor out test for access to localStorage (#10533)

* Factor out test for access to localStorage

This allows code that uses localStorage to test against
`window.hasLocalStorage`, in stead of handling exceptions generated when
access to localStorage is denied.

* Move check for localStorage to metabase/lib/dom

* Fix typo in warning message (#10556)

* revert text color to #74838f (#10560)

* revert text-medium color to #74838f

* use light instead of medium on preview button

* MBTL (#10105)

Add transforms and domain models

* Added page about maps and updated nav (#10495)

* Added page about maps and updated nav

* Clarified step 1

* Added more details throughout

* Quick URL change

* Added additional resource!

* fix typo: 'sdisplay' to 'display'

* Add message with link to docs for fields without any filter widgets (#10340)

* Correct proxy command line [ci skip] (#10430)

* Bump Toucan version to include Turkish lower case fix (#10581)

* Wrap `tru` and `trs` macro results in `str` (#10571)

* Add versions of `trs` and `tru` that wrap results in `str`

The pre-existing `trs` and `tru` were renamed to `lazy-trs` and `lazy-tru`
respectively, and new `trs` and `tru` funcs were added, wrapping the result
of its lazy counterpart in `str`.

This way the normal use case of `trs` and `tru` is improved by no longer
requiring that it be wrapped in `str`.

Cases where the translated result is passed to `str` anyway, the lazy
version can be used.

* `(str (trs ...))` → `(trs ...)`

And the same for `tru`.

* Allow `defsetting` descriptions to use lazy versions of `trs`/`tru`

* Use `lazy-trs`/`lazy-tru` where `str` is applied separately

* Remove unnecessary `vec` from `tru`/`trs` macros

* puppetlabs.i18n does not have a `lazy-tru`

* Missed some settings that now need to use `lazy-tru`

* Only use `lazy-tru` in top-level `def`s

If the localized strings are looked up on module import, before locales are
loaded, the lookup will fail and the original input string will be used.

* Fix bad usages of `tru` that should be `lazy-tru`

* s/lazy-tr/deferred-tr/g

* Avoid `tr*` macros being used in top-level (compile time) statements

Because localizations are not yet loaded at compile time.

* Add type hint for `str*` wrapping of `trs`/`tru`

* Fix assigned function's return type hint

* Expand docstrings for `i18n/tr[su]`

* Use `trs` and `tru` from metabase.util.i18n instead of puppetlabs.i18n.core

* Defer compile time translation lookups

These changes were pointed out by exceptions generated by `i18n/str*`.

* Remove unused `require`d function

* New compile time `trs` usages caught by `lein uberjar`

* Ensure that error message from db driver is a string

It is necessary to ensure that the error message is a string, because some
db driver errors come from statically declared error messages, using
`deferred-tru`. Like those in
`metabase.driver.common/connection-error-messages`.

Fixes #10347 and #10473.

* Remove string type hint from `humanize-connect-error-message`

* Only throttle failed login attempts

This will not work until metabase/throttle#1 has been merged, and
Metabase's deps updated to include that change.

* Don't disable preview for fields with non-trivial type  (#9687)

* Don't create API callback if no database is associated with card (#10573)

* Don't create API callback if no database is associated with card

Fixes #10538

* Return empty array to avoid mapping over null

* Throttle logins on request support, with custom header support

If the `:mb-session-throttle-source-header` config option is set, a login
request's source is read from that header in the HTTP request, instead of
using `(:remote-addr request)`. The concrete use case for this is setting
is `X-Forwarded-For`.

* Update test expectations to reflect fixes in `throttle` lib

* Expand `X-Forwarded-For` header source IP test

* Add test for per request source throttling

* Rename variable

* Factor out injection of HTTP 400 status into error

* Replace remaining uses of `throttle-check` with `with-throttling`

* Re-add `throttle-check` for use in `forgot_password` endpoint

The usage semantics of this endpoint is different, in that it doesn't have
a concept of the failed request. Therefore all requests need to be
throttled.

* Operations guide breakout (#10569)

* Splitting the operations guide into separate pages

* Added a description to the Operations Guide nav

* Renamed the files and updated the navigation

* Bump throttle version

* Initialize new `source-address-header` setting during setup

* Replace request source header config with public setting

* Update `with-throttling` usage to new multi-throttler form

* Parameterize `cleaned-throttlers` to make it more generally applicable

* Add test for throttling on `forgot_password` endpoint

* Update docstring

* Only throttle Google auth requests when throttling is enabled

* Don't initialize source address header setting last

It nukes the returned response object from `set-session-cookie`.

* Linter fixes and appeasement

* FAQ section of the docs (#10587)

* FAQ section of the docs

* Made links relative

* Link & TOC changes

* Fixing duplicate header, adding data collection URL

* Removed the "option is turned off by default" wording

* Don't return table data for archive searches (#10627)

Fixes #10439

* Fix docs links, small text changes (#10613)

* Fingerprinting: correctly handle datetimes that are also FKs (#10621)

* Center chart with legend (#10406)

* Simplify function implementation

* Replace consecutive `get`s with single `get-in`s

* Fix comment styling

* Ensure that `source-address-header` setting is always (safely) lower cased

* Add test for `metabase.util/lower-case-end`

* fix i18n files; Update toucan (#10642)

* Fix locales newlines

* Bump Toucan version -> 1.14.0

* Update version
phyroslam added a commit to phyroslam/metabase that referenced this pull request Oct 30, 2019
* Fix queries with duplicate datetime casts to year (#10561)

* Fix typo in warning message (#10556)

* add brand color to view header actions on hover (#10541)

* add brand color to view header actions on hover

* update text-white-hover application logic

* add hover to notebook preview buttons (#10562)

* Joined fields: use FK name (implicit) or join alias (explict) (#10564)

* revert text color to #74838f (#10560)

* revert text-medium color to #74838f

* use light instead of medium on preview button

* MBTL (#10105)

Add transforms and domain models

* Added page about maps and updated nav (#10495)

* Added page about maps and updated nav

* Clarified step 1

* Added more details throughout

* Quick URL change

* Added additional resource!

* fix typo: 'sdisplay' to 'display'

* Add message with link to docs for fields without any filter widgets (#10340)

* Correct proxy command line [ci skip] (#10430)

* make permissions edit bar match admin nav bar color (#10572)

* move convert to SQL trigger (#10542)

* Bump Toucan version to include Turkish lower case fix (#10581)

* Fix joined dimension default + smarter join aliases (#10531)

* Fix default dimension for joined dimensions. Resolves #10441

* Fix default joined dimension + improved join alias

* Joined fields: use FK name (implicit) or join alias (explict)
[ci drivers]

* Use join alias as display name

* Only use fk fields for join alias

* Special case setDefaultAlias for 'Saved Questions' tables. Resolves #10548

* Change sync log levels from DEBUG to INFO (#10584)

[ci skip]

* Change the Oracle driver link to the generic download page instead of a specific version (#10586)

* Clarify which version of Oracle driver we recommend

[ci skip]

* Add note about adding plugins when running via Docker

* Add link in Oracle guide to Docker /plugin instructions

[ci skip]

* Wrap `tru` and `trs` macro results in `str` (#10571)

* Add versions of `trs` and `tru` that wrap results in `str`

The pre-existing `trs` and `tru` were renamed to `lazy-trs` and `lazy-tru`
respectively, and new `trs` and `tru` funcs were added, wrapping the result
of its lazy counterpart in `str`.

This way the normal use case of `trs` and `tru` is improved by no longer
requiring that it be wrapped in `str`.

Cases where the translated result is passed to `str` anyway, the lazy
version can be used.

* `(str (trs ...))` → `(trs ...)`

And the same for `tru`.

* Allow `defsetting` descriptions to use lazy versions of `trs`/`tru`

* Use `lazy-trs`/`lazy-tru` where `str` is applied separately

* Remove unnecessary `vec` from `tru`/`trs` macros

* puppetlabs.i18n does not have a `lazy-tru`

* Missed some settings that now need to use `lazy-tru`

* Only use `lazy-tru` in top-level `def`s

If the localized strings are looked up on module import, before locales are
loaded, the lookup will fail and the original input string will be used.

* Fix bad usages of `tru` that should be `lazy-tru`

* s/lazy-tr/deferred-tr/g

* Avoid `tr*` macros being used in top-level (compile time) statements

Because localizations are not yet loaded at compile time.

* Add type hint for `str*` wrapping of `trs`/`tru`

* Fix assigned function's return type hint

* Expand docstrings for `i18n/tr[su]`

* Use `trs` and `tru` from metabase.util.i18n instead of puppetlabs.i18n.core

* Defer compile time translation lookups

These changes were pointed out by exceptions generated by `i18n/str*`.

* Remove unused `require`d function

* New compile time `trs` usages caught by `lein uberjar`

* Ensure that error message from db driver is a string

It is necessary to ensure that the error message is a string, because some
db driver errors come from statically declared error messages, using
`deferred-tru`. Like those in
`metabase.driver.common/connection-error-messages`.

Fixes #10347 and #10473.

* Remove string type hint from `humanize-connect-error-message`

* Add vertica + Docker link

[ci skip]

* tweak plugins dir instructions headers

[ci skip]

* Fix 'Ask a question > Native query'. Resolves #10527. (#10574)

* Fix metadata checksum encryption/decryption logic (#10539)

* Fix 9737

* Test fixes :wrench:

* QB3 mobile layouts (#10563)

* QB3 mobile layouts
* Fix /question/new page layout logic + remove old NQF code
* Remove unused files
* Fix nav search width

* Don't disable preview for fields with non-trivial type  (#9687)

* Fix nested custom expressions (#10590)

* Don't create API callback if no database is associated with card (#10573)

* Don't create API callback if no database is associated with card

Fixes #10538

* Return empty array to avoid mapping over null

* hide run button in notebook (#10589)

* Fix additional fields with joined columns (#10592)

* Fix additional fields with joined columns
* Put 'joined-field' fields in join's 'fields'

* update langs and add Dutch (NL) (#10597)

* add refresh back to native editor (#10601)

* Revert width: 0 on search bar (#10600)

* revert width: 0 on search bar

* add more responsive padding

* Merge master -> release-0.33.x (#10604)

* Compute Content-Security-Policy hashes for inline JS (#10504)

* Split out inline JS from index/init templates to separate files

* Read inline JS from resources at run time

* Calculate inline JS hashes for CSP header from content

* Move inline JS to resource sub-directory

* Update and memoize inline JS loading

* Revert debug code

* Deduplicate `resp/response` calls

* Fix paths to moved inline JS resources

* Force creation of test data DB so things don't get left in the cache

This fix was provided by @camsaul.

* Combine and `defonce` inline JS hashes

* s/inlinejs/inline-js/

* Ensure that Metabase JAR is readable by `metabase` container user (#10510)

If the umask of the user that builds the image is xx7, the JAR will not be
world readable in the resulting image.

* Remove `--add-modules=java.xml.bind` Java option (#10521)

Fixes #10244. @camsaul confirmed that it is no longer needed.

* Join on collection table's ID, not the joining table's `collection_id` (#10481)

* Join on collection table's ID, not the joining table's `collection_id`

This caused each record that joins on collection, to be duplicated for each
existing collection:

`LEFT JOIN collection collection ON card.collection_id = collection_id`

should be

`LEFT JOIN collection collection ON card.collection_id = collection.id`

* Test fixes from @cam on EE

* Insights: correctly handle infinities in results (#10502)

Filter out models with infinities

* Transfer log events as JSON objects and allow filtering on front-end (#10522)

* Return log events as JSON objects from API; render on front-end

Site UUID added to log events.

* Remove superfluous memoization of site UUID retrieval

Settings are already cached.

* Transfer timestamps in ISO-8601 format

* Move `metabase.metabot.instance/local-process-uuid` to `metabase.public-settings`

* Use `local-process-uuid` in stead of `site-uuid`

`site-uuid` is not unique across processes, which is what we want to
associate with log events.

* Remove unused import

* Allow log events to be filtered by process UUID on front-end

* Move process selector out of loading wrapper

Otherwise, if there are process UUIDs with no log events, the selector is
removed with the log event list.

* Figured out how to add docs to `defonce`

* Fix ns declaration

* Linter appeasement

* Merge log events received from back-end with previously received ones

This allows responses from multiple back-end instances to be spliced
together.

* Use MB components in stead of plain, styled HTML tags

The select is only displayed if more than one process UUID was found.

* Linter appeasement

* Move `metabase.public-settings/local-process-uuid` to `metabase.config`

* Fix sorting on multiple log event fields

* Flatten `Select` children to allow nested arrays of children

* Generate options directly under parent Select

* Limit the number of log events that we render

* Docstring and style updates

* Update editor config with Clojure files max line length

* Ensure that `NumericWrapper` is imported before use

* Cleanup layout

* Bump HoneySQL version (#10559)

The new version (0.9.5) includes @camsaul's Turkish upper case fix:
jkk/honeysql#237

* Factor out test for access to localStorage (#10533)

* Factor out test for access to localStorage

This allows code that uses localStorage to test against
`window.hasLocalStorage`, in stead of handling exceptions generated when
access to localStorage is denied.

* Move check for localStorage to metabase/lib/dom

* Fix typo in warning message (#10556)

* revert text color to #74838f (#10560)

* revert text-medium color to #74838f

* use light instead of medium on preview button

* MBTL (#10105)

Add transforms and domain models

* Added page about maps and updated nav (#10495)

* Added page about maps and updated nav

* Clarified step 1

* Added more details throughout

* Quick URL change

* Added additional resource!

* fix typo: 'sdisplay' to 'display'

* Add message with link to docs for fields without any filter widgets (#10340)

* Correct proxy command line [ci skip] (#10430)

* Bump Toucan version to include Turkish lower case fix (#10581)

* Wrap `tru` and `trs` macro results in `str` (#10571)

* Add versions of `trs` and `tru` that wrap results in `str`

The pre-existing `trs` and `tru` were renamed to `lazy-trs` and `lazy-tru`
respectively, and new `trs` and `tru` funcs were added, wrapping the result
of its lazy counterpart in `str`.

This way the normal use case of `trs` and `tru` is improved by no longer
requiring that it be wrapped in `str`.

Cases where the translated result is passed to `str` anyway, the lazy
version can be used.

* `(str (trs ...))` → `(trs ...)`

And the same for `tru`.

* Allow `defsetting` descriptions to use lazy versions of `trs`/`tru`

* Use `lazy-trs`/`lazy-tru` where `str` is applied separately

* Remove unnecessary `vec` from `tru`/`trs` macros

* puppetlabs.i18n does not have a `lazy-tru`

* Missed some settings that now need to use `lazy-tru`

* Only use `lazy-tru` in top-level `def`s

If the localized strings are looked up on module import, before locales are
loaded, the lookup will fail and the original input string will be used.

* Fix bad usages of `tru` that should be `lazy-tru`

* s/lazy-tr/deferred-tr/g

* Avoid `tr*` macros being used in top-level (compile time) statements

Because localizations are not yet loaded at compile time.

* Add type hint for `str*` wrapping of `trs`/`tru`

* Fix assigned function's return type hint

* Expand docstrings for `i18n/tr[su]`

* Use `trs` and `tru` from metabase.util.i18n instead of puppetlabs.i18n.core

* Defer compile time translation lookups

These changes were pointed out by exceptions generated by `i18n/str*`.

* Remove unused `require`d function

* New compile time `trs` usages caught by `lein uberjar`

* Ensure that error message from db driver is a string

It is necessary to ensure that the error message is a string, because some
db driver errors come from statically declared error messages, using
`deferred-tru`. Like those in
`metabase.driver.common/connection-error-messages`.

Fixes #10347 and #10473.

* Remove string type hint from `humanize-connect-error-message`

* Don't disable preview for fields with non-trivial type  (#9687)

* Don't create API callback if no database is associated with card (#10573)

* Don't create API callback if no database is associated with card

Fixes #10538

* Return empty array to avoid mapping over null

* Navbar tweaks (#10605)

* Navbar small screen friendly. And dirty-fix WriteSQL tooltip.

* Simplify

* Operations guide breakout (#10569)

* Splitting the operations guide into separate pages

* Added a description to the Operations Guide nav

* Renamed the files and updated the navigation

* Miscellaenous typo fixes (#10467)

* Miscellaenous typo fixes

* Fixed link issue + wording change

* Docs for 0.33 (#10414)

* init

* more detail about summarizing

* start of notebook mode docs

* describe how to do joins

* Screenshot updates for Enterprise Sandboxing

* Updated screenshots for segment & metric

* Added section on new auto-run settings

* Added a note about keyboard shortcuts to run part of a query

* wrap up notebook mode docs

* update old screenshots and remove some unused ones

* update Number viz screenshot

* update a bunch of viz screenshots [ci skip]

* more viz screenshot updating [ci skip]

* misc edits to user guide [ci skip]

* update the severely outdated Getting Started guide [ci skip]

* update more screenshots and the x-rays doc [ci skip]

* update Alerts docs and screenshots [ci skip]

* update new SQL doc [ci skip]

* small edit to writing sql doc [ci skip]

* remove unused GSG images [ci skip]

* update crufty admin screenshots [ci skip]

* remove package-lock.json added by mistake [ci skip]

* resolve review feedback [ci skip]

* address kdoh's comments and prettier some pages

* don't bust cache when autorefreshing a dashboard (#10608)

* Add display_name to Table search results (#10612)

* Fix GA default question applying to new simple/custom questions. Resolves #10602 (#10611)

* update languages and remove those under 90% (#10619)

* Adding a small section on downloading results (#10628)

* Adding a small section on downloading result

* Better screenshot :)

* QB3 permissions fixes (#10631)

* Misc fixes for when the user doesn't have data permissions for the current question

* fix prettier error

* FAQ section of the docs (#10587)

* FAQ section of the docs

* Made links relative

* Link & TOC changes

* Fixing duplicate header, adding data collection URL

* Removed the "option is turned off by default" wording

* Don't return table data for archive searches (#10627)

Fixes #10439

* Fix docs links, small text changes (#10613)

* Fingerprinting: correctly handle datetimes that are also FKs (#10621)

* 0.33 instrumentation [WIP] (#10610)

* wip instrumentation

* add nqf instrumentation

* Fix data-metabase-event that wasn't being forwarded

* Merge master into release-0.33.x (#10634)

* Compute Content-Security-Policy hashes for inline JS (#10504)

* Split out inline JS from index/init templates to separate files

* Read inline JS from resources at run time

* Calculate inline JS hashes for CSP header from content

* Move inline JS to resource sub-directory

* Update and memoize inline JS loading

* Revert debug code

* Deduplicate `resp/response` calls

* Fix paths to moved inline JS resources

* Force creation of test data DB so things don't get left in the cache

This fix was provided by @camsaul.

* Combine and `defonce` inline JS hashes

* s/inlinejs/inline-js/

* Ensure that Metabase JAR is readable by `metabase` container user (#10510)

If the umask of the user that builds the image is xx7, the JAR will not be
world readable in the resulting image.

* Remove `--add-modules=java.xml.bind` Java option (#10521)

Fixes #10244. @camsaul confirmed that it is no longer needed.

* Join on collection table's ID, not the joining table's `collection_id` (#10481)

* Join on collection table's ID, not the joining table's `collection_id`

This caused each record that joins on collection, to be duplicated for each
existing collection:

`LEFT JOIN collection collection ON card.collection_id = collection_id`

should be

`LEFT JOIN collection collection ON card.collection_id = collection.id`

* Test fixes from @cam on EE

* Insights: correctly handle infinities in results (#10502)

Filter out models with infinities

* Transfer log events as JSON objects and allow filtering on front-end (#10522)

* Return log events as JSON objects from API; render on front-end

Site UUID added to log events.

* Remove superfluous memoization of site UUID retrieval

Settings are already cached.

* Transfer timestamps in ISO-8601 format

* Move `metabase.metabot.instance/local-process-uuid` to `metabase.public-settings`

* Use `local-process-uuid` in stead of `site-uuid`

`site-uuid` is not unique across processes, which is what we want to
associate with log events.

* Remove unused import

* Allow log events to be filtered by process UUID on front-end

* Move process selector out of loading wrapper

Otherwise, if there are process UUIDs with no log events, the selector is
removed with the log event list.

* Figured out how to add docs to `defonce`

* Fix ns declaration

* Linter appeasement

* Merge log events received from back-end with previously received ones

This allows responses from multiple back-end instances to be spliced
together.

* Use MB components in stead of plain, styled HTML tags

The select is only displayed if more than one process UUID was found.

* Linter appeasement

* Move `metabase.public-settings/local-process-uuid` to `metabase.config`

* Fix sorting on multiple log event fields

* Flatten `Select` children to allow nested arrays of children

* Generate options directly under parent Select

* Limit the number of log events that we render

* Docstring and style updates

* Update editor config with Clojure files max line length

* Ensure that `NumericWrapper` is imported before use

* Cleanup layout

* Bump HoneySQL version (#10559)

The new version (0.9.5) includes @camsaul's Turkish upper case fix:
jkk/honeysql#237

* Factor out test for access to localStorage (#10533)

* Factor out test for access to localStorage

This allows code that uses localStorage to test against
`window.hasLocalStorage`, in stead of handling exceptions generated when
access to localStorage is denied.

* Move check for localStorage to metabase/lib/dom

* Fix typo in warning message (#10556)

* revert text color to #74838f (#10560)

* revert text-medium color to #74838f

* use light instead of medium on preview button

* MBTL (#10105)

Add transforms and domain models

* Added page about maps and updated nav (#10495)

* Added page about maps and updated nav

* Clarified step 1

* Added more details throughout

* Quick URL change

* Added additional resource!

* fix typo: 'sdisplay' to 'display'

* Add message with link to docs for fields without any filter widgets (#10340)

* Correct proxy command line [ci skip] (#10430)

* Bump Toucan version to include Turkish lower case fix (#10581)

* Wrap `tru` and `trs` macro results in `str` (#10571)

* Add versions of `trs` and `tru` that wrap results in `str`

The pre-existing `trs` and `tru` were renamed to `lazy-trs` and `lazy-tru`
respectively, and new `trs` and `tru` funcs were added, wrapping the result
of its lazy counterpart in `str`.

This way the normal use case of `trs` and `tru` is improved by no longer
requiring that it be wrapped in `str`.

Cases where the translated result is passed to `str` anyway, the lazy
version can be used.

* `(str (trs ...))` → `(trs ...)`

And the same for `tru`.

* Allow `defsetting` descriptions to use lazy versions of `trs`/`tru`

* Use `lazy-trs`/`lazy-tru` where `str` is applied separately

* Remove unnecessary `vec` from `tru`/`trs` macros

* puppetlabs.i18n does not have a `lazy-tru`

* Missed some settings that now need to use `lazy-tru`

* Only use `lazy-tru` in top-level `def`s

If the localized strings are looked up on module import, before locales are
loaded, the lookup will fail and the original input string will be used.

* Fix bad usages of `tru` that should be `lazy-tru`

* s/lazy-tr/deferred-tr/g

* Avoid `tr*` macros being used in top-level (compile time) statements

Because localizations are not yet loaded at compile time.

* Add type hint for `str*` wrapping of `trs`/`tru`

* Fix assigned function's return type hint

* Expand docstrings for `i18n/tr[su]`

* Use `trs` and `tru` from metabase.util.i18n instead of puppetlabs.i18n.core

* Defer compile time translation lookups

These changes were pointed out by exceptions generated by `i18n/str*`.

* Remove unused `require`d function

* New compile time `trs` usages caught by `lein uberjar`

* Ensure that error message from db driver is a string

It is necessary to ensure that the error message is a string, because some
db driver errors come from statically declared error messages, using
`deferred-tru`. Like those in
`metabase.driver.common/connection-error-messages`.

Fixes #10347 and #10473.

* Remove string type hint from `humanize-connect-error-message`

* Don't disable preview for fields with non-trivial type  (#9687)

* Don't create API callback if no database is associated with card (#10573)

* Don't create API callback if no database is associated with card

Fixes #10538

* Return empty array to avoid mapping over null

* Operations guide breakout (#10569)

* Splitting the operations guide into separate pages

* Added a description to the Operations Guide nav

* Renamed the files and updated the navigation

* FAQ section of the docs (#10587)

* FAQ section of the docs

* Made links relative

* Link & TOC changes

* Fixing duplicate header, adding data collection URL

* Removed the "option is turned off by default" wording

* Don't return table data for archive searches (#10627)

Fixes #10439

* Fix docs links, small text changes (#10613)

* Fingerprinting: correctly handle datetimes that are also FKs (#10621)

* Test fixes [ci druid]

* Disable failing test for now

* v0.33.0

* Center chart with legend (#10406)

* Only throttle failed login attempts (#10593)

* Compute Content-Security-Policy hashes for inline JS (#10504)

* Split out inline JS from index/init templates to separate files

* Read inline JS from resources at run time

* Calculate inline JS hashes for CSP header from content

* Move inline JS to resource sub-directory

* Update and memoize inline JS loading

* Revert debug code

* Deduplicate `resp/response` calls

* Fix paths to moved inline JS resources

* Force creation of test data DB so things don't get left in the cache

This fix was provided by @camsaul.

* Combine and `defonce` inline JS hashes

* s/inlinejs/inline-js/

* Ensure that Metabase JAR is readable by `metabase` container user (#10510)

If the umask of the user that builds the image is xx7, the JAR will not be
world readable in the resulting image.

* Remove `--add-modules=java.xml.bind` Java option (#10521)

Fixes #10244. @camsaul confirmed that it is no longer needed.

* Join on collection table's ID, not the joining table's `collection_id` (#10481)

* Join on collection table's ID, not the joining table's `collection_id`

This caused each record that joins on collection, to be duplicated for each
existing collection:

`LEFT JOIN collection collection ON card.collection_id = collection_id`

should be

`LEFT JOIN collection collection ON card.collection_id = collection.id`

* Test fixes from @cam on EE

* Insights: correctly handle infinities in results (#10502)

Filter out models with infinities

* Transfer log events as JSON objects and allow filtering on front-end (#10522)

* Return log events as JSON objects from API; render on front-end

Site UUID added to log events.

* Remove superfluous memoization of site UUID retrieval

Settings are already cached.

* Transfer timestamps in ISO-8601 format

* Move `metabase.metabot.instance/local-process-uuid` to `metabase.public-settings`

* Use `local-process-uuid` in stead of `site-uuid`

`site-uuid` is not unique across processes, which is what we want to
associate with log events.

* Remove unused import

* Allow log events to be filtered by process UUID on front-end

* Move process selector out of loading wrapper

Otherwise, if there are process UUIDs with no log events, the selector is
removed with the log event list.

* Figured out how to add docs to `defonce`

* Fix ns declaration

* Linter appeasement

* Merge log events received from back-end with previously received ones

This allows responses from multiple back-end instances to be spliced
together.

* Use MB components in stead of plain, styled HTML tags

The select is only displayed if more than one process UUID was found.

* Linter appeasement

* Move `metabase.public-settings/local-process-uuid` to `metabase.config`

* Fix sorting on multiple log event fields

* Flatten `Select` children to allow nested arrays of children

* Generate options directly under parent Select

* Limit the number of log events that we render

* Docstring and style updates

* Update editor config with Clojure files max line length

* Ensure that `NumericWrapper` is imported before use

* Cleanup layout

* Bump HoneySQL version (#10559)

The new version (0.9.5) includes @camsaul's Turkish upper case fix:
jkk/honeysql#237

* Factor out test for access to localStorage (#10533)

* Factor out test for access to localStorage

This allows code that uses localStorage to test against
`window.hasLocalStorage`, in stead of handling exceptions generated when
access to localStorage is denied.

* Move check for localStorage to metabase/lib/dom

* Fix typo in warning message (#10556)

* revert text color to #74838f (#10560)

* revert text-medium color to #74838f

* use light instead of medium on preview button

* MBTL (#10105)

Add transforms and domain models

* Added page about maps and updated nav (#10495)

* Added page about maps and updated nav

* Clarified step 1

* Added more details throughout

* Quick URL change

* Added additional resource!

* fix typo: 'sdisplay' to 'display'

* Add message with link to docs for fields without any filter widgets (#10340)

* Correct proxy command line [ci skip] (#10430)

* Bump Toucan version to include Turkish lower case fix (#10581)

* Wrap `tru` and `trs` macro results in `str` (#10571)

* Add versions of `trs` and `tru` that wrap results in `str`

The pre-existing `trs` and `tru` were renamed to `lazy-trs` and `lazy-tru`
respectively, and new `trs` and `tru` funcs were added, wrapping the result
of its lazy counterpart in `str`.

This way the normal use case of `trs` and `tru` is improved by no longer
requiring that it be wrapped in `str`.

Cases where the translated result is passed to `str` anyway, the lazy
version can be used.

* `(str (trs ...))` → `(trs ...)`

And the same for `tru`.

* Allow `defsetting` descriptions to use lazy versions of `trs`/`tru`

* Use `lazy-trs`/`lazy-tru` where `str` is applied separately

* Remove unnecessary `vec` from `tru`/`trs` macros

* puppetlabs.i18n does not have a `lazy-tru`

* Missed some settings that now need to use `lazy-tru`

* Only use `lazy-tru` in top-level `def`s

If the localized strings are looked up on module import, before locales are
loaded, the lookup will fail and the original input string will be used.

* Fix bad usages of `tru` that should be `lazy-tru`

* s/lazy-tr/deferred-tr/g

* Avoid `tr*` macros being used in top-level (compile time) statements

Because localizations are not yet loaded at compile time.

* Add type hint for `str*` wrapping of `trs`/`tru`

* Fix assigned function's return type hint

* Expand docstrings for `i18n/tr[su]`

* Use `trs` and `tru` from metabase.util.i18n instead of puppetlabs.i18n.core

* Defer compile time translation lookups

These changes were pointed out by exceptions generated by `i18n/str*`.

* Remove unused `require`d function

* New compile time `trs` usages caught by `lein uberjar`

* Ensure that error message from db driver is a string

It is necessary to ensure that the error message is a string, because some
db driver errors come from statically declared error messages, using
`deferred-tru`. Like those in
`metabase.driver.common/connection-error-messages`.

Fixes #10347 and #10473.

* Remove string type hint from `humanize-connect-error-message`

* Only throttle failed login attempts

This will not work until metabase/throttle#1 has been merged, and
Metabase's deps updated to include that change.

* Don't disable preview for fields with non-trivial type  (#9687)

* Don't create API callback if no database is associated with card (#10573)

* Don't create API callback if no database is associated with card

Fixes #10538

* Return empty array to avoid mapping over null

* Throttle logins on request support, with custom header support

If the `:mb-session-throttle-source-header` config option is set, a login
request's source is read from that header in the HTTP request, instead of
using `(:remote-addr request)`. The concrete use case for this is setting
is `X-Forwarded-For`.

* Update test expectations to reflect fixes in `throttle` lib

* Expand `X-Forwarded-For` header source IP test

* Add test for per request source throttling

* Rename variable

* Factor out injection of HTTP 400 status into error

* Replace remaining uses of `throttle-check` with `with-throttling`

* Re-add `throttle-check` for use in `forgot_password` endpoint

The usage semantics of this endpoint is different, in that it doesn't have
a concept of the failed request. Therefore all requests need to be
throttled.

* Operations guide breakout (#10569)

* Splitting the operations guide into separate pages

* Added a description to the Operations Guide nav

* Renamed the files and updated the navigation

* Bump throttle version

* Initialize new `source-address-header` setting during setup

* Replace request source header config with public setting

* Update `with-throttling` usage to new multi-throttler form

* Parameterize `cleaned-throttlers` to make it more generally applicable

* Add test for throttling on `forgot_password` endpoint

* Update docstring

* Only throttle Google auth requests when throttling is enabled

* Don't initialize source address header setting last

It nukes the returned response object from `set-session-cookie`.

* Linter fixes and appeasement

* FAQ section of the docs (#10587)

* FAQ section of the docs

* Made links relative

* Link & TOC changes

* Fixing duplicate header, adding data collection URL

* Removed the "option is turned off by default" wording

* Don't return table data for archive searches (#10627)

Fixes #10439

* Fix docs links, small text changes (#10613)

* Fingerprinting: correctly handle datetimes that are also FKs (#10621)

* Center chart with legend (#10406)

* Simplify function implementation

* Replace consecutive `get`s with single `get-in`s

* Fix comment styling

* Ensure that `source-address-header` setting is always (safely) lower cased

* Add test for `metabase.util/lower-case-end`

* fix i18n files; Update toucan (#10642)

* Fix locales newlines

* Bump Toucan version -> 1.14.0

* Merge 0.33.x (#10649)

* 0.33 instrumentation [WIP] (#10610)

* wip instrumentation

* add nqf instrumentation

* Fix data-metabase-event that wasn't being forwarded

* Merge master into release-0.33.x (#10634)

* Compute Content-Security-Policy hashes for inline JS (#10504)

* Split out inline JS from index/init templates to separate files

* Read inline JS from resources at run time

* Calculate inline JS hashes for CSP header from content

* Move inline JS to resource sub-directory

* Update and memoize inline JS loading

* Revert debug code

* Deduplicate `resp/response` calls

* Fix paths to moved inline JS resources

* Force creation of test data DB so things don't get left in the cache

This fix was provided by @camsaul.

* Combine and `defonce` inline JS hashes

* s/inlinejs/inline-js/

* Ensure that Metabase JAR is readable by `metabase` container user (#10510)

If the umask of the user that builds the image is xx7, the JAR will not be
world readable in the resulting image.

* Remove `--add-modules=java.xml.bind` Java option (#10521)

Fixes #10244. @camsaul confirmed that it is no longer needed.

* Join on collection table's ID, not the joining table's `collection_id` (#10481)

* Join on collection table's ID, not the joining table's `collection_id`

This caused each record that joins on collection, to be duplicated for each
existing collection:

`LEFT JOIN collection collection ON card.collection_id = collection_id`

should be

`LEFT JOIN collection collection ON card.collection_id = collection.id`

* Test fixes from @cam on EE

* Insights: correctly handle infinities in results (#10502)

Filter out models with infinities

* Transfer log events as JSON objects and allow filtering on front-end (#10522)

* Return log events as JSON objects from API; render on front-end

Site UUID added to log events.

* Remove superfluous memoization of site UUID retrieval

Settings are already cached.

* Transfer timestamps in ISO-8601 format

* Move `metabase.metabot.instance/local-process-uuid` to `metabase.public-settings`

* Use `local-process-uuid` in stead of `site-uuid`

`site-uuid` is not unique across processes, which is what we want to
associate with log events.

* Remove unused import

* Allow log events to be filtered by process UUID on front-end

* Move process selector out of loading wrapper

Otherwise, if there are process UUIDs with no log events, the selector is
removed with the log event list.

* Figured out how to add docs to `defonce`

* Fix ns declaration

* Linter appeasement

* Merge log events received from back-end with previously received ones

This allows responses from multiple back-end instances to be spliced
together.

* Use MB components in stead of plain, styled HTML tags

The select is only displayed if more than one process UUID was found.

* Linter appeasement

* Move `metabase.public-settings/local-process-uuid` to `metabase.config`

* Fix sorting on multiple log event fields

* Flatten `Select` children to allow nested arrays of children

* Generate options directly under parent Select

* Limit the number of log events that we render

* Docstring and style updates

* Update editor config with Clojure files max line length

* Ensure that `NumericWrapper` is imported before use

* Cleanup layout

* Bump HoneySQL version (#10559)

The new version (0.9.5) includes @camsaul's Turkish upper case fix:
jkk/honeysql#237

* Factor out test for access to localStorage (#10533)

* Factor out test for access to localStorage

This allows code that uses localStorage to test against
`window.hasLocalStorage`, in stead of handling exceptions generated when
access to localStorage is denied.

* Move check for localStorage to metabase/lib/dom

* Fix typo in warning message (#10556)

* revert text color to #74838f (#10560)

* revert text-medium color to #74838f

* use light instead of medium on preview button

* MBTL (#10105)

Add transforms and domain models

* Added page about maps and updated nav (#10495)

* Added page about maps and updated nav

* Clarified step 1

* Added more details throughout

* Quick URL change

* Added additional resource!

* fix typo: 'sdisplay' to 'display'

* Add message with link to docs for fields without any filter widgets (#10340)

* Correct proxy command line [ci skip] (#10430)

* Bump Toucan version to include Turkish lower case fix (#10581)

* Wrap `tru` and `trs` macro results in `str` (#10571)

* Add versions of `trs` and `tru` that wrap results in `str`

The pre-existing `trs` and `tru` were renamed to `lazy-trs` and `lazy-tru`
respectively, and new `trs` and `tru` funcs were added, wrapping the result
of its lazy counterpart in `str`.

This way the normal use case of `trs` and `tru` is improved by no longer
requiring that it be wrapped in `str`.

Cases where the translated result is passed to `str` anyway, the lazy
version can be used.

* `(str (trs ...))` → `(trs ...)`

And the same for `tru`.

* Allow `defsetting` descriptions to use lazy versions of `trs`/`tru`

* Use `lazy-trs`/`lazy-tru` where `str` is applied separately

* Remove unnecessary `vec` from `tru`/`trs` macros

* puppetlabs.i18n does not have a `lazy-tru`

* Missed some settings that now need to use `lazy-tru`

* Only use `lazy-tru` in top-level `def`s

If the localized strings are looked up on module import, before locales are
loaded, the lookup will fail and the original input string will be used.

* Fix bad usages of `tru` that should be `lazy-tru`

* s/lazy-tr/deferred-tr/g

* Avoid `tr*` macros being used in top-level (compile time) statements

Because localizations are not yet loaded at compile time.

* Add type hint for `str*` wrapping of `trs`/`tru`

* Fix assigned function's return type hint

* Expand docstrings for `i18n/tr[su]`

* Use `trs` and `tru` from metabase.util.i18n instead of puppetlabs.i18n.core

* Defer compile time translation lookups

These changes were pointed out by exceptions generated by `i18n/str*`.

* Remove unused `require`d function

* New compile time `trs` usages caught by `lein uberjar`

* Ensure that error message from db driver is a string

It is necessary to ensure that the error message is a string, because some
db driver errors come from statically declared error messages, using
`deferred-tru`. Like those in
`metabase.driver.common/connection-error-messages`.

Fixes #10347 and #10473.

* Remove string type hint from `humanize-connect-error-message`

* Don't disable preview for fields with non-trivial type  (#9687)

* Don't create API callback if no database is associated with card (#10573)

* Don't create API callback if no database is associated with card

Fixes #10538

* Return empty array to avoid mapping over null

* Operations guide breakout (#10569)

* Splitting the operations guide into separate pages

* Added a description to the Operations Guide nav

* Renamed the files and updated the navigation

* FAQ section of the docs (#10587)

* FAQ section of the docs

* Made links relative

* Link & TOC changes

* Fixing duplicate header, adding data collection URL

* Removed the "option is turned off by default" wording

* Don't return table data for archive searches (#10627)

Fixes #10439

* Fix docs links, small text changes (#10613)

* Fingerprinting: correctly handle datetimes that are also FKs (#10621)

* Test fixes [ci druid]

* Disable failing test for now

* v0.33.0

* Only throttle failed login attempts (#10593)

* Compute Content-Security-Policy hashes for inline JS (#10504)

* Split out inline JS from index/init templates to separate files

* Read inline JS from resources at run time

* Calculate inline JS hashes for CSP header from content

* Move inline JS to resource sub-directory

* Update and memoize inline JS loading

* Revert debug code

* Deduplicate `resp/response` calls

* Fix paths to moved inline JS resources

* Force creation of test data DB so things don't get left in the cache

This fix was provided by @camsaul.

* Combine and `defonce` inline JS hashes

* s/inlinejs/inline-js/

* Ensure that Metabase JAR is readable by `metabase` container user (#10510)

If the umask of the user that builds the image is xx7, the JAR will not be
world readable in the resulting image.

* Remove `--add-modules=java.xml.bind` Java option (#10521)

Fixes #10244. @camsaul confirmed that it is no longer needed.

* Join on collection table's ID, not the joining table's `collection_id` (#10481)

* Join on collection table's ID, not the joining table's `collection_id`

This caused each record that joins on collection, to be duplicated for each
existing collection:

`LEFT JOIN collection collection ON card.collection_id = collection_id`

should be

`LEFT JOIN collection collection ON card.collection_id = collection.id`

* Test fixes from @cam on EE

* Insights: correctly handle infinities in results (#10502)

Filter out models with infinities

* Transfer log events as JSON objects and allow filtering on front-end (#10522)

* Return log events as JSON objects from API; render on front-end

Site UUID added to log events.

* Remove superfluous memoization of site UUID retrieval

Settings are already cached.

* Transfer timestamps in ISO-8601 format

* Move `metabase.metabot.instance/local-process-uuid` to `metabase.public-settings`

* Use `local-process-uuid` in stead of `site-uuid`

`site-uuid` is not unique across processes, which is what we want to
associate with log events.

* Remove unused import

* Allow log events to be filtered by process UUID on front-end

* Move process selector out of loading wrapper

Otherwise, if there are process UUIDs with no log events, the selector is
removed with the log event list.

* Figured out how to add docs to `defonce`

* Fix ns declaration

* Linter appeasement

* Merge log events received from back-end with previously received ones

This allows responses from multiple back-end instances to be spliced
together.

* Use MB components in stead of plain, styled HTML tags

The select is only displayed if more than one process UUID was found.

* Linter appeasement

* Move `metabase.public-settings/local-process-uuid` to `metabase.config`

* Fix sorting on multiple log event fields

* Flatten `Select` children to allow nested arrays of children

* Generate options directly under parent Select

* Limit the number of log events that we render

* Docstring and style updates

* Update editor config with Clojure files max line length

* Ensure that `NumericWrapper` is imported before use

* Cleanup layout

* Bump HoneySQL version (#10559)

The new version (0.9.5) includes @camsaul's Turkish upper case fix:
jkk/honeysql#237

* Factor out test for access to localStorage (#10533)

* Factor out test for access to localStorage

This allows code that uses localStorage to test against
`window.hasLocalStorage`, in stead of handling exceptions generated when
access to localStorage is denied.

* Move check for localStorage to metabase/lib/dom

* Fix typo in warning message (#10556)

* revert text color to #74838f (#10560)

* revert text-medium color to #74838f

* use light instead of medium on preview button

* MBTL (#10105)

Add transforms and domain models

* Added page about maps and updated nav (#10495)

* Added page about maps and updated nav

* Clarified step 1

* Added more details throughout

* Quick URL change

* Added additional resource!

* fix typo: 'sdisplay' to 'display'

* Add message with link to docs for fields without any filter widgets (#10340)

* Correct proxy command line [ci skip] (#10430)

* Bump Toucan version to include Turkish lower case fix (#10581)

* Wrap `tru` and `trs` macro results in `str` (#10571)

* Add versions of `trs` and `tru` that wrap results in `str`

The pre-existing `trs` and `tru` were renamed to `lazy-trs` and `lazy-tru`
respectively, and new `trs` and `tru` funcs were added, wrapping the result
of its lazy counterpart in `str`.

This way the normal use case of `trs` and `tru` is improved by no longer
requiring that it be wrapped in `str`.

Cases where the translated result is passed to `str` anyway, the lazy
version can be used.

* `(str (trs ...))` → `(trs ...)`

And the same for `tru`.

* Allow `defsetting` descriptions to use lazy versions of `trs`/`tru`

* Use `lazy-trs`/`lazy-tru` where `str` is applied separately

* Remove unnecessary `vec` from `tru`/`trs` macros

* puppetlabs.i18n does not have a `lazy-tru`

* Missed some settings that now need to use `lazy-tru`

* Only use `lazy-tru` in top-level `def`s

If the localized strings are looked up on module import, before locales are
loaded, the lookup will fail and the original input string will be used.

* Fix bad usages of `tru` that should be `lazy-tru`

* s/lazy-tr/deferred-tr/g

* Avoid `tr*` macros being used in top-level (compile time) statements

Because localizations are not yet loaded at compile time.

* Add type hint for `str*` wrapping of `trs`/`tru`

* Fix assigned function's return type hint

* Expand docstrings for `i18n/tr[su]`

* Use `trs` and `tru` from metabase.util.i18n instead of puppetlabs.i18n.core

* Defer compile time translation lookups

These changes were pointed out by exceptions generated by `i18n/str*`.

* Remove unused `require`d function

* New compile time `trs` usages caught by `lein uberjar`

* Ensure that error message from db driver is a string

It is necessary to ensure that the error message is a string, because some
db driver errors come from statically declared error messages, using
`deferred-tru`. Like those in
`metabase.driver.common/connection-error-messages`.

Fixes #10347 and #10473.

* Remove string type hint from `humanize-connect-error-message`

* Only throttle failed login attempts

This will not work until metabase/throttle#1 has been merged, and
Metabase's deps updated to include that change.

* Don't disable preview for fields with non-trivial type  (#9687)

* Don't create API callback if no database is associated with card (#10573)

* Don't create API callback if no database is associated with card

Fixes #10538

* Return empty array to avoid mapping over null

* Throttle logins on request support, with custom header support

If the `:mb-session-throttle-source-header` config option is set, a login
request's source is read from that header in the HTTP request, instead of
using `(:remote-addr request)`. The concrete use case for this is setting
is `X-Forwarded-For`.

* Update test expectations to reflect fixes in `throttle` lib

* Expand `X-Forwarded-For` header source IP test

* Add test for per request source throttling

* Rename variable

* Factor out injection of HTTP 400 status into error

* Replace remaining uses of `throttle-check` with `with-throttling`

* Re-add `throttle-check` for use in `forgot_password` endpoint

The usage semantics of this endpoint is different, in that it doesn't have
a concept of the failed request. Therefore all requests need to be
throttled.

* Operations guide breakout (#10569)

* Splitting the operations guide into separate pages

* Added a description to the Operations Guide nav

* Renamed the files and updated the navigation

* Bump throttle version

* Initialize new `source-address-header` setting during setup

* Replace request source header config with public setting

* Update `with-throttling` usage to new multi-throttler form

* Parameterize `cleaned-throttlers` to make it more generally applicable

* Add test for throttling on `forgot_password` endpoint

* Update docstring

* Only throttle Google auth requests when throttling is enabled

* Don't initialize source address header setting last

It nukes the returned response object from `set-session-cookie`.

* Linter fixes and appeasement

* FAQ section of the docs (#10587)

* FAQ section of the docs

* Made links relative

* Link & TOC changes

* Fixing duplicate header, adding data collection URL

* Removed the "option is turned off by default" wording

* Don't return table data for archive searches (#10627)

Fixes #10439

* Fix docs links, small text changes (#10613)

* Fingerprinting: correctly handle datetimes that are also FKs (#10621)

* Center chart with legend (#10406)

* Simplify function implementation

* Replace consecutive `get`s with single `get-in`s

* Fix comment styling

* Ensure that `source-address-header` setting is always (safely) lower cased

* Add test for `metabase.util/lower-case-end`

* fix i18n files; Update toucan (#10642)

* Fix locales newlines

* Bump Toucan version -> 1.14.0

* Update version

* make repl development a little quicker (#10639)

* make repl development a little quicker

* fix ns

* add core ns

* try to get docker hub and lint to pass

* trying to get build to pass

* move user file to dev dir so it's not in uberjar

* Small changes to the database set-up page (#10652)

* Small changes to the database set-up page

* Updated button wording

[ci skip]

* Make test numerically stable (#10660)

Make insights test numerically stable

* Add MSSQL system views to cruft (#10659)

Add MSSQL system views to cruft tables

* Cast all numeric dimension values in sql qp to numbers (#10351)

* Add value-for-tag test for id type cast from string

Add a test for the sql parameter middleware to handle id dimension
parameters with string values.

* Handle casting all numeric dimension values in sql qp

Cast numeric dimension fields from strings to numbers in
sql/parse-value-for-field-base-type in order to handle dashboard filter
url parameters for cards based on custom sql questions.

* Add `deferred-tr*` macros as gettext keywords (#10643)

* Display form errors in database details form (#10644)

* Fix conditional formatting. Resolves #10663 (#10669)

* fix links that use anchors by changing .md to .html [ci skip] (#10674)

* update incorrect bit of asking-questions doc [ci skip] (#10647)

* Fix reference to icon and a typo (#10678)

* Filter out style properties with empty values (#10650)

* Filter out style properties with empty values

This caused CSS to break when `{:background-color nil}` was rendered as
`background-color: ;`.

* Use proper nil punning

* Convert `v` to string before passing to `seq`

* fix setting cache synchronization issue (#10661)

* fix cache timing bug

subtle issue where timing of reads and writes could fool a server into thinking it had the latest values when it didn't

* Insights test intermittent failure fix, second try   (#10676)

* use a watch to convey cache changes outside the cache (#10636)

* a possible solution for #10630, use a watch to convey cache changes outside the cache

* add try finally, improve setting changes

* remove extraneous whitespace

* keep refreshElapsed state in refresh widget (#10505)

* fix safari bug in chart settings (#10686)

* Add verify-i18n-files step to CI (#10666)

* Add verify-i18n-files step to CI

* Restore FE deps before running i18n command

* apt-get install gettext on circle

* Don't lookup field ID for template tags, without a query (#10653)

* Don't lookup field ID for template tags, without a query

Based on snarfed/metabase@846f884

* Check for any falsey value instead of only `undefined`

* Mark `datasetQuery` parameter as optional

* Check for presence of `datasetQuery` only where it's being used

* Log database connection error before humanizing it (#10695)

* Log database connection error before humanizing it

The original, non-humanized error message may contain clues regarding the
error state, that might get lost in the humanization process.

* Log complete error at error log level

* MySQL additions to troubleshooting guide (#10706)

* Log database connection error before humanizing it

The original, non-humanized error message may contain clues regarding the
error state, that might get lost in the humanization process.

* Log complete error at error log level

* Remove trailing colons from headings

* Reformat heading

* Add MySQL authentication troubleshooting

* Typo

* Reference MySQL 8 caveat in new MySQL section of admin guide

* Fix URL to troubleshooting guide section

* Update MySQL admin guide text

* "Fix" troubleshooting link

* use compact formatting for long choropleth legends (#10654)

* bandaid to resolve #10651 (#10718)

When multiple instances run migrations race conditions are encountered that result in exceptions getting thrown. We try to mitigate this using auto-retry. The code in this PR is one more instance where a race condition can cause an exception, and it gets mitigated with an auto-retry.

* Fix existing column settings for native/nested queries (#10704)

Revert to previous behavior that uses `name` instead of `field_ref` for `field-literal` columns

* Fixes the error while sorting on the aggregated column (#10711)

* more REPL ergonomics (#10702)

* more REPL ergonomics

* Update running-metabase-on-debian.md (#9037)

* Update running-metabase-on-debian.md

Setup to have metabase handled by a systemd service completely, not relying on init.d anymore.

* Minor capitalization/grammar/styling fixes

Also removed duplicated `touch /etc/default/metabase` line.

* One more capital M

* Update Redshift JDBC driver to 1.2.32.1056 (#10321) (#10680)

* Update Redshift JDBC driver to 1.2.32.1056

relates to #9955

* Update metabase-plugin.yaml

* speed up getAllFeaturesPoints by swapping concat for push (#10724)

* Use row index to sort x values (#10675)

* Add support for classification of NaN and -Infinity/Infinity doubles (#7914)

* Add support for classification of NaN and -Infinity/Infinity doubles

These values are read correctly from the database, but after they are
serialized to JSON, don't get deserialized to a double object value,
but rather stay a string and cause failures.

This commit recognizes those values and will parse them as doubles.

Fixes #7779

* Convert nulls to "(empty)" in row charts and line area bar charts (#10609)

* Insights: include unit in response (#10740)

* Small typo and punctuation fix (#10713)

* Fixes the error while sorting group by results (#10712)

* Fixes the error while sorting group by results

* Fixed formatting issues

* Add tests

* more REPL ergonomics (#10702) (#10744)

* GH issue template adjustments (#10615)

* Minor adjustments to the GH issue templates

* Tiny adjustments [ci skip]

* fix broken link to jetty connector config docs [ci skip] (#10687)

* Fix reporting link to be canonical (#10098)

* Fix bug reporting link to be canonical

Before it was relative link address, which was broken.

* Use new issue chooser link

[ci skip]

* PR 10295 with test fixes (#10752)

* Support distinct by two or more columns in druid

* Test fixes [ci druid]

* default date picker to have today selected (#10137)

* No red ink server name protection is dead (#10753)

* Kill default server script because it’s broken

* set elb timeout setting

* Merge branch master into server_name-protection-is-dead
[ci skip]

* Fix for Cannot read property 'fields' of undefined (#7069)

* Add passed, error, and unstable defaults to chart colors (#9182)

* allow for IconWrapper hover customization on EntityMenus (#10750)

* allow for IconWrapper hover customization

* test / lint fixes

* Alow blank name & display name [ci all] (#10739)

* Adding translation FAQ [ci skip] (#10733)

* Fix trend widget for years (#10722)

* fix issue preventing insights on year-grouped data

* remove (probably) unnecessary function

* formatting/style

* years are timestamps now

* Updating the configuration settings page [ci skip] (#10721)

* Audit docs (#10671)

* Audit docs

First stab at audit log docs

[ci skip]

* More fleshed out audit docs

* Fix drill through to question user doesn't have all data permissions for (#10655)

* Fix drill through to question user doesn't have all data permissions for. Resolves #7928

* Fix flow

* Fix #10656

* Tests

* Fix lint + add a couple cute aliases

* fix object detail logic + add test

* Druid: typed numerical fields in checkins (#10742)

* update timeouts for ELB (#10756)

https://github.com/metabase/metabase/pull/4217 did not work for me but this did.

* only show queryable tables when there are multiple schemas (#10757)

* Use count as default new metric aggregation (#10732)

* use count as default new metric aggregation

* wip create GA default query

* flag metrics and segments that come from GA so we can filter them out/in

* fix test

* Fix showing "saved questions" db in permissions editor (#10692)

* Handle unsupported formatting operators gracefully [WIP] (#10737)

* Avoid using `undefined` array when column formatters not specified

This led to `TypeError: Cannot read property "forEach" from undefined`
errors when no formatters were specified.

* Improve logging of unexpected errors during format compilation

* Log unsupported formatting operators and return a dummy operator fn

* Linting fixes

* Manually ES5-ify code that is to be executed by the Nashorn engine

Nashorn in JDK 8 only supports ES5.1.

* Update Rebuilt shared JS from `yarn build-shared`

* Move formatting foctory fns into an operator-indexed object

* Linter appeasement

* Test that all defined operators are supported in table formatting

* Flow annotations

* Return `null` in stead of `undefined`

Formatting/style changes snuck in.

* `yarn build-shared`

* Use operators from table formatting and not column filters

* clean up UX on SSO login (#10023)

* clean up UX on SSO login

present users with a clearer choice of SSO vs email / password

* use link wip

* update sign in copy

* update tests

* lint fix

* Various frontend cleanup (#10450)

* Remove .jsx extension from imports

* Use color() function instead of colors[...]

* Remove depreacted MBQL from frontned

* Remove more deprecated MBQL

* Revert a couple removals of .jsx due to flow conflict with .css files

* Fix reference/utils tests

* Fix color conflict

* xrays: add table name to title for fields from joined tables (#10731)

Add table name to title for fields from joined tables

* Fix display bug for large integers (#10387)

* api: parsing bigints properly

* trivial: running prettier, adding new snapshot

* Refactor apply_tooltips (#10555)

* Fix #10544 trs uses user locale (#10773)

* Fix for  uses user locale #10544

* Removed comments in favor of private declaration

The comments didn't add much useful information.

* fix null key in tooltips (#10797)

* More clarity around password reset (#10645)

* More clarity around password reset

* Changing to point at the FAQ

[ci skip]

* Fix issues with object detail FK queries (#10792)

* fixes

* Fix table selection for single db with multiple schemas (#10766)

* fixes

* fix 04-asking-questions content [ci skip]

* fix search app error with shadowed import (#10811)

* revert #10387 (#10809)

* v0.33.2

* update version

* Standardize form presentation (#10673)

* clean up Form-input hover state

* standardize on one form style, remove old styles from use

* update snapshot test

* fix forgot password position

* fix form error css

* fix padding on setup flow to account for offset removal

* fix layout on admin database add/edit

* increase admin db form padding

* cleanup scheduler

* fix placeholder text

* tweak label and field weight and border contrast

* error message separator

* match select style in Form-field to other fields

* fix admin / database edit form width

* use updated input style on admin/settings

* clean up whitespace in database details form

* Don't fingerprint sensitive fields (#10776)

Don't fingerprint sensitive fields

* Druid: fix day bucketing (#10782)

Druid: fix day bucketing

* (re)Merge release 0.33.x into master (#10835)

* Don't fingerprint sensitive fields (#10776)
* Druid: fix day bucketing (#10782)

* Debug helpers (#10845)

make it easier for users to report diagnostic info by adding it to the troubleshooting UI

* Load initial Docker Metabase db from provided H2 dump (#10834)

* Load initial Docker Metabase db from provided H2 dump

* Move H2 init db to /app and add `mv.db` extension

* Remove `COPY` of init db in Dockerfile in favor of volume

* Document how to mount initial db in container

* Don't load H2 db into a populated db

* Add example Dockerfile that copies in initialization db

* Fix BigQuery unprepare [ci bigquery] (#10867)

* Switch to clojure.test (#10863)

* use the dimension column for getXValues and getParseOptions (#10827)

* [cmd] dump to h2 (#10843)

* use the dimension column for getXValues and getParseOptions (#10875)

* Fix (most of the) driver tests after merging PR to switch to clojure.test (#10882)

* wrap full screen modals in OnClickOutsideWrapper (#10883)

* Refresh database list after re-adding sample dataset (#10800)

* mark vis warnings as translateable (#10847)

* only load membership if user is updating group_ids (#10815)

* save immediately when moving a question (#10832)

* filter perms (#10799)

include param fields and values in dashboard hydration

* Clarify microcopy for Do Not Include column metadata setting (#10889)

* clarify copy for Do Not Include setting

* update test

* fix another test

* Enable eqeqeq eslint rule (#10888)

* Filter nulls out of non-ordinal x axes (#10846)

* Don't overwrite column unit before getting column settings (#10864)

* Run apt-get update before apt-get install gettext (#10903)

* Run apt-get update before apt-get install gettext (#10909)

* Fix LDAP auth if attributes are arrays (#10913)

* Fix CI test failures (#10904)

* Add back in fa.po and zh.po (#10907)

* add back in fa.po and zh.po

* fix newlines in it.po

* fix newlines in pl.po

* fix newlines in fa.po

* okay seriously fix all the newline problems

* missed a couple

* fix some persian things I messed up

* Test tweaks (#10925)

* Fix drill through actions not working with joins (#10801)

* Fix drill through actions not working with joins

* QuickFilterDrill unit test

* Add Dimension and Field 'foreign' methods, fix Dimension and Field 'column' methods

* Update sample dataset test fixtures with convienent aliases

* More fixture cleanup

* Fix lint and flow

* more fixture cleanup

* fix e2e test

* permissions bugs (#10918)

fix bugs around setting data permissions for new database

* Use parsed `datas` when finding row for tooltip (#10939)

* use key rather than keyCode for comma (#10902)

* permission parser (#10933)

introduce a new permission parser to:

* handle permissions in a more declarative way
* allow permissions to be converted to a permission graph for databases without tables

* Dump to h2 (#10877)

* [cmd] dump to h2 (#10843)

* Tests for load & dump commands

* Fixes

* test fixes

* Test fixes

* Test fixes

* v0.33.3

* Cover visualization with "mouse blocker" if dashboard is being edited (#10931)

* catch fullscreen error and mention limitation in docs (#10896)

* alternative implemenation of permission graph conversion (#10919)

* simple fixes for data permissions, new model for conforming permissions

* collection permission conversion

* only assoc values if they're present

* improve docs

* progress on testing permissions changing

* test that setting permissions on new table works

* remove permission graph reworking to introduce in another branch

* clean ns

* alternative impl of permission graph conversion

* correct the permission graph specs

* fix whitespace

* address ci failure

* undo ci config change

* delete mysteriously undeleted merge conflict

* Fix bugs with stacked charts and log scales (#10911)

* compute yExtents for stacked charts, display a better min for log bar charts

* remove unused const

* Fix bug saving database info in reference (#10940)

* database -> Databases

* add e2e test

* unused reference

* clean up after test

* create/delete db rather than trying to reset fields

* Documenting the ability to disable password log-in [ci skip] (#10887)

* [style] whitespace (#10937)

* Don't run native queries with invalid template tags (#10946)

* don't run native queries with invalid template tags

* fix test

* change setCardAndRun to onChangeCardAndRun in LeafletMap (#10917)

* Don't don't set dimensions in ExplicitSize until after initial mounting (#10890)

* don't don't set dimensions in ExplicitSize until after initial mounting

* add comment

* add delay to fix tests

* Fix how optional field filter params are substituted; fix support for nested optional params (#10947)

* Param fixes [ci skip]

* Almost all working [ci skip]

* Test fixes

* Test fixes

* Test / linter fixes

* Fix linter errors

* Fix filtering by month-of-year and month in MongoDB; lots of new tests (#10955)

* Fix filtering by month-of-year and month in MongoDB; lots of new t…
@camsaul camsaul deleted the cruft-fields branch October 20, 2020 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants