-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Query validator FE #47098
Query validator FE #47098
Conversation
ed6553a
to
1f9b389
Compare
enterprise/frontend/src/metabase-enterprise/troubleshooting/utils.ts
Outdated
Show resolved
Hide resolved
enterprise/frontend/src/metabase-enterprise/troubleshooting/index.tsx
Outdated
Show resolved
Hide resolved
enterprise/frontend/src/metabase-enterprise/troubleshooting/components/QueryValidator.tsx
Outdated
Show resolved
Hide resolved
add1f01
to
99dd99e
Compare
7718fad
to
b0fa4dc
Compare
b0fa4dc
to
5162d16
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code looks good, going to pull it down before approving though.
@@ -0,0 1,19 @@ | |||
import { Api } from "metabase/api"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use the EnterpriseApi
instead
if (messages.length > 0) { | ||
return messages.join(", "); | ||
} else { | ||
return "I don't know what's wrong, but it's broken"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Translate probably pick something more Metabase-y sounding 😅
const errorTypes = Object.keys( | ||
ERROR_DICTIONARY, | ||
) as (keyof typeof ERROR_DICTIONARY)[]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
two minor nits
- this can be moved out of this function so it's only done once
- i think using _.keys will do the same without having to do the typecasting
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ship it!
3c8620d
to
bfd6935
Compare
* Query Validator FE * collection path, unit tests * wrapping feature with token flag * updating util function, adding row type * updating session_test.clj * type adjustment * fixing other table sorting * Empty state, clean up utils * unit test adjustment * e2e adjustment
Closes #45546
Depends on https://github.com/metabase/harbormaster/issues/5156
Description
Adds a UI for the Query Field Validation Feature. This will display queries with broken data references in a table under
Admin -> Troubleshooting -> Query Validation
.How to verify
The easiest way to create an invalid card is to do so via SQL Queries. Go to New -> SQL Query and type
Select foo from Orders
. Save the card, then go toAdmin -> Troubleshooting -> Query Validation
. Your card should be present.Demo
(pretend creator is populated above)
Checklist