From dd176b7da1d12851299fc3eee21c1054fea3cdb2 Mon Sep 17 00:00:00 2001 From: Aniket Katkar Date: Wed, 1 May 2024 10:12:46 +0530 Subject: [PATCH] Minor: Automator, Advanced Search Improvements and Fixes (#16084) * Fix the schemaFields key for advanced search filters Add missing "Feature" quick filter for ml model on explore page * Update the common column filter fields label for different assets to differentiate the fields when combined list is displayed * Update localization files with new translations * Add isBeta property to LeftSidebarItem interface --- .../LeftSidebar/LeftSidebar.interface.ts | 1 + .../src/constants/AdvancedSearch.constants.ts | 94 ++++++++++--------- .../ui/src/enums/AdvancedSearch.enum.ts | 11 ++- .../ui/src/locale/languages/de-de.json | 2 + .../ui/src/locale/languages/en-us.json | 2 + .../ui/src/locale/languages/es-es.json | 2 + .../ui/src/locale/languages/fr-fr.json | 2 + .../ui/src/locale/languages/he-he.json | 2 + .../ui/src/locale/languages/ja-jp.json | 2 + .../ui/src/locale/languages/nl-nl.json | 2 + .../ui/src/locale/languages/pt-br.json | 2 + .../ui/src/locale/languages/ru-ru.json | 2 + .../ui/src/locale/languages/zh-cn.json | 2 + .../DataInsightPage/DataInsightProvider.tsx | 2 +- .../ui/src/utils/AdvancedSearchClassBase.ts | 8 +- .../ui/src/utils/SearchClassBase.test.ts | 4 +- .../resources/ui/src/utils/SearchClassBase.ts | 7 +- 17 files changed, 90 insertions(+), 57 deletions(-) diff --git a/openmetadata-ui/src/main/resources/ui/src/components/MyData/LeftSidebar/LeftSidebar.interface.ts b/openmetadata-ui/src/main/resources/ui/src/components/MyData/LeftSidebar/LeftSidebar.interface.ts index d30745129ad..d39658a5589 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/MyData/LeftSidebar/LeftSidebar.interface.ts +++ b/openmetadata-ui/src/main/resources/ui/src/components/MyData/LeftSidebar/LeftSidebar.interface.ts @@ -13,6 +13,7 @@ export interface LeftSidebarItem { key: string; + isBeta?: boolean; label: string; redirect_url?: string; icon: SvgComponent; diff --git a/openmetadata-ui/src/main/resources/ui/src/constants/AdvancedSearch.constants.ts b/openmetadata-ui/src/main/resources/ui/src/constants/AdvancedSearch.constants.ts index b6f235a384b..73b5f0b3993 100644 --- a/openmetadata-ui/src/main/resources/ui/src/constants/AdvancedSearch.constants.ts +++ b/openmetadata-ui/src/main/resources/ui/src/constants/AdvancedSearch.constants.ts @@ -13,149 +13,157 @@ import { t } from 'i18next'; import { JsonTree, Utils as QbUtils } from 'react-awesome-query-builder'; +import { EntityFields } from '../enums/AdvancedSearch.enum'; export const COMMON_DROPDOWN_ITEMS = [ { label: t('label.domain'), - key: 'domain.displayName.keyword', + key: EntityFields.DOMAIN, }, { label: t('label.owner'), - key: 'owner.displayName.keyword', + key: EntityFields.OWNER, }, { label: t('label.tag'), - key: 'tags.tagFQN', + key: EntityFields.TAG, }, { label: t('label.tier'), - key: 'tier.tagFQN', + key: EntityFields.TIER, }, { label: t('label.service'), - key: 'service.displayName.keyword', + key: EntityFields.SERVICE, }, { label: t('label.service-type'), - key: 'serviceType', + key: EntityFields.SERVICE_TYPE, }, ]; export const TABLE_DROPDOWN_ITEMS = [ { label: t('label.database'), - key: 'database.displayName.keyword', + key: EntityFields.DATABASE, }, { label: t('label.schema'), - key: 'databaseSchema.displayName.keyword', + key: EntityFields.DATABASE_SCHEMA, }, { label: t('label.column'), - key: 'columns.name.keyword', + key: EntityFields.COLUMN, }, { label: t('label.table-type'), - key: 'tableType', + key: EntityFields.TABLE_TYPE, }, ]; export const DASHBOARD_DROPDOWN_ITEMS = [ { label: t('label.data-model'), - key: 'dataModels.displayName.keyword', + key: EntityFields.DATA_MODEL, }, { label: t('label.chart'), - key: 'charts.displayName.keyword', + key: EntityFields.CHART, }, { label: t('label.project'), - key: 'project.keyword', + key: EntityFields.PROJECT, }, ]; export const DASHBOARD_DATA_MODEL_TYPE = [ { label: t('label.data-model-type'), - key: 'dataModelType', + key: EntityFields.DATA_MODEL_TYPE, }, { label: t('label.column'), - key: 'columns.name.keyword', + key: EntityFields.COLUMN, }, { label: t('label.project'), - key: 'project.keyword', + key: EntityFields.PROJECT, }, ]; export const PIPELINE_DROPDOWN_ITEMS = [ { label: t('label.task'), - key: 'tasks.displayName.keyword', + key: EntityFields.TASK, }, ]; export const SEARCH_INDEX_DROPDOWN_ITEMS = [ { label: t('label.field'), - key: 'fields.name.keyword', + key: EntityFields.FIELD, + }, +]; + +export const ML_MODEL_DROPDOWN_ITEMS = [ + { + label: t('label.feature'), + key: EntityFields.FEATURE, }, ]; export const TOPIC_DROPDOWN_ITEMS = [ { label: t('label.schema-field'), - key: 'messageSchema.schemaFields.name', + key: EntityFields.SCHEMA_FIELD, }, ]; export const CONTAINER_DROPDOWN_ITEMS = [ { label: t('label.column'), - key: 'dataModel.columns.name.keyword', + key: EntityFields.CONTAINER_COLUMN, }, ]; export const GLOSSARY_DROPDOWN_ITEMS = [ { label: t('label.domain'), - key: 'domain.displayName.keyword', + key: EntityFields.DOMAIN, }, { label: t('label.owner'), - key: 'owner.displayName.keyword', + key: EntityFields.OWNER, }, { label: t('label.tag'), - key: 'tags.tagFQN', + key: EntityFields.TAG, }, { label: t('label.glossary-plural'), - key: 'glossary.name.keyword', + key: EntityFields.GLOSSARY, }, ]; export const TAG_DROPDOWN_ITEMS = [ { label: t('label.domain'), - key: 'domain.displayName.keyword', + key: EntityFields.DOMAIN, }, { label: t('label.classification'), - key: 'classification.name.keyword', + key: EntityFields.CLASSIFICATION, }, ]; export const DATA_PRODUCT_DROPDOWN_ITEMS = [ { label: t('label.domain'), - key: 'domain.displayName.keyword', + key: EntityFields.DOMAIN, }, { label: t('label.owner'), - key: 'owner.displayName.keyword', + key: EntityFields.OWNER, }, ]; @@ -164,27 +172,27 @@ export const DOMAIN_DATAPRODUCT_DROPDOWN_ITEMS = [ label: t('label.entity-type-plural', { entity: t('label.entity'), }), - key: 'entityType', + key: EntityFields.ENTITY_TYPE, }, { label: t('label.owner'), - key: 'owner.displayName.keyword', + key: EntityFields.OWNER, }, { label: t('label.tag'), - key: 'tags.tagFQN', + key: EntityFields.TAG, }, { label: t('label.tier'), - key: 'tier.tagFQN', + key: EntityFields.TIER, }, { label: t('label.service'), - key: 'service.displayName.keyword', + key: EntityFields.SERVICE, }, { label: t('label.service-type'), - key: 'serviceType', + key: EntityFields.SERVICE_TYPE, }, ]; @@ -193,31 +201,31 @@ export const GLOSSARY_ASSETS_DROPDOWN_ITEMS = [ label: t('label.entity-type-plural', { entity: t('label.entity'), }), - key: 'entityType', + key: EntityFields.ENTITY_TYPE, }, { label: t('label.domain'), - key: 'domain.displayName.keyword', + key: EntityFields.DOMAIN, }, { label: t('label.owner'), - key: 'owner.displayName.keyword', + key: EntityFields.OWNER, }, { label: t('label.tag'), - key: 'tags.tagFQN', + key: EntityFields.TAG, }, { label: t('label.tier'), - key: 'tier.tagFQN', + key: EntityFields.TIER, }, { label: t('label.service'), - key: 'service.displayName.keyword', + key: EntityFields.SERVICE, }, { label: t('label.service-type'), - key: 'serviceType', + key: EntityFields.SERVICE_TYPE, }, ]; @@ -225,7 +233,7 @@ export const LINEAGE_DROPDOWN_ITEMS = [ ...COMMON_DROPDOWN_ITEMS, { label: t('label.column'), - key: 'columns.name.keyword', + key: EntityFields.COLUMN, }, ]; @@ -251,7 +259,7 @@ export const emptyJsonTree: JsonTree = { type: 'rule', properties: { // owner is common field , so setting owner as default field here - field: 'owner.displayName.keyword', + field: EntityFields.OWNER, operator: null, value: [], valueSrc: ['value'], diff --git a/openmetadata-ui/src/main/resources/ui/src/enums/AdvancedSearch.enum.ts b/openmetadata-ui/src/main/resources/ui/src/enums/AdvancedSearch.enum.ts index d6fed34facb..411214eabd3 100644 --- a/openmetadata-ui/src/main/resources/ui/src/enums/AdvancedSearch.enum.ts +++ b/openmetadata-ui/src/main/resources/ui/src/enums/AdvancedSearch.enum.ts @@ -37,17 +37,22 @@ export enum AdvancedFields { export enum EntityFields { SERVICE_TYPE = 'serviceType', DATA_MODEL_TYPE = 'dataModelType', + ENTITY_TYPE = 'entityType', + TABLE_TYPE = 'tableType', + DISPLAY_NAME_KEYWORD = 'displayName.keyword', + GLOSSARY = 'glossary.name.keyword', + CLASSIFICATION = 'classification.name.keyword', DOMAIN = 'domain.displayName.keyword', DATA_MODEL = 'dataModels.displayName.keyword', CONTAINER_COLUMN = 'dataModel.columns.name.keyword', PROJECT = 'project.keyword', - SCHEMA_FIELD = 'messageSchema.schemaFields.name', + SCHEMA_FIELD = 'messageSchema.schemaFields.name.keyword', FEATURE = 'mlFeatures.name', FIELD = 'fields.name.keyword', - OWNER = 'displayName.keyword', + OWNER = 'owner.displayName.keyword', TAG = 'tags.tagFQN', TIER = 'tier.tagFQN', - SERVICE = 'service.name.keyword', + SERVICE = 'service.displayName.keyword', DATABASE = 'database.name.keyword', DATABASE_SCHEMA = 'databaseSchema.name.keyword', COLUMN = 'columns.name.keyword', diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/de-de.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/de-de.json index 1a44eda6024..b132607c20f 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/de-de.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/de-de.json @@ -197,6 +197,7 @@ "connector": "Connector", "consumer-aligned": "Consumer-aligned", "container": "Container", + "container-column": "Container Column", "container-plural": "Container", "conversation": "Konversation", "conversation-lowercase": "konversation", @@ -270,6 +271,7 @@ "data-insight-top-viewed-entity-summary": "Am häufigsten angesehene Daten-Assets", "data-insight-total-entity-summary": "Gesamtzahl der Daten-Assets", "data-model": "Datenmodell", + "data-model-column": "Data Model Column", "data-model-plural": "Datenmodelle", "data-model-type": "Datenmodelltyp", "data-observability": "Data Observability", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/en-us.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/en-us.json index 25c3016b28e..8480d4db23c 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/en-us.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/en-us.json @@ -197,6 +197,7 @@ "connector": "Connector", "consumer-aligned": "Consumer-aligned", "container": "Container", + "container-column": "Container Column", "container-plural": "Containers", "conversation": "Conversation", "conversation-lowercase": "conversation", @@ -270,6 +271,7 @@ "data-insight-top-viewed-entity-summary": "Most Viewed Data Assets", "data-insight-total-entity-summary": "Total Data Assets", "data-model": "Data Model", + "data-model-column": "Data Model Column", "data-model-plural": "Data Models", "data-model-type": "Data Model Type", "data-observability": "Data Observability", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/es-es.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/es-es.json index 080f8be24b0..b7acee806f3 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/es-es.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/es-es.json @@ -197,6 +197,7 @@ "connector": "Conector", "consumer-aligned": "Alineado con el Consumidor", "container": "Contenedor", + "container-column": "Container Column", "container-plural": "Contenedores", "conversation": "Conversación", "conversation-lowercase": "conversación", @@ -270,6 +271,7 @@ "data-insight-top-viewed-entity-summary": "Activos de datos más vistos", "data-insight-total-entity-summary": "Total de activos de datos", "data-model": "Modelo de datos", + "data-model-column": "Data Model Column", "data-model-plural": "Modelos de datos", "data-model-type": "Tipo de Modelo de datos", "data-observability": "Observabilidad", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/fr-fr.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/fr-fr.json index 3a9abe72a59..8c3d97f9584 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/fr-fr.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/fr-fr.json @@ -197,6 +197,7 @@ "connector": "Connecteur", "consumer-aligned": "Consumer-aligned", "container": "Conteneur", + "container-column": "Container Column", "container-plural": "Conteneurs", "conversation": "Conversation", "conversation-lowercase": "conversation", @@ -270,6 +271,7 @@ "data-insight-top-viewed-entity-summary": "Actifs de Données les plus Consultés", "data-insight-total-entity-summary": "Total des Actifs de Données", "data-model": "Modèle de Données", + "data-model-column": "Data Model Column", "data-model-plural": "Modèles de Données", "data-model-type": "Type de Modèle de Données", "data-observability": "Data Observability", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/he-he.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/he-he.json index c625ceeead6..9a86d038b40 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/he-he.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/he-he.json @@ -197,6 +197,7 @@ "connector": "מחבר", "consumer-aligned": "מכוון לצרכן", "container": "אחסון", + "container-column": "Container Column", "container-plural": "אחסון (Storage)", "conversation": "דיון", "conversation-lowercase": "דיון", @@ -270,6 +271,7 @@ "data-insight-top-viewed-entity-summary": "הנכסים הנצפים ביותר", "data-insight-total-entity-summary": "סך כל נכסי הנתונים", "data-model": "מודל נתונים", + "data-model-column": "Data Model Column", "data-model-plural": "מודלי נתונים", "data-model-type": "סוג מודל נתונים", "data-observability": "Data Observability", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/ja-jp.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/ja-jp.json index da550caaccc..18c9f5ae367 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/ja-jp.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/ja-jp.json @@ -197,6 +197,7 @@ "connector": "コネクタ", "consumer-aligned": "Consumer-aligned", "container": "コンテナ", + "container-column": "Container Column", "container-plural": "コンテナ", "conversation": "会話", "conversation-lowercase": "会話", @@ -270,6 +271,7 @@ "data-insight-top-viewed-entity-summary": "最も閲覧されたデータアセット", "data-insight-total-entity-summary": "全てのデータアセット", "data-model": "Data Model", + "data-model-column": "Data Model Column", "data-model-plural": "Data Models", "data-model-type": "Data Model Type", "data-observability": "Data Observability", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/nl-nl.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/nl-nl.json index b5ecc6d1bde..a3a6bc9d941 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/nl-nl.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/nl-nl.json @@ -197,6 +197,7 @@ "connector": "Connector", "consumer-aligned": "Consumentafgestemd", "container": "Container", + "container-column": "Container Column", "container-plural": "Containers", "conversation": "Gesprek", "conversation-lowercase": "gesprek", @@ -270,6 +271,7 @@ "data-insight-top-viewed-entity-summary": "Meest bekeken data-assets", "data-insight-total-entity-summary": "Data-assets totaal", "data-model": "Datamodel", + "data-model-column": "Data Model Column", "data-model-plural": "Datamodellen", "data-model-type": "Type datamodel", "data-observability": "Data Observability", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/pt-br.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/pt-br.json index f98cebc6dfb..7f5189329f0 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/pt-br.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/pt-br.json @@ -197,6 +197,7 @@ "connector": "Conector", "consumer-aligned": "Alinhado ao Consumidor", "container": "Contêiner", + "container-column": "Container Column", "container-plural": "Contêineres", "conversation": "Conversa", "conversation-lowercase": "conversa", @@ -270,6 +271,7 @@ "data-insight-top-viewed-entity-summary": "Ativos de Dados Mais Visualizados", "data-insight-total-entity-summary": "Total de Ativos de Dados", "data-model": "Modelo de Dados", + "data-model-column": "Data Model Column", "data-model-plural": "Modelos de Dados", "data-model-type": "Tipo de Modelo de Dados", "data-observability": "Data Observability", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/ru-ru.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/ru-ru.json index 87825d43999..31addc0260d 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/ru-ru.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/ru-ru.json @@ -197,6 +197,7 @@ "connector": "Коннектор", "consumer-aligned": "Consumer-aligned", "container": "Контейнер", + "container-column": "Container Column", "container-plural": "Контейнеры", "conversation": "Обсуждение", "conversation-lowercase": "обсуждение", @@ -270,6 +271,7 @@ "data-insight-top-viewed-entity-summary": "Самые просматриваемые объекты данных", "data-insight-total-entity-summary": "Все объекты данных", "data-model": "Модель данных", + "data-model-column": "Data Model Column", "data-model-plural": "Модели данных", "data-model-type": "Тип модели данных", "data-observability": "Data Observability", diff --git a/openmetadata-ui/src/main/resources/ui/src/locale/languages/zh-cn.json b/openmetadata-ui/src/main/resources/ui/src/locale/languages/zh-cn.json index 3f65fafbdd1..945644244ea 100644 --- a/openmetadata-ui/src/main/resources/ui/src/locale/languages/zh-cn.json +++ b/openmetadata-ui/src/main/resources/ui/src/locale/languages/zh-cn.json @@ -197,6 +197,7 @@ "connector": "连接器", "consumer-aligned": "Consumer-aligned", "container": "存储容器", + "container-column": "Container Column", "container-plural": "存储容器", "conversation": "对话", "conversation-lowercase": "对话", @@ -270,6 +271,7 @@ "data-insight-top-viewed-entity-summary": "查看次数最多的数据资产", "data-insight-total-entity-summary": "所有数据资产", "data-model": "数据模型", + "data-model-column": "Data Model Column", "data-model-plural": "数据模型", "data-model-type": "数据模型类型", "data-observability": "Data Observability", diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/DataInsightPage/DataInsightProvider.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/DataInsightPage/DataInsightProvider.tsx index 1f24a537978..adba7e2b701 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/DataInsightPage/DataInsightProvider.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/DataInsightPage/DataInsightProvider.tsx @@ -50,7 +50,7 @@ export const DataInsightContext = createContext( ); const fetchTeamSuggestions = advancedSearchClassBase.autocomplete({ searchIndex: SearchIndex.TEAM, - entityField: EntityFields.OWNER, + entityField: EntityFields.DISPLAY_NAME_KEYWORD, }); const DataInsightProvider = ({ children }: DataInsightProviderProps) => { diff --git a/openmetadata-ui/src/main/resources/ui/src/utils/AdvancedSearchClassBase.ts b/openmetadata-ui/src/main/resources/ui/src/utils/AdvancedSearchClassBase.ts index 461cdb3efaf..71bf3aaa771 100644 --- a/openmetadata-ui/src/main/resources/ui/src/utils/AdvancedSearchClassBase.ts +++ b/openmetadata-ui/src/main/resources/ui/src/utils/AdvancedSearchClassBase.ts @@ -132,7 +132,7 @@ class AdvancedSearchClassBase { * Fields specific to topics */ topicQueryBuilderFields: Fields = { - 'messageSchema.schemaFields.name': { + 'messageSchema.schemaFields.name.keyword': { label: t('label.schema-field'), type: 'select', mainWidgetProps: this.mainWidgetProps, @@ -211,7 +211,7 @@ class AdvancedSearchClassBase { */ containerQueryBuilderFields: Fields = { 'dataModel.columns.name.keyword': { - label: t('label.column'), + label: t('label.container-column'), type: 'select', mainWidgetProps: this.mainWidgetProps, fieldSettings: { @@ -259,7 +259,7 @@ class AdvancedSearchClassBase { }, }, 'columns.name.keyword': { - label: t('label.column'), + label: t('label.data-model-column'), type: 'select', mainWidgetProps: this.mainWidgetProps, fieldSettings: { @@ -404,7 +404,7 @@ class AdvancedSearchClassBase { fieldSettings: { asyncFetch: this.autocomplete({ searchIndex: [SearchIndex.USER, SearchIndex.TEAM], - entityField: EntityFields.OWNER, + entityField: EntityFields.DISPLAY_NAME_KEYWORD, }), useAsyncSearch: true, }, diff --git a/openmetadata-ui/src/main/resources/ui/src/utils/SearchClassBase.test.ts b/openmetadata-ui/src/main/resources/ui/src/utils/SearchClassBase.test.ts index 7b9d534525f..b34165fa69b 100644 --- a/openmetadata-ui/src/main/resources/ui/src/utils/SearchClassBase.test.ts +++ b/openmetadata-ui/src/main/resources/ui/src/utils/SearchClassBase.test.ts @@ -17,6 +17,7 @@ import { DASHBOARD_DROPDOWN_ITEMS, DATA_PRODUCT_DROPDOWN_ITEMS, GLOSSARY_DROPDOWN_ITEMS, + ML_MODEL_DROPDOWN_ITEMS, PIPELINE_DROPDOWN_ITEMS, SEARCH_INDEX_DROPDOWN_ITEMS, TABLE_DROPDOWN_ITEMS, @@ -153,7 +154,8 @@ describe('SearchClassBase', () => { ]); expect(mlmodelsItems).toEqual([ - ...COMMON_DROPDOWN_ITEMS.filter((item) => item.key !== 'service_type'), + ...COMMON_DROPDOWN_ITEMS, + ...ML_MODEL_DROPDOWN_ITEMS, ]); expect(searchIndexItems).toEqual([ diff --git a/openmetadata-ui/src/main/resources/ui/src/utils/SearchClassBase.ts b/openmetadata-ui/src/main/resources/ui/src/utils/SearchClassBase.ts index 8f80fff7783..9ce2a9b5571 100644 --- a/openmetadata-ui/src/main/resources/ui/src/utils/SearchClassBase.ts +++ b/openmetadata-ui/src/main/resources/ui/src/utils/SearchClassBase.ts @@ -35,6 +35,7 @@ import { DASHBOARD_DROPDOWN_ITEMS, DATA_PRODUCT_DROPDOWN_ITEMS, GLOSSARY_DROPDOWN_ITEMS, + ML_MODEL_DROPDOWN_ITEMS, PIPELINE_DROPDOWN_ITEMS, SEARCH_INDEX_DROPDOWN_ITEMS, TABLE_DROPDOWN_ITEMS, @@ -284,11 +285,7 @@ class SearchClassBase { return [...COMMON_DROPDOWN_ITEMS, ...SEARCH_INDEX_DROPDOWN_ITEMS]; case SearchIndex.MLMODEL: - return [ - ...COMMON_DROPDOWN_ITEMS.filter( - (item) => item.key !== 'service_type' - ), - ]; + return [...COMMON_DROPDOWN_ITEMS, ...ML_MODEL_DROPDOWN_ITEMS]; case SearchIndex.CONTAINER: return [...COMMON_DROPDOWN_ITEMS, ...CONTAINER_DROPDOWN_ITEMS]; case SearchIndex.DASHBOARD_DATA_MODEL: