-
Notifications
You must be signed in to change notification settings - Fork 1.6k
gives correct domain names to query, unify query count and query api's via ES #24807
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,6 +24,7 @@ | |
| import SchemaEditor from '../../components/Database/SchemaEditor/SchemaEditor'; | ||
| import { HTTP_STATUS_CODE } from '../../constants/Auth.constants'; | ||
| import { | ||
| DEFAULT_DOMAIN_VALUE, | ||
| INITIAL_PAGING_VALUE, | ||
| PAGE_SIZE_MEDIUM, | ||
| } from '../../constants/constants'; | ||
|
|
@@ -38,6 +39,7 @@ | |
| import { withPageLayout } from '../../hoc/withPageLayout'; | ||
| import { useApplicationStore } from '../../hooks/useApplicationStore'; | ||
| import { useFqn } from '../../hooks/useFqn'; | ||
| import { useDomainStore } from '../../hooks/useDomainStore'; | ||
| import { FieldProp, FieldTypes } from '../../interface/FormUtils.interface'; | ||
| import { postQuery } from '../../rest/queryAPI'; | ||
| import { searchQuery } from '../../rest/searchAPI'; | ||
|
|
@@ -67,6 +69,7 @@ | |
| const [initialOptions, setInitialOptions] = useState<DefaultOptionType[]>(); | ||
| const [isSaving, setIsSaving] = useState(false); | ||
| const navigate = useNavigate(); | ||
| const hasActiveDomain = useDomainStore.getState().activeDomain !== DEFAULT_DOMAIN_VALUE; | ||
|
||
|
|
||
| const fetchEntityDetails = async () => { | ||
| try { | ||
|
|
@@ -114,9 +117,9 @@ | |
| return table | ||
| ? filter(options, ({ value }) => value !== table.id) | ||
| : options; | ||
| } catch (error) { | ||
| return []; | ||
| } | ||
|
Check warning on line 122 in openmetadata-ui/src/main/resources/ui/src/pages/AddQueryPage/AddQueryPage.component.tsx
|
||
| }; | ||
|
|
||
| useEffect(() => { | ||
|
|
@@ -129,9 +132,9 @@ | |
| try { | ||
| const option = await fetchTableEntity(); | ||
| setInitialOptions(option); | ||
| } catch (error) { | ||
| setInitialOptions([]); | ||
| } | ||
|
Check warning on line 137 in openmetadata-ui/src/main/resources/ui/src/pages/AddQueryPage/AddQueryPage.component.tsx
|
||
| }; | ||
|
|
||
| useEffect(() => { | ||
|
|
@@ -146,6 +149,7 @@ | |
|
|
||
| const handleSubmit: FormProps['onFinish'] = async (values): Promise<void> => { | ||
| setIsSaving(true); | ||
| const activeDomain = useDomainStore.getState().activeDomain; | ||
| const updatedValues: CreateQuery = { | ||
| ...values, | ||
| description: isEmpty(description) ? undefined : description, | ||
|
|
@@ -167,6 +171,10 @@ | |
| ], | ||
| queryDate: getCurrentMillis(), | ||
| service: getPartialNameFromFQN(datasetFQN, ['service']), | ||
| domains: | ||
| hasActiveDomain | ||
| ? [activeDomain] | ||
| : [], | ||
| }; | ||
|
|
||
| try { | ||
|
|
||
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 async function body is not properly indented. The opening brace on line 481 should be followed by a consistently indented block starting at line 482. Currently line 482 has incorrect indentation that doesn't align with standard formatting.