mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-26 17:34:41 +00:00

* fix(ui): ui feedbacks for 1.2 release * fix notification panel height issue and data model expand icon issue * Data Quality, test creation, and minimizing the side panel. It shows the name as "Setup Guide.", It should be "Data Profiler Metrics." * changes locales * fix: displayName for the test cases * fix: Remove Domain shows tool tip as "Remove Owner" * chore: remove box shadow from primary buttons * fix: icon alignment in activity feed tab * Long names should be truncated * Increase the profile picture size to align with both the name and the persona * Text in Knowledge panels should be of the same size * Domain should be displayed on the explore card if the domain is available for any entity * If the Domains not configure the search filter is empty. "No data available." -> "No Domains are Assigned to Tables" etc. * fix: unit tests * fix: unit tets --------- Co-authored-by: Ashish Gupta <ashish@getcollate.io> Co-authored-by: Sachin Chaurasiya <sachinchaurasiyachotey87@gmail.com>
112 lines
3.2 KiB
TypeScript
112 lines
3.2 KiB
TypeScript
/*
|
|
* Copyright 2022 Collate.
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
|
|
import Qs from 'qs';
|
|
import { ReactNode } from 'react';
|
|
import { EntityReference } from '../../generated/entity/type';
|
|
import { TagLabel } from '../../generated/type/tagLabel';
|
|
import {
|
|
ContainerSearchSource,
|
|
DashboardDataModelSearchSource,
|
|
DashboardSearchSource,
|
|
ExploreSearchSource,
|
|
GlossarySearchSource,
|
|
MlmodelSearchSource,
|
|
PipelineSearchSource,
|
|
QuerySearchSource,
|
|
SearchHitBody,
|
|
SearchIndexSearchSource,
|
|
StoredProcedureSearchSource,
|
|
TableSearchSource,
|
|
TagClassSearchSource,
|
|
TeamSearchSource,
|
|
TestCaseSearchSource,
|
|
TopicSearchSource,
|
|
UserSearchSource,
|
|
} from '../../interface/search.interface';
|
|
import { ExploreSearchIndex } from '../Explore/explore.interface';
|
|
|
|
type Fields =
|
|
| 'name'
|
|
| 'fullyQualifiedName'
|
|
| 'description'
|
|
| 'serviceType'
|
|
| 'displayName'
|
|
| 'deleted'
|
|
| 'service'
|
|
| 'domain';
|
|
|
|
export type SourceType = (
|
|
| Pick<
|
|
TableSearchSource,
|
|
Fields | 'usageSummary' | 'database' | 'databaseSchema' | 'tableType'
|
|
>
|
|
| Pick<TopicSearchSource, Fields>
|
|
| Pick<ContainerSearchSource, Fields>
|
|
| Pick<PipelineSearchSource, Fields>
|
|
| Pick<DashboardDataModelSearchSource, Fields>
|
|
| Pick<StoredProcedureSearchSource, Fields | 'storedProcedureCode'>
|
|
| Pick<DashboardSearchSource | MlmodelSearchSource, Fields | 'usageSummary'>
|
|
| Pick<SearchIndexSearchSource, Fields>
|
|
| Pick<
|
|
Exclude<
|
|
ExploreSearchSource,
|
|
| TableSearchSource
|
|
| DashboardSearchSource
|
|
| MlmodelSearchSource
|
|
| GlossarySearchSource
|
|
| TagClassSearchSource
|
|
| QuerySearchSource
|
|
| UserSearchSource
|
|
| TeamSearchSource
|
|
| TestCaseSearchSource
|
|
| SearchIndexSearchSource
|
|
| StoredProcedureSearchSource
|
|
| DashboardDataModelSearchSource
|
|
>,
|
|
Fields
|
|
>
|
|
) & {
|
|
id: string;
|
|
tier?: string | TagLabel;
|
|
tags?: TagLabel[];
|
|
entityType?: string;
|
|
service?: EntityReference;
|
|
owner?: Partial<
|
|
Pick<
|
|
EntityReference,
|
|
'name' | 'displayName' | 'id' | 'type' | 'fullyQualifiedName' | 'deleted'
|
|
>
|
|
>;
|
|
};
|
|
|
|
export interface SearchedDataProps {
|
|
children?: ReactNode;
|
|
selectedEntityId: string;
|
|
data: SearchHitBody<ExploreSearchIndex, SourceType>[];
|
|
isLoading?: boolean;
|
|
onPaginationChange: (value: number, pageSize?: number) => void;
|
|
totalValue: number;
|
|
fetchLeftPanel?: () => ReactNode;
|
|
isSummaryPanelVisible: boolean;
|
|
showResultCount?: boolean;
|
|
showOnboardingTemplate?: boolean;
|
|
showOnlyChildren?: boolean;
|
|
isFilterSelected: boolean;
|
|
handleSummaryPanelDisplay?: (
|
|
details: SearchedDataProps['data'][number]['_source'],
|
|
entityType: string
|
|
) => void;
|
|
filter?: Qs.ParsedQs;
|
|
}
|