From 9135b8faaf0bcdd450d7aa64a4527d26a34e859e Mon Sep 17 00:00:00 2001 From: Karan Hotchandani <33024356+karanh37@users.noreply.github.com> Date: Tue, 12 Mar 2024 18:57:14 +0530 Subject: [PATCH] Remove data product from glossary assets (#15527) * filter data products from glossary assets * fix glossary path * revert --- .../main/resources/ui/src/utils/GlossaryUtils.test.ts | 10 ++++++++-- .../src/main/resources/ui/src/utils/GlossaryUtils.ts | 10 ++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/openmetadata-ui/src/main/resources/ui/src/utils/GlossaryUtils.test.ts b/openmetadata-ui/src/main/resources/ui/src/utils/GlossaryUtils.test.ts index 161a4bffbae..e59b83d7327 100644 --- a/openmetadata-ui/src/main/resources/ui/src/utils/GlossaryUtils.test.ts +++ b/openmetadata-ui/src/main/resources/ui/src/utils/GlossaryUtils.test.ts @@ -10,6 +10,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +import { EntityType } from '../enums/entity.enum'; import { MOCKED_GLOSSARY_TERMS, MOCKED_GLOSSARY_TERMS_1, @@ -41,12 +42,17 @@ describe('Glossary Utils', () => { must_not: [ { term: { - entityType: 'glossaryTerm', + entityType: EntityType.GLOSSARY_TERM, }, }, { term: { - entityType: 'tag', + entityType: EntityType.TAG, + }, + }, + { + term: { + entityType: EntityType.DATA_PRODUCT, }, }, ], diff --git a/openmetadata-ui/src/main/resources/ui/src/utils/GlossaryUtils.ts b/openmetadata-ui/src/main/resources/ui/src/utils/GlossaryUtils.ts index 0efa2632c14..4d82e90ae4b 100644 --- a/openmetadata-ui/src/main/resources/ui/src/utils/GlossaryUtils.ts +++ b/openmetadata-ui/src/main/resources/ui/src/utils/GlossaryUtils.ts @@ -13,6 +13,7 @@ import { StatusType } from '../components/common/StatusBadge/StatusBadge.interface'; import { FQN_SEPARATOR_CHAR } from '../constants/char.constants'; +import { EntityType } from '../enums/entity.enum'; import { Glossary } from '../generated/entity/data/glossary'; import { GlossaryTerm, Status } from '../generated/entity/data/glossaryTerm'; import { EntityReference } from '../generated/type/entityReference'; @@ -93,12 +94,17 @@ export const getQueryFilterToExcludeTerm = (fqn: string) => ({ must_not: [ { term: { - entityType: 'glossaryTerm', + entityType: EntityType.GLOSSARY_TERM, }, }, { term: { - entityType: 'tag', + entityType: EntityType.TAG, + }, + }, + { + term: { + entityType: EntityType.DATA_PRODUCT, }, }, ],