forked from metabase/metabase
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Support disabling links in subscriptions #1
Open
voldern
wants to merge
170
commits into
master
Choose a base branch
from
support-disabling-links-in-subscriptions
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
) * Ensure query action's db matches model id This is only a half-way measure. Needs some FE loving as well. The +New -> Action workflow lets you create an action. This starts with the user choosing the database, writing the action. On save it prompts you to choose a model it should live under. But this model's db and the db chosen originally are not checked in the FE. Ideally we only show models on that existing db, but it kinda seems weird to have an action do things to a random table and it live under a model that just needs to be on the db. * reword error message * Check both databases for enabled actions when they disagree a custom action can have its own query which brings its own database. When creating a new custom action from the models detail page, these go hand in hand. When using the workflow from the "+New" button, the model is chosen at the last step, well after the action's db and query is set. And there's nothing holding these two together. Asked if this was a bug and was told no. But we want to make sure we check both for actions enabled. * fix lint --------- Co-authored-by: dpsutton <[email protected]> Co-authored-by: Maz Ameli <[email protected]>
Co-authored-by: Ryan Laurie <[email protected]>
Co-authored-by: Natalie <[email protected]>
…metabase#28777) * Register new E2E path alias * Move E2E support files * Move E2E runner files * Move E2E snapshot related files * Move E2E visual regression tests * Move E2E `downloads` scenarios * Move E2E `admin` scenarios * Move E2E `auditing` scenarios * Move E2E `bining` scenarios * Move E2E `ccollections` scenarios * Move E2E `cross-version` scenarios * Move E2E `custom-column` scenarios * Move E2E `dashboard` scenarios * Move E2E `dashboard-filters` scenarios * Move E2E `dashboard` reproductions * Move E2E `embedding` scenarios * Move E2E `filters` scenarios * Move E2E `joins` scenarios * Move E2E `models` scenarios * Move E2E `native-filters` scenarios * Move E2E `native` scenarios * Move E2E `onboarding` scenarios * Move E2E `organization` scenarios * Move E2E `permissions` scenarios * Move E2E `question` scenarios * Move E2E `visualizations` scenarios * Move E2E `sharing` scenarios * Move E2E `docker-compose` * Fix commands imports * Fix helpers imports * Fix downloads reproductions imports * Fix integration imports * Move visual regression tests * Various fixes * Move `validate-e2e-files` script * Add eslint rules for E2E folder * Improve file paths * Move `cross-version` tests into scenarios * Path fixes * Register E2E alias in tsconfig * Fix failing tests after rebase Co-authored-by: Nemanja Glumac <[email protected]>
The new approach uses a dev-mode-only CLJC reader conditional `#?(:cljs-dev ...)` to make `metabase.util.devtools` empty except in dev builds. The previous approach for this relied on dead code elimination. But DCE relies on tracing function calls and `:require`s from the `:entries` list in shadow-cljs.edn. Top-level namespace code is handled differently; in particular a namespace listed in `:entries` like `metabase.util.devtools` will always have its top-level code in the build.
* Build script overhaul 2023 (metabase#28767) * Build Script overhaul * Remove stray deps.edn * Include :ci profile for build and release tests * Fix release script * Update markdown dox * Update another dox * Tweakz * Don't pin new version of data.xml to core project, just for build scripts * Ignore unrecognized options * Fix i18n/enumerate * Fix broken link --------- Co-authored-by: Cam Saul <[email protected]> Co-authored-by: Nemanja <[email protected]>
* Release script fix * Add test 🔧 Co-authored-by: Cam Saul <[email protected]>
…e#28560) (metabase#28821) * Add /api/logs/query_execution endpoint for downloading logs. Intended for admins to use only via api to manually save logs if they want. Paired with auto-deleting the query_execution after N days (30 by default), this should help admins keep the query_execution table light. * Add docstrings * Add a test for the logs/query_execution endpoint This test checks that the correct rows are returned, that is, those within the specified number of days. * Tests should pass with h2 now. * Move logs endpoint to Enterprise, allowed only with `:advanced-config` * Forgot to remove api.logs ns require from OSS routes * Wrap logs endpoint in proper premium feature * Test will filter further to only look for THIS run's temp rows * Alter query to give results for a month specified as YYYY-MM This lets admins do paginated log downloads, which is good if the query_execution table is quite large (very likely, at least initially). * Add sanity check test. Address other review feedback Co-authored-by: adam-james <[email protected]>
…8817) Co-authored-by: Emmad Usmani <[email protected]>
* WIP action data type tests * DRY up the actions tests * lots of type tests * make the tests work * reorganize tests * reduce some flakes * updates after rebase Co-authored-by: Ryan Laurie <[email protected]>
* expose number of active users as a setting Co-authored-by: Ngoc Khuat <[email protected]>
) (metabase#28832) Co-authored-by: Alexander Polyankin <[email protected]>
Co-authored-by: Cal Herries <[email protected]>
…28835) * Fix wrong aggregation field's `base_type` It should be the same as the underlying field, not a hard-coded number typ (`type/Integer` or `type/Float`) * Add unit tests Co-authored-by: Mahatthana (Kelvin) Nomsawadi <[email protected]>
Co-authored-by: Nick Fitzpatrick <[email protected]>
Co-authored-by: Nemanja Glumac <[email protected]>
…= 1,000 (metabase#28666) (metabase#28842) * Fix static-viz render with black background when values > 1000 * fix to work with any separator settings Co-authored-by: Ngoc Khuat <[email protected]>
* sort stacked tooltip rows * update separator color Co-authored-by: Aleksandr Lesnenko <[email protected]>
… (metabase#28760) * initial implementation of query_execution retention policy * fix logic and add tests for setting * refactor and more tests * set default on cloud to 0 * try to fix test by loading ee ns if available * address feedback and small refactors * interface file for truncate-audit-log * extract common definitions into an interface to avoid cyclic dependency * fix indentation Co-authored-by: Noah Moss <[email protected]>
Co-authored-by: Gustavo Saiani <[email protected]>
Co-authored-by: Aleksandr Lesnenko <[email protected]>
…abase#28871) Co-authored-by: Nemanja Glumac <[email protected]>
…ase#28786) (metabase#28869) * Use GitHub basic runners for `druid` and `sparksql` tests * Reduce the `drivers` timeout to 45 mintues Co-authored-by: Nemanja Glumac <[email protected]>
* Ignore JS tests when doing CodeQL scans * Do not run CodeQL scans unless needed Co-authored-by: Nemanja Glumac <[email protected]>
Co-authored-by: Ngoc Khuat <[email protected]>
Co-authored-by: Nemanja Glumac <[email protected]>
…29448) (metabase#29466) * Remove usages of `cy.addFilterToDashboard` custom command * Fully remove `cy.addFilterToDashboard` custom command Co-authored-by: Nemanja Glumac <[email protected]>
…#29470) * Add action.dataset_query to search results * Add action.database_id to search results * Unskip repro * better FE error handling for action query display * update repro --------- Co-authored-by: Tim Macdonald <[email protected]> Co-authored-by: Ryan Laurie <[email protected]>
…etabase#29430) Co-authored-by: Nemanja Glumac <[email protected]>
* Break down `ActionForm` component (metabase#29290) * Move `ActionFormFieldWidget` to action components * Move `inputTypeHasOptions` to shared utils * Move `FormFieldEditor` to `FormCreator` * Clean up `ActionForm` props * Clean up `FormCreator` props * Move most of `ActionForm` utils to shared utils * Move `reorderFields` to `FormCreator` * Extract `FormCreator` resps from `ActionForm` * Use default export for `ActionForm` * Consolidate action form logic (metabase#29326) * Make `ActionForm` accept an `action` prop * Make field settings inside `ActionForm` if missing * Clean date-time values inside `ActionForm` * WIP * Clean and filter values on submit in `ActionForm` * Sort `ActionVizForm` props * Sort `Action` props * Use more generic `WritebackAction` type * Move more logic into the `ActionForm` * Add `useActionForm` hook * Fix parameter type in tests * Fix submitting a form when all parameters mapped * Move utils to `useActionForm` * Fix submit button label in public action e2e tests * Filter changed values only for implicit update actions * Rename `cleanInitialValues` to `cleanedInitialValues` * Fix `shouldShowConfirmation` can be a string * Nice boring code * Fix types in tests * Small rename * Move `useActionForm` utils closer to source (metabase#29328) * Fix `ActionForm` ignored submit errors * Fix default values display in the form editor * Fix names
…9460) * Improvement of recent_views endpoint query (metabase#29259) * WIP improvement of recent_views endpoint query * Adjust query to actually include models (cards with :dataset true) This was not part of the recent_views before, so I think it's actually an improvement to the feature as well as improvement to the characteristics of the query itself. * Linter fixes * One more take on recent_views query. Last 30 days, all req's in 1 query This query combines view_log and query_execution Keep query_executions when they are card with context 'question' Keep any card views when they are 'datasets' (aka models) Remove duplicates with GROUP BY model, model_id Sort by timestamp desceneding Remove any views that are bookmarked by using NOT IN * An improved query that handles all logic in one db query * Adjust limit in case archived cards/dashboards are in the list * Make fn private for linter * Add one additional constraint to prevent pinned items from counting as viewed * Address review feedback * Accidentally slipped this in... not needed on this PR * Add toucan2 require --------- Co-authored-by: adam-james <[email protected]> Co-authored-by: Adam James <[email protected]>
Co-authored-by: Nick Fitzpatrick <[email protected]>
…29495) Co-authored-by: Natalie <[email protected]>
Co-authored-by: Alexander Polyankin <[email protected]>
… (metabase#29285) * add permissions and test * address comments * fix whitespace * remove ehitespace * revert vscode changes Co-authored-by: Jerry Huang <[email protected]>
…e#29504) * Separate date from datetime binning options The BE sends over binning indexes for each field and a top level map for how to interpret these keys. ```javascript ❯ http get http://localhost:3000/api/table/10658/query_metadata Cookie:$SESSION -pb { "active": true, "caveats": null, "created_at": "2023-03-21T22:20:42.363169Z", "db": { "engine": "postgres", "features": [ "full-join", ... ], "id": 499, ... }, "db_id": 499, "dimension_options": { "0": { "mbql": [ "field", null, { "temporal-unit": "day" } ], "name": "Day", "type": "type/Date"}, "1": { "mbql": [ "field", null, { "temporal-unit": "week" } ], "name": "Week", "type": "type/Date" }, "10": { "mbql": ["field", null, { "temporal-unit": "quarter-of-year"}], "name": "Quarter of Year", "type": "type/Date" }, "11": { "mbql": [ "field", null, { "temporal-unit": "minute" } ], "name": "Minute", "type": "type/DateTime"}, "12": { "mbql": [ "field", null, { "temporal-unit": "hour"}], "name": "Hour", "type": "type/DateTime"}, ... // more options. They have a type, an id, and an mbql clause }, "display_name": "Different Times", "entity_type": null, "fields": [{"name": "id",}, {"name": "dt", "dimension_options": [ "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25"] "database_type": "timestamp", "effective_type": "type/DateTime", }, {"name": "t", "dimension_options": [ "26", "27", "28" ], "effective_type": "type/Time", "database_type": "time" }, {"name": "d", "database_type": "date", "dimension_options": [ "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10" ], "effective_type": "type/Date", } ], "name": "different_times", ... } ``` This PR adds some new types just for dates so that you don't get offered by group a date by hour or minute. This adds new indexes to this list, which makes us wary that these indexes have leaked out and cannot be changed. But that is not the case. This is essentially compression on the response. When the FE saves a query, it does not include the index but uses the mbql query to insert the proper temporal-unit: ```clojure ;; a "date" field choosing the quarter option {:type :query, :query {:source-table 5, :breakout [[:field 49 {:temporal-unit :quarter}]], :aggregation [[:count]]}, :database 1} ;; the same query but binning by week {:database 1, :query {:source-table 5, :breakout [[:field 49 {:temporal-unit :week}]], :aggregation [[:count]]}, :type :query} ``` So the index is relative to just the editing session of the query, and the indexes do not have to be stable when we add new ones. * athena and mongo (others?) don't have a date type the test expects a date field to have date binning options. previous, we made no distinction for binning options for date vs datetime fields. Now we do and have to manage expectations in the tests. * mongo returns type/Instant Co-authored-by: dpsutton <[email protected]>
Co-authored-by: Natalie <[email protected]>
Co-authored-by: Jeff Bruemmer <[email protected]>
…metabase#29413) (metabase#29521) Co-authored-by: Denis Berezin <[email protected]>
… (metabase#29531) Co-authored-by: Mark Bastian <[email protected]>
Co-authored-by: Jeff Bruemmer <[email protected]>
…ase#29546) * keep standalone values when collapsing column * adjusting unit test * PR Feedback * adding space * removing only * Adjusting behavior and tests * adjusting data_grid unit tests Co-authored-by: Nick Fitzpatrick <[email protected]>
metabase#29556) * Revert "Fix zoom in drilldown for FKs (metabase#28022)" (metabase#29551) --------- Co-authored-by: Alexander Polyankin <[email protected]> Co-authored-by: Nemanja <[email protected]>
Co-authored-by: Natalie <[email protected]>
Co-authored-by: Jeff Bruemmer <[email protected]>
…base#29566) (metabase#29574) * Configure foreign key support for Mongo to allow implicit joins Co-authored-by: metamben <[email protected]>
Co-authored-by: Ryan Laurie <[email protected]>
Co-authored-by: Luiz Arakaki <[email protected]>
voldern
force-pushed
the
support-disabling-links-in-subscriptions
branch
2 times, most recently
from
March 31, 2023 14:04
e6a251d
to
a5c021c
Compare
This makes the experience much better when sending emails to recipients who do not, and should not have access to the Metabase instance.
voldern
force-pushed
the
support-disabling-links-in-subscriptions
branch
from
March 31, 2023 14:10
a5c021c
to
c6e9131
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes https://github.com/metabase/metabase/issues/[issue_number]
Description
Describe the overall approach and the problem being solved.
How to verify
Describe the steps to verify that the changes are working as expected.
Demo
Upload a demo video or before/after screenshots if sensible or remove the section
Checklist