Refactor search options in SearchClassBase (#14982)

This commit is contained in:
Sachin Chaurasiya 2024-02-01 14:03:21 +05:30 committed by GitHub
parent 9a4a9df836
commit 7c497825fe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -99,27 +99,29 @@ class SearchClassBase {
}; };
} }
public getGlobalSearchOptions = () => [ public getGlobalSearchOptions() {
{ value: '', label: i18n.t('label.all') }, return [
{ value: SearchIndex.TABLE, label: i18n.t('label.table') }, { value: '', label: i18n.t('label.all') },
{ value: SearchIndex.TOPIC, label: i18n.t('label.topic') }, { value: SearchIndex.TABLE, label: i18n.t('label.table') },
{ value: SearchIndex.DASHBOARD, label: i18n.t('label.dashboard') }, { value: SearchIndex.TOPIC, label: i18n.t('label.topic') },
{ value: SearchIndex.PIPELINE, label: i18n.t('label.pipeline') }, { value: SearchIndex.DASHBOARD, label: i18n.t('label.dashboard') },
{ value: SearchIndex.MLMODEL, label: i18n.t('label.ml-model') }, { value: SearchIndex.PIPELINE, label: i18n.t('label.pipeline') },
{ value: SearchIndex.CONTAINER, label: i18n.t('label.container') }, { value: SearchIndex.MLMODEL, label: i18n.t('label.ml-model') },
{ { value: SearchIndex.CONTAINER, label: i18n.t('label.container') },
value: SearchIndex.STORED_PROCEDURE, {
label: i18n.t('label.stored-procedure'), value: SearchIndex.STORED_PROCEDURE,
}, label: i18n.t('label.stored-procedure'),
{ },
value: SearchIndex.DASHBOARD_DATA_MODEL, {
label: i18n.t('label.data-model'), value: SearchIndex.DASHBOARD_DATA_MODEL,
}, label: i18n.t('label.data-model'),
{ value: SearchIndex.GLOSSARY, label: i18n.t('label.glossary') }, },
{ value: SearchIndex.TAG, label: i18n.t('label.tag') }, { value: SearchIndex.GLOSSARY, label: i18n.t('label.glossary') },
{ value: SearchIndex.SEARCH_INDEX, label: i18n.t('label.search-index') }, { value: SearchIndex.TAG, label: i18n.t('label.tag') },
{ value: SearchIndex.DATA_PRODUCT, label: i18n.t('label.data-product') }, { value: SearchIndex.SEARCH_INDEX, label: i18n.t('label.search-index') },
]; { value: SearchIndex.DATA_PRODUCT, label: i18n.t('label.data-product') },
];
}
public getTabsInfo(): Record<ExploreSearchIndex, TabsInfoData> { public getTabsInfo(): Record<ExploreSearchIndex, TabsInfoData> {
return { return {