Minor: Add missing asset specific filter options for automator filters (#19268)

* Add missing filter options for glossary term, data model and stored procedure data assets.

* make the handleDeleteSelection prop optional for PipelineActionsDropdown component

* Fix the unit test

(cherry picked from commit 6a285781caa75b0421b3d27571f34c5da4d1eeae)
This commit is contained in:
Aniket Katkar 2025-01-08 06:57:25 +05:30 committed by OpenMetadata Release Bot
parent cd8f0d1e82
commit 6a3f3d5232
6 changed files with 27 additions and 7 deletions

View File

@ -24,7 +24,7 @@ export interface PipelineActionsProps {
serviceName?: string;
deployIngestion?: (id: string, displayName: string) => Promise<void>;
triggerIngestion?: (id: string, displayName: string) => Promise<void>;
handleDeleteSelection: (row: SelectedRowDetails) => void;
handleDeleteSelection?: (row: SelectedRowDetails) => void;
handleEditClick?: (fqn: string) => void;
handleEnableDisableIngestion?: (id: string) => Promise<void>;
handleIsConfirmationModalOpen: (value: boolean) => void;

View File

@ -24,7 +24,7 @@ export interface PipelineActionsDropdownProps {
deployIngestion?: (id: string, displayName: string) => Promise<void>;
handleEditClick: ((fqn: string) => void) | undefined;
ingestionPipelinePermissions?: IngestionServicePermission;
handleDeleteSelection: (row: SelectedRowDetails) => void;
handleDeleteSelection?: (row: SelectedRowDetails) => void;
handleIsConfirmationModalOpen: (value: boolean) => void;
onIngestionWorkflowsUpdate?: () => void;
moreActionButtonProps?: ButtonProps;

View File

@ -136,7 +136,7 @@ function PipelineActionsDropdown({
const handleConfirmDelete = useCallback(
(id: string, name: string, displayName?: string) => {
handleDeleteSelection({
handleDeleteSelection?.({
id,
name,
displayName,

View File

@ -148,7 +148,10 @@ describe('getEntitySpecificQueryBuilderFields', () => {
SearchIndex.GLOSSARY_TERM,
]);
expect(Object.keys(result)).toEqual([EntityFields.GLOSSARY_TERM_STATUS]);
expect(Object.keys(result)).toEqual([
EntityFields.GLOSSARY_TERM_STATUS,
EntityFields.GLOSSARY,
]);
});
it('should return databaseSchema specific fields', () => {

View File

@ -337,7 +337,7 @@ class AdvancedSearchClassBase {
/**
* Fields specific to Glossary
*/
glossaryQueryBuilderFields: Fields = {
glossaryTermQueryBuilderFields: Fields = {
[EntityFields.GLOSSARY_TERM_STATUS]: {
label: t('label.status'),
type: 'select',
@ -350,6 +350,18 @@ class AdvancedSearchClassBase {
useAsyncSearch: true,
},
},
[EntityFields.GLOSSARY]: {
label: t('label.glossary'),
type: 'select',
mainWidgetProps: this.mainWidgetProps,
fieldSettings: {
asyncFetch: this.autocomplete({
searchIndex: SearchIndex.GLOSSARY_TERM,
entityField: EntityFields.GLOSSARY,
}),
useAsyncSearch: true,
},
},
};
/**
@ -742,7 +754,7 @@ class AdvancedSearchClassBase {
[SearchIndex.SEARCH_INDEX]: this.searchIndexQueryBuilderFields,
[SearchIndex.DASHBOARD_DATA_MODEL]: this.dataModelQueryBuilderFields,
[SearchIndex.API_ENDPOINT_INDEX]: this.apiEndpointQueryBuilderFields,
[SearchIndex.GLOSSARY_TERM]: this.glossaryQueryBuilderFields,
[SearchIndex.GLOSSARY_TERM]: this.glossaryTermQueryBuilderFields,
[SearchIndex.DATABASE_SCHEMA]: this.databaseSchemaQueryBuilderFields,
[SearchIndex.STORED_PROCEDURE]: this.storedProcedureQueryBuilderFields,
[SearchIndex.ALL]: {
@ -766,7 +778,7 @@ class AdvancedSearchClassBase {
...this.searchIndexQueryBuilderFields,
...this.dataModelQueryBuilderFields,
...this.apiEndpointQueryBuilderFields,
...this.glossaryQueryBuilderFields,
...this.glossaryTermQueryBuilderFields,
},
};
@ -866,6 +878,8 @@ class AdvancedSearchClassBase {
SearchIndex.API_SERVICE_INDEX,
SearchIndex.API_ENDPOINT_INDEX,
SearchIndex.API_COLLECTION_INDEX,
SearchIndex.DASHBOARD_DATA_MODEL,
SearchIndex.STORED_PROCEDURE,
];
const shouldAddServiceField =

View File

@ -2499,6 +2499,9 @@ export const getEntityNameLabel = (entityName?: string) => {
query: t('label.query'),
THREAD: t('label.thread'),
app: t('label.application'),
apiCollection: t('label.api-collection'),
apiEndpoint: t('label.api-endpoint'),
metric: t('label.metric'),
};
return (