Skip to content

Commit df54ad4

Browse files
committed
Fix: Enable Schema Search for All Entity Types in Explore Summary Panel (#26038)
* Fix: Enable Schema Search for All Entity Types in Explore Summary Panel * address gitar * address gitar comment * add missing mlmodel type * address gitar comment (cherry picked from commit 726374d)
1 parent 8060733 commit df54ad4

4 files changed

Lines changed: 564 additions & 34 deletions

File tree

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/*
2+
* Copyright 2025 Collate.
3+
* Licensed under the Apache License, Version 2.0 (the "License");
4+
* you may not use this file except in compliance with the License.
5+
* You may obtain a copy of the License at
6+
* http://www.apache.org/licenses/LICENSE-2.0
7+
* Unless required by applicable law or agreed to in writing, software
8+
* distributed under the License is distributed on an "AS IS" BASIS,
9+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10+
* See the License for the specific language governing permissions and
11+
* limitations under the License.
12+
*/
13+
import { EntityType } from '../../../enums/entity.enum';
14+
15+
/**
16+
* Entity type → i18n key for the child list label. Used by EntityDetailsSection
17+
* search placeholder and by getEntityChildrenAndLabel (EntityLineageUtils).
18+
* e.g. TABLE → "Columns", DASHBOARD → "Charts", PIPELINE → "Tasks"
19+
*/
20+
export const SEARCH_PLACEHOLDER_MAP: Record<string, string> = {
21+
[EntityType.TABLE]: 'label.column-plural',
22+
[EntityType.DASHBOARD_DATA_MODEL]: 'label.column-plural',
23+
[EntityType.TOPIC]: 'label.field-plural',
24+
[EntityType.CONTAINER]: 'label.column-plural',
25+
[EntityType.PIPELINE]: 'label.task-plural',
26+
[EntityType.DASHBOARD]: 'label.chart-plural',
27+
[EntityType.SEARCH_INDEX]: 'label.field-plural',
28+
[EntityType.API_ENDPOINT]: 'label.field-plural',
29+
[EntityType.API_COLLECTION]: 'label.api-endpoint-plural',
30+
[EntityType.DATABASE_SCHEMA]: 'label.table-plural',
31+
[EntityType.DATABASE]: 'label.database-schema-plural',
32+
[EntityType.MLMODEL]: 'label.feature-plural',
33+
};

openmetadata-ui/src/main/resources/ui/src/components/common/EntityDetailsSection/EntityDetailsSection.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import { getEntityChildDetailsV1 } from '../../../utils/EntitySummaryPanelUtilsV
2020
import ErrorPlaceHolderNew from '../ErrorWithPlaceholder/ErrorPlaceHolderNew';
2121
import Loader from '../Loader/Loader';
2222
import SearchBarComponent from '../SearchBarComponent/SearchBar.component';
23+
import { SEARCH_PLACEHOLDER_MAP } from './EntityDetailsSection.constants';
2324
import { EntityDetailsSectionProps } from './EntityDetailsSection.interface';
2425
import './EntityDetailsSection.less';
2526

@@ -50,6 +51,9 @@ const EntityDetailsSection: React.FC<EntityDetailsSectionProps> = ({
5051
return null;
5152
}
5253

54+
const searchLabel =
55+
SEARCH_PLACEHOLDER_MAP[entityType] || 'label.column-plural';
56+
5357
return dataAsset && !isEmpty(entityDetails) ? (
5458
<div
5559
className="entity-details-section"
@@ -58,7 +62,7 @@ const EntityDetailsSection: React.FC<EntityDetailsSectionProps> = ({
5862
<SearchBarComponent
5963
containerClassName="searchbar-container"
6064
placeholder={t('label.search-for-type', {
61-
type: t('label.column-plural'),
65+
type: t(searchLabel),
6266
})}
6367
searchValue={searchText}
6468
typingInterval={350}
@@ -82,3 +86,4 @@ const EntityDetailsSection: React.FC<EntityDetailsSectionProps> = ({
8286
};
8387

8488
export default EntityDetailsSection;
89+

0 commit comments

Comments
 (0)