fix(ui): supported pending services in assets (#13372)

* supported pending services in assets

* localization key change

* added storage service

* sonar fixes

* fix broken paths

---------

Co-authored-by: 07Himank <112613760+07Himank@users.noreply.github.com>
This commit is contained in:
Ashish Gupta 2023-10-05 19:20:59 +05:30 committed by GitHub
parent de2b2c6428
commit 11b034231a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
37 changed files with 718 additions and 27 deletions

View File

@ -32,7 +32,7 @@ public class DatabaseServiceIndex implements SearchIndex {
databaseService.getFullyQualifiedName(),
suggest.stream().map(SearchSuggest::getInput).collect(Collectors.toList())));
doc.put("suggest", suggest);
doc.put("entityType", Entity.DASHBOARD_SERVICE);
doc.put("entityType", Entity.DATABASE_SERVICE);
if (databaseService.getOwner() != null) {
doc.put("owner", getOwnerWithDisplayName(databaseService.getOwner()));
}

View File

@ -29,6 +29,7 @@ import { DatabaseService } from '../../../generated/entity/services/databaseServ
import { MessagingService } from '../../../generated/entity/services/messagingService';
import { MlmodelService } from '../../../generated/entity/services/mlmodelService';
import { PipelineService } from '../../../generated/entity/services/pipelineService';
import { SearchService } from '../../../generated/entity/services/searchService';
import { StorageService } from '../../../generated/entity/services/storageService';
export interface AssetSelectionModalProps {
@ -57,7 +58,8 @@ export type AssetsUnion =
| EntityType.PIPELINE_SERVICE
| EntityType.MLMODEL_SERVICE
| EntityType.STORAGE_SERVICE
| EntityType.DATABASE_SERVICE;
| EntityType.DATABASE_SERVICE
| EntityType.SEARCH_SERVICE;
export type MapPatchAPIResponse = {
[EntityType.TABLE]: Table;
@ -78,4 +80,5 @@ export type MapPatchAPIResponse = {
[EntityType.MLMODEL_SERVICE]: MlmodelService;
[EntityType.STORAGE_SERVICE]: StorageService;
[EntityType.DATABASE_SERVICE]: DatabaseService;
[EntityType.SEARCH_SERVICE]: SearchService;
};

View File

@ -59,6 +59,7 @@ import TabsLabel from '../../../components/TabsLabel/TabsLabel.component';
import { FQN_SEPARATOR_CHAR } from '../../../constants/char.constants';
import { DE_ACTIVE_COLOR } from '../../../constants/constants';
import { EntityField } from '../../../constants/Feeds.constants';
import { myDataSearchIndex } from '../../../constants/Mydata.constants';
import { EntityType } from '../../../enums/entity.enum';
import {
ChangeDescription,
@ -69,7 +70,6 @@ import { Operation } from '../../../generated/entity/policies/policy';
import { Style } from '../../../generated/type/tagLabel';
import { searchData } from '../../../rest/miscAPI';
import { getEntityDeleteMessage } from '../../../utils/CommonUtils';
import { DomainAssetsSearchIndex } from '../../../utils/DomainUtils';
import { getEntityVersionByField } from '../../../utils/EntityVersionUtils';
import Fqn from '../../../utils/Fqn.js';
import {
@ -221,7 +221,7 @@ const DataProductsDetailsPage = ({
`(dataProducts.fullyQualifiedName:"${fqn}")`,
'',
'',
DomainAssetsSearchIndex
myDataSearchIndex
);
setAssetCount(res.data.hits.total.value ?? 0);

View File

@ -63,6 +63,7 @@ import TabsLabel from '../../../components/TabsLabel/TabsLabel.component';
import { FQN_SEPARATOR_CHAR } from '../../../constants/char.constants';
import { DE_ACTIVE_COLOR, ERROR_MESSAGE } from '../../../constants/constants';
import { EntityField } from '../../../constants/Feeds.constants';
import { myDataSearchIndex } from '../../../constants/Mydata.constants';
import { EntityType } from '../../../enums/entity.enum';
import { SearchIndex } from '../../../enums/search.enum';
import { CreateDataProduct } from '../../../generated/api/domains/createDataProduct';
@ -77,7 +78,6 @@ import {
getEntityDeleteMessage,
getIsErrorMatch,
} from '../../../utils/CommonUtils';
import { DomainAssetsSearchIndex } from '../../../utils/DomainUtils';
import { getEntityVersionByField } from '../../../utils/EntityVersionUtils';
import Fqn from '../../../utils/Fqn';
import { DEFAULT_ENTITY_PERMISSION } from '../../../utils/PermissionsUtils';
@ -264,7 +264,7 @@ const DomainDetailsPage = ({
`(domain.fullyQualifiedName:"${fqn}")`,
'',
'',
DomainAssetsSearchIndex
myDataSearchIndex
);
setAssetCount(res.data.hits.total.value ?? 0);

View File

@ -102,7 +102,7 @@ function DashboardSummary({
<SummaryTagsDescription
entityDetail={entityDetails}
tags={tags ?? []}
tags={tags ?? entityDetails.tags ?? []}
/>
<Divider className="m-y-xs" />

View File

@ -74,7 +74,7 @@ const DataModelSummary = ({
<SummaryTagsDescription
entityDetail={entityDetails}
tags={tags ?? []}
tags={tags ?? entityDetails.tags ?? []}
/>
<Divider className="m-y-xs" />

View File

@ -0,0 +1,59 @@
/*
* Copyright 2023 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 { Col, Divider, Row } from 'antd';
import React, { useMemo } from 'react';
import SummaryTagsDescription from '../../../../components/common/SummaryTagsDescription/SummaryTagsDescription.component';
import SummaryPanelSkeleton from '../../../../components/Skeleton/SummaryPanelSkeleton/SummaryPanelSkeleton.component';
import { ExplorePageTabs } from '../../../../enums/Explore.enum';
import {
DRAWER_NAVIGATION_OPTIONS,
getEntityOverview,
} from '../../../../utils/EntityUtils';
import CommonEntitySummaryInfo from '../CommonEntitySummaryInfo/CommonEntitySummaryInfo';
import { DatabaseSchemaSummaryProps } from './DatabaseSchemaSummary.interface';
const DatabaseSchemaSummary = ({
entityDetails,
componentType = DRAWER_NAVIGATION_OPTIONS.explore,
tags,
isLoading,
}: DatabaseSchemaSummaryProps) => {
const entityInfo = useMemo(
() => getEntityOverview(ExplorePageTabs.DATABASE_SCHEMA, entityDetails),
[entityDetails]
);
return (
<SummaryPanelSkeleton loading={Boolean(isLoading)}>
<>
<Row className="m-md" gutter={[0, 4]}>
<Col span={24}>
<CommonEntitySummaryInfo
componentType={componentType}
entityInfo={entityInfo}
/>
</Col>
</Row>
<Divider className="m-y-xs" />
<SummaryTagsDescription
entityDetail={entityDetails}
tags={tags ?? entityDetails.tags ?? []}
/>
</>
</SummaryPanelSkeleton>
);
};
export default DatabaseSchemaSummary;

View File

@ -0,0 +1,23 @@
/*
* Copyright 2023 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 { DatabaseSchema } from '../../../../generated/entity/data/databaseSchema';
import { TagLabel } from '../../../../generated/type/tagLabel';
import { DRAWER_NAVIGATION_OPTIONS } from '../../../../utils/EntityUtils';
export interface DatabaseSchemaSummaryProps {
entityDetails: DatabaseSchema;
componentType?: DRAWER_NAVIGATION_OPTIONS;
tags?: TagLabel[];
isLoading?: boolean;
}

View File

@ -0,0 +1,92 @@
/*
* Copyright 2023 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 { Col, Divider, Row, Typography } from 'antd';
import React, { useMemo } from 'react';
import { useTranslation } from 'react-i18next';
import SummaryTagsDescription from '../../../../components/common/SummaryTagsDescription/SummaryTagsDescription.component';
import SummaryPanelSkeleton from '../../../../components/Skeleton/SummaryPanelSkeleton/SummaryPanelSkeleton.component';
import { SummaryEntityType } from '../../../../enums/EntitySummary.enum';
import { ExplorePageTabs } from '../../../../enums/Explore.enum';
import { getFormattedEntityData } from '../../../../utils/EntitySummaryPanelUtils';
import {
DRAWER_NAVIGATION_OPTIONS,
getEntityOverview,
} from '../../../../utils/EntityUtils';
import CommonEntitySummaryInfo from '../CommonEntitySummaryInfo/CommonEntitySummaryInfo';
import SummaryList from '../SummaryList/SummaryList.component';
import { BasicEntityInfo } from '../SummaryList/SummaryList.interface';
import { DatabaseSummaryProps } from './DatabaseSummary.interface';
const DatabaseSummary = ({
entityDetails,
componentType = DRAWER_NAVIGATION_OPTIONS.explore,
tags,
isLoading,
}: DatabaseSummaryProps) => {
const { t } = useTranslation();
const entityInfo = useMemo(
() => getEntityOverview(ExplorePageTabs.DATABASE, entityDetails),
[entityDetails]
);
const formattedSchemaData: BasicEntityInfo[] = useMemo(
() =>
getFormattedEntityData(
SummaryEntityType.SCHEMAFIELD,
entityDetails.databaseSchemas
),
[entityDetails]
);
return (
<SummaryPanelSkeleton loading={Boolean(isLoading)}>
<>
<Row className="m-md" gutter={[0, 4]}>
<Col span={24}>
<CommonEntitySummaryInfo
componentType={componentType}
entityInfo={entityInfo}
/>
</Col>
</Row>
<Divider className="m-y-xs" />
<SummaryTagsDescription
entityDetail={entityDetails}
tags={tags ?? entityDetails.tags ?? []}
/>
<Divider className="m-y-xs" />
<Row className="m-md" gutter={[0, 8]}>
<Col span={24}>
<Typography.Text
className="summary-panel-section-title"
data-testid="schema-header">
{t('label.schema')}
</Typography.Text>
</Col>
<Col span={24}>
<SummaryList
entityType={SummaryEntityType.SCHEMAFIELD}
formattedEntityData={formattedSchemaData}
/>
</Col>
</Row>
</>
</SummaryPanelSkeleton>
);
};
export default DatabaseSummary;

View File

@ -0,0 +1,23 @@
/*
* Copyright 2023 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 { Database } from '../../../../generated/entity/data/database';
import { TagLabel } from '../../../../generated/type/tagLabel';
import { DRAWER_NAVIGATION_OPTIONS } from '../../../../utils/EntityUtils';
export interface DatabaseSummaryProps {
entityDetails: Database;
componentType?: DRAWER_NAVIGATION_OPTIONS;
tags?: TagLabel[];
isLoading?: boolean;
}

View File

@ -17,10 +17,13 @@ import React, { useEffect, useMemo, useState } from 'react';
import { Link, useParams } from 'react-router-dom';
import { ERROR_PLACEHOLDER_TYPE, SIZE } from '../../../enums/common.enum';
import { EntityType } from '../../../enums/entity.enum';
import { ExplorePageTabs } from '../../../enums/Explore.enum';
import { Tag } from '../../../generated/entity/classification/tag';
import { Container } from '../../../generated/entity/data/container';
import { Dashboard } from '../../../generated/entity/data/dashboard';
import { DashboardDataModel } from '../../../generated/entity/data/dashboardDataModel';
import { Database } from '../../../generated/entity/data/database';
import { DatabaseSchema } from '../../../generated/entity/data/databaseSchema';
import { GlossaryTerm } from '../../../generated/entity/data/glossaryTerm';
import { Mlmodel } from '../../../generated/entity/data/mlmodel';
import { Pipeline } from '../../../generated/entity/data/pipeline';
@ -29,6 +32,13 @@ import { StoredProcedure } from '../../../generated/entity/data/storedProcedure'
import { Table } from '../../../generated/entity/data/table';
import { Topic } from '../../../generated/entity/data/topic';
import { DataProduct } from '../../../generated/entity/domains/dataProduct';
import { DashboardService } from '../../../generated/entity/services/dashboardService';
import { DatabaseService } from '../../../generated/entity/services/databaseService';
import { MessagingService } from '../../../generated/entity/services/messagingService';
import { MlmodelService } from '../../../generated/entity/services/mlmodelService';
import { PipelineService } from '../../../generated/entity/services/pipelineService';
import { SearchService } from '../../../generated/entity/services/searchService';
import { StorageService } from '../../../generated/entity/services/storageService';
import {
getEntityLinkFromType,
getEntityName,
@ -44,6 +54,8 @@ import {
} from '../../PermissionProvider/PermissionProvider.interface';
import ContainerSummary from './ContainerSummary/ContainerSummary.component';
import DashboardSummary from './DashboardSummary/DashboardSummary.component';
import DatabaseSchemaSummary from './DatabaseSchemaSummary/DatabaseSchemaSummary.component';
import DatabaseSummary from './DatabaseSummary/DatabaseSummary.component';
import DataModelSummary from './DataModelSummary/DataModelSummary.component';
import DataProductSummary from './DataProductSummary/DataProductSummary.component';
import { EntitySummaryPanelProps } from './EntitySummaryPanel.interface';
@ -52,6 +64,7 @@ import GlossaryTermSummary from './GlossaryTermSummary/GlossaryTermSummary.compo
import MlModelSummary from './MlModelSummary/MlModelSummary.component';
import PipelineSummary from './PipelineSummary/PipelineSummary.component';
import SearchIndexSummary from './SearchIndexSummary/SearchIndexSummary.component';
import ServiceSummary from './ServiceSummary/ServiceSummary.component';
import StoredProcedureSummary from './StoredProcedureSummary/StoredProcedureSummary.component';
import TableSummary from './TableSummary/TableSummary.component';
import TagsSummary from './TagsSummary/TagsSummary.component';
@ -153,6 +166,67 @@ export default function EntitySummaryPanel({
case EntityType.SEARCH_INDEX:
return <SearchIndexSummary entityDetails={entity as SearchIndex} />;
case EntityType.DATABASE:
return <DatabaseSummary entityDetails={entity as Database} />;
case EntityType.DATABASE_SCHEMA:
return (
<DatabaseSchemaSummary entityDetails={entity as DatabaseSchema} />
);
case EntityType.DATABASE_SERVICE:
return (
<ServiceSummary
entityDetails={entity as DatabaseService}
type={ExplorePageTabs.DATABASE_SERVICE}
/>
);
case EntityType.MESSAGING_SERVICE:
return (
<ServiceSummary
entityDetails={entity as MessagingService}
type={ExplorePageTabs.MESSAGING_SERVICE}
/>
);
case EntityType.DASHBOARD_SERVICE:
return (
<ServiceSummary
entityDetails={entity as DashboardService}
type={ExplorePageTabs.DASHBOARD_SERVICE}
/>
);
case EntityType.PIPELINE_SERVICE:
return (
<ServiceSummary
entityDetails={entity as PipelineService}
type={ExplorePageTabs.PIPELINE_SERVICE}
/>
);
case EntityType.MLMODEL_SERVICE:
return (
<ServiceSummary
entityDetails={entity as MlmodelService}
type={ExplorePageTabs.ML_MODEL_SERVICE}
/>
);
case EntityType.STORAGE_SERVICE:
return (
<ServiceSummary
entityDetails={entity as StorageService}
type={ExplorePageTabs.STORAGE_SERVICE}
/>
);
case EntityType.SEARCH_SERVICE:
return (
<ServiceSummary
entityDetails={entity as SearchService}
type={ExplorePageTabs.SEARCH_INDEX_SERVICE}
/>
);
default:
return null;
}

View File

@ -72,7 +72,7 @@ function MlModelSummary({
<SummaryTagsDescription
entityDetail={entityDetails}
tags={tags ?? []}
tags={tags ?? entityDetails.tags ?? []}
/>
<Divider className="m-y-xs" />

View File

@ -68,7 +68,7 @@ function PipelineSummary({
<SummaryTagsDescription
entityDetail={entityDetails}
tags={tags ?? []}
tags={tags ?? entityDetails.tags ?? []}
/>
<Divider className="m-y-xs" />

View File

@ -0,0 +1,59 @@
/*
* Copyright 2023 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 { Col, Divider, Row } from 'antd';
import React, { useMemo } from 'react';
import SummaryTagsDescription from '../../../../components/common/SummaryTagsDescription/SummaryTagsDescription.component';
import SummaryPanelSkeleton from '../../../../components/Skeleton/SummaryPanelSkeleton/SummaryPanelSkeleton.component';
import {
DRAWER_NAVIGATION_OPTIONS,
getEntityOverview,
} from '../../../../utils/EntityUtils';
import CommonEntitySummaryInfo from '../CommonEntitySummaryInfo/CommonEntitySummaryInfo';
import { ServiceSummaryProps } from './ServiceSummary.interface';
const ServiceSummary = ({
type,
entityDetails,
componentType = DRAWER_NAVIGATION_OPTIONS.explore,
tags,
isLoading,
}: ServiceSummaryProps) => {
const entityInfo = useMemo(
() => getEntityOverview(type, entityDetails),
[entityDetails]
);
return (
<SummaryPanelSkeleton loading={Boolean(isLoading)}>
<>
<Row className="m-md" gutter={[0, 4]}>
<Col span={24}>
<CommonEntitySummaryInfo
componentType={componentType}
entityInfo={entityInfo}
/>
</Col>
</Row>
<Divider className="m-y-xs" />
<SummaryTagsDescription
entityDetail={entityDetails}
tags={tags ?? entityDetails.tags ?? []}
/>
</>
</SummaryPanelSkeleton>
);
};
export default ServiceSummary;

View File

@ -0,0 +1,25 @@
/*
* Copyright 2023 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 { EntityServiceUnion } from '../../../../components/Explore/explore.interface';
import { ExplorePageTabs } from '../../../../enums/Explore.enum';
import { TagLabel } from '../../../../generated/type/tagLabel';
import { DRAWER_NAVIGATION_OPTIONS } from '../../../../utils/EntityUtils';
export interface ServiceSummaryProps {
type: ExplorePageTabs;
entityDetails: EntityServiceUnion;
componentType?: DRAWER_NAVIGATION_OPTIONS;
tags?: TagLabel[];
isLoading?: boolean;
}

View File

@ -57,7 +57,7 @@ const StoredProcedureSummary = ({
<SummaryTagsDescription
entityDetail={entityDetails}
tags={tags ?? []}
tags={tags ?? entityDetails.tags ?? []}
/>
<Divider className="m-y-xs" />

View File

@ -234,7 +234,7 @@ function TableSummary({
<SummaryTagsDescription
entityDetail={entityDetails}
tags={tags ?? []}
tags={tags ?? entityDetails.tags ?? []}
/>
<Divider className="m-y-xs" />

View File

@ -158,7 +158,7 @@ function TopicSummary({
<SummaryTagsDescription
entityDetail={entityDetails}
tags={tags ?? []}
tags={tags ?? entityDetails.tags ?? []}
/>
<Divider className="m-y-xs" />

View File

@ -28,6 +28,13 @@ import { SearchIndex as SearchIndexEntity } from '../../generated/entity/data/se
import { StoredProcedure } from '../../generated/entity/data/storedProcedure';
import { Table } from '../../generated/entity/data/table';
import { Topic } from '../../generated/entity/data/topic';
import { DashboardService } from '../../generated/entity/services/dashboardService';
import { DatabaseService } from '../../generated/entity/services/databaseService';
import { MessagingService } from '../../generated/entity/services/messagingService';
import { MlmodelService } from '../../generated/entity/services/mlmodelService';
import { PipelineService } from '../../generated/entity/services/pipelineService';
import { SearchService } from '../../generated/entity/services/searchService';
import { StorageService } from '../../generated/entity/services/storageService';
import { Aggregations, SearchResponse } from '../../interface/search.interface';
import { QueryFilterInterface } from '../../pages/explore/ExplorePage.interface';
import { SearchDropdownOption } from '../SearchDropdown/SearchDropdown.interface';
@ -127,7 +134,14 @@ export type EntityUnion =
| Tag
| DashboardDataModel
| StoredProcedure
| SearchIndexEntity;
| SearchIndexEntity
| DatabaseService
| MessagingService
| DashboardService
| PipelineService
| MlmodelService
| StorageService
| SearchService;
export type EntityWithServices =
| Topic
@ -140,6 +154,15 @@ export type EntityWithServices =
| DatabaseSchema
| SearchIndexEntity;
export type EntityServiceUnion =
| DatabaseService
| MessagingService
| DashboardService
| PipelineService
| MlmodelService
| StorageService
| SearchService;
export interface EntityDetailsObjectInterface {
details: SearchedDataProps['data'][number]['_source'];
}

View File

@ -150,6 +150,16 @@ const AssetsTabs = forwardRef(
containerResponse,
storedProcedureResponse,
dashboardDataModelResponse,
databaseResponse,
databaseSchemaResponse,
searchResponse,
databaseServiceResponse,
messagingServiceResponse,
dashboardServiceResponse,
mlmodelServiceResponse,
pipelineServiceResponse,
storageServiceResponse,
searchServiceResponse,
glossaryResponse,
]) => {
const counts = {
@ -163,6 +173,25 @@ const AssetsTabs = forwardRef(
storedProcedureResponse.data.hits.total.value,
[EntityType.DASHBOARD_DATA_MODEL]:
dashboardDataModelResponse.data.hits.total.value,
[EntityType.DATABASE]: databaseResponse.data.hits.total.value,
[EntityType.DATABASE_SCHEMA]:
databaseSchemaResponse.data.hits.total.value,
[EntityType.SEARCH_INDEX]: searchResponse.data.hits.total.value,
[EntityType.DATABASE_SERVICE]:
databaseServiceResponse.data.hits.total.value,
[EntityType.MESSAGING_SERVICE]:
messagingServiceResponse.data.hits.total.value,
[EntityType.DASHBOARD_SERVICE]:
dashboardServiceResponse.data.hits.total.value,
[EntityType.MLMODEL_SERVICE]:
mlmodelServiceResponse.data.hits.total.value,
[EntityType.PIPELINE_SERVICE]:
pipelineServiceResponse.data.hits.total.value,
[EntityType.STORAGE_SERVICE]:
storageServiceResponse.data.hits.total.value,
[EntityType.SEARCH_SERVICE]:
searchServiceResponse.data.hits.total.value,
[EntityType.GLOSSARY_TERM]:
type !== AssetsOfEntity.GLOSSARY
? glossaryResponse.data.hits.total.value

View File

@ -93,7 +93,7 @@ const Services = ({ serviceName }: ServicesProps) => {
case ServiceCategory.DATABASE_SERVICES:
return SearchIndex.DATABASE_SERVICE;
case ServiceCategory.DASHBOARD_SERVICES:
return SearchIndex.DASHBOARD_SERCVICE;
return SearchIndex.DASHBOARD_SERVICE;
case ServiceCategory.MESSAGING_SERVICES:
return SearchIndex.MESSAGING_SERVICE;
case ServiceCategory.PIPELINE_SERVICES:

View File

@ -65,6 +65,58 @@ export const AssetsFilterOptions: Array<{
key: EntityType.DASHBOARD_DATA_MODEL,
value: SearchIndex.DASHBOARD_DATA_MODEL,
},
{
label: i18n.t('label.database'),
key: EntityType.DATABASE,
value: SearchIndex.DATABASE,
},
{
label: i18n.t('label.database-schema'),
key: EntityType.DATABASE_SCHEMA,
value: SearchIndex.DATABASE_SCHEMA,
},
{
label: i18n.t('label.search-index'),
key: EntityType.SEARCH_INDEX,
value: SearchIndex.SEARCH_INDEX,
},
{
label: i18n.t('label.database-service'),
key: EntityType.DATABASE_SERVICE,
value: SearchIndex.DATABASE_SERVICE,
},
{
label: i18n.t('label.messaging-service'),
key: EntityType.MESSAGING_SERVICE,
value: SearchIndex.MESSAGING_SERVICE,
},
{
label: i18n.t('label.dashboard-service'),
key: EntityType.DASHBOARD_SERVICE,
value: SearchIndex.DASHBOARD_SERVICE,
},
{
label: i18n.t('label.pipeline-service'),
key: EntityType.PIPELINE_SERVICE,
value: SearchIndex.PIPELINE_SERVICE,
},
{
label: i18n.t('label.ml-model-service'),
key: EntityType.MLMODEL_SERVICE,
value: SearchIndex.ML_MODEL_SERVICE,
},
{
label: i18n.t('label.storage-service'),
key: EntityType.STORAGE_SERVICE,
value: SearchIndex.STORAGE_SERVICE,
},
{
label: i18n.t('label.search-index-service'),
key: EntityType.SEARCH_SERVICE,
value: SearchIndex.SEARCH_SERVICE,
},
];
export const ASSETS_INDEXES = [
@ -76,4 +128,14 @@ export const ASSETS_INDEXES = [
SearchIndex.CONTAINER,
SearchIndex.STORED_PROCEDURE,
SearchIndex.DASHBOARD_DATA_MODEL,
SearchIndex.DATABASE,
SearchIndex.DATABASE_SCHEMA,
SearchIndex.SEARCH_INDEX,
SearchIndex.DATABASE_SERVICE,
SearchIndex.MESSAGING_SERVICE,
SearchIndex.DASHBOARD_SERVICE,
SearchIndex.ML_MODEL_SERVICE,
SearchIndex.PIPELINE_SERVICE,
SearchIndex.STORAGE_SERVICE,
SearchIndex.SEARCH_SERVICE,
];

View File

@ -15,7 +15,7 @@ import { SearchIndex } from '../enums/search.enum';
export const myDataSearchIndex =
// eslint-disable-next-line max-len
`${SearchIndex.TABLE},${SearchIndex.TOPIC},${SearchIndex.DASHBOARD},${SearchIndex.PIPELINE},${SearchIndex.MLMODEL},${SearchIndex.STORED_PROCEDURE},${SearchIndex.DASHBOARD_DATA_MODEL}` as SearchIndex;
`${SearchIndex.TABLE},${SearchIndex.TOPIC},${SearchIndex.DASHBOARD},${SearchIndex.PIPELINE},${SearchIndex.MLMODEL},${SearchIndex.STORED_PROCEDURE},${SearchIndex.DASHBOARD_DATA_MODEL},${SearchIndex.DATABASE},${SearchIndex.DATABASE_SCHEMA},${SearchIndex.DATABASE},${SearchIndex.DATABASE_SERVICE},${SearchIndex.MESSAGING_SERVICE},${SearchIndex.PIPELINE_SERVICE},${SearchIndex.SEARCH_SERVICE},${SearchIndex.DASHBOARD_SERVICE},${SearchIndex.ML_MODEL_SERVICE},${SearchIndex.STORAGE_SERVICE},${SearchIndex.SEARCH_INDEX}` as SearchIndex;
export const observerOptions = {
root: null,

View File

@ -28,4 +28,13 @@ export enum ExplorePageTabs {
DASHBOARD_DATA_MODEL = 'dashboardDataModel',
STORED_PROCEDURE = 'storedProcedure',
SEARCH_INDEX = 'searchIndexes',
DATABASE = 'database',
DATABASE_SCHEMA = 'databaseSchema',
DATABASE_SERVICE = 'databaseService',
MESSAGING_SERVICE = 'messagingService',
DASHBOARD_SERVICE = 'dashboardService',
PIPELINE_SERVICE = 'pipelineService',
ML_MODEL_SERVICE = 'mlmodelService',
STORAGE_SERVICE = 'storageService',
SEARCH_INDEX_SERVICE = 'searchIndexService',
}

View File

@ -30,7 +30,7 @@ export enum SearchIndex {
MESSAGING_SERVICE = 'messaging_service_search_index',
PIPELINE_SERVICE = 'pipeline_service_search_index',
SEARCH_SERVICE = 'search_service_search_index',
DASHBOARD_SERCVICE = 'dashboard_service_search_index',
DASHBOARD_SERVICE = 'dashboard_service_search_index',
ML_MODEL_SERVICE = 'mlmodel_service_search_index',
STORAGE_SERVICE = 'storage_service_search_index',
DOMAIN = 'domain_search_index',

View File

@ -185,7 +185,7 @@ export type SearchIndexSearchSourceMapping = {
[SearchIndex.DATABASE_SCHEMA]: DataBaseSchemaSearchSource;
[SearchIndex.DATABASE]: DatabaseSearchSource;
[SearchIndex.DATABASE_SERVICE]: DatabaseServiceSearchSource;
[SearchIndex.DASHBOARD_SERCVICE]: DashboardServiceSearchSource;
[SearchIndex.DASHBOARD_SERVICE]: DashboardServiceSearchSource;
[SearchIndex.PIPELINE_SERVICE]: PipelineServiceSearchSource;
[SearchIndex.ML_MODEL_SERVICE]: MlModelServiceSearchSource;
[SearchIndex.MESSAGING_SERVICE]: MessagingServiceSearchSource;

View File

@ -205,6 +205,7 @@
"dashboard-lowercase-plural": "Dashboards",
"dashboard-name": "Dashboard-Name",
"dashboard-plural": "Dashboards",
"dashboard-service": "Dashboard Service",
"data-aggregate": "Datenaggregat",
"data-aggregation": "Datenaggregation",
"data-asset": "Daten-Asset",
@ -249,6 +250,7 @@
"database-name": "Datenbankname",
"database-plural": "Datenbanken",
"database-schema": "Datenbankschema",
"database-service": "Database Service",
"database-service-name": "Datenbankdienstname",
"date": "Datum",
"date-and-time": "Datum & Uhrzeit",
@ -566,6 +568,7 @@
"messaging": "Nachrichtenübermittlung",
"messaging-lowercase": "nachrichtenübermittlung",
"messaging-plural": "Nachrichtenübermittlungen",
"messaging-service": "Messaging Service",
"metadata": "Metadaten",
"metadata-ingestion": "Metadateninjektion",
"metadata-lowercase": "metadaten",
@ -584,6 +587,7 @@
"ml-model-lowercase": "Künstliches Intelligenzmodell",
"ml-model-lowercase-plural": "KI-Modelle",
"ml-model-plural": "KI-Modelle",
"ml-model-service": "Ml Model Service",
"mode": "Modus",
"model": "Modell",
"model-name": "Modellname",
@ -690,6 +694,7 @@
"pipeline-lowercase-plural": "pipelines",
"pipeline-name": "Pipeline-Name",
"pipeline-plural": "Pipelines",
"pipeline-service": "Pipeline Service",
"pipeline-state": "Pipeline-Status",
"please-enter-value": "Bitte einen Wert für {{name}} eingeben",
"please-password-type-first": "Bitte zuerst das Passwort eingeben",
@ -827,6 +832,7 @@
"search-index": "Suchindex",
"search-index-ingestion": "Suchindex für die Datenaufnahme",
"search-index-plural": "Suchindizes",
"search-index-service": "Search Index Service",
"search-index-setting-plural": "Suchindexeinstellungen",
"second-plural": "Sekunden",
"secret-key": "Geheimschlüssel",

View File

@ -205,6 +205,7 @@
"dashboard-lowercase-plural": "dashboards",
"dashboard-name": "Dashboard Name",
"dashboard-plural": "Dashboards",
"dashboard-service": "Dashboard Service",
"data-aggregate": "Data Aggregate",
"data-aggregation": "Data Aggregation",
"data-asset": "Data Asset",
@ -249,6 +250,7 @@
"database-name": "Database Name",
"database-plural": "Databases",
"database-schema": "Database Schema",
"database-service": "Database Service",
"database-service-name": "Database Service Name",
"date": "Date",
"date-and-time": "Date & Time",
@ -566,6 +568,7 @@
"messaging": "Messaging",
"messaging-lowercase": "messaging",
"messaging-plural": "Messagings",
"messaging-service": "Messaging Service",
"metadata": "Metadata",
"metadata-ingestion": "Metadata Ingestion",
"metadata-lowercase": "metadata",
@ -584,6 +587,7 @@
"ml-model-lowercase": "ML model",
"ml-model-lowercase-plural": "ML models",
"ml-model-plural": "ML Models",
"ml-model-service": "Ml Model Service",
"mode": "Mode",
"model": "Model",
"model-name": "Model Name",
@ -690,6 +694,7 @@
"pipeline-lowercase-plural": "pipelines",
"pipeline-name": "Pipeline Name",
"pipeline-plural": "Pipelines",
"pipeline-service": "Pipeline Service",
"pipeline-state": "Pipeline State",
"please-enter-value": "Please enter {{name}} value",
"please-password-type-first": "Please type password first",
@ -827,6 +832,7 @@
"search-index": "Search Index",
"search-index-ingestion": "Search Index Ingestion",
"search-index-plural": "Search Indexes",
"search-index-service": "Search Index Service",
"search-index-setting-plural": "Search Index Settings",
"second-plural": "Seconds",
"secret-key": "Secret Key",

View File

@ -205,6 +205,7 @@
"dashboard-lowercase-plural": "dashboards",
"dashboard-name": "Nombre del dashboard",
"dashboard-plural": "Dashboards",
"dashboard-service": "Dashboard Service",
"data-aggregate": "Data Aggregate",
"data-aggregation": "Data Aggregation",
"data-asset": "Activo de datos",
@ -249,6 +250,7 @@
"database-name": "Nombre de la base de datos",
"database-plural": "Bases de datos",
"database-schema": "Esquema de la base de datos",
"database-service": "Database Service",
"database-service-name": "Nombre del servicio de la base de datos",
"date": "Fecha",
"date-and-time": "Fecha y hora",
@ -566,6 +568,7 @@
"messaging": "Mensajería",
"messaging-lowercase": "mensajería",
"messaging-plural": "Messagings",
"messaging-service": "Messaging Service",
"metadata": "Metadatos",
"metadata-ingestion": "Ingesta de Metadatos",
"metadata-lowercase": "metadatos",
@ -584,6 +587,7 @@
"ml-model-lowercase": "modelo de ML",
"ml-model-lowercase-plural": "modelos de ML",
"ml-model-plural": "Modelos de ML",
"ml-model-service": "Ml Model Service",
"mode": "Moda",
"model": "Model",
"model-name": "Nombre del Modelo",
@ -690,6 +694,7 @@
"pipeline-lowercase-plural": "pipelines",
"pipeline-name": "Nombre de la pipeline",
"pipeline-plural": "Pipelines",
"pipeline-service": "Pipeline Service",
"pipeline-state": "Estado de la pipeline",
"please-enter-value": "Ingrese el valor de {{name}}",
"please-password-type-first": "Ingrese primero la contraseña",
@ -827,6 +832,7 @@
"search-index": "Search Index",
"search-index-ingestion": "Search Index Ingestion",
"search-index-plural": "Search Indexes",
"search-index-service": "Search Index Service",
"search-index-setting-plural": "Search Index Settings",
"second-plural": "Segundos",
"secret-key": "Clave Secreta",

View File

@ -205,6 +205,7 @@
"dashboard-lowercase-plural": "tableaux de bord",
"dashboard-name": "Nom du Tableau de Bord",
"dashboard-plural": "Tableaux de Bord",
"dashboard-service": "Dashboard Service",
"data-aggregate": "Agrégat de Données",
"data-aggregation": "Agrégation de Données",
"data-asset": "Actif de Données",
@ -249,6 +250,7 @@
"database-name": "Nom de la Base de Données",
"database-plural": "Bases de Données",
"database-schema": "Schéma de la Base de Données",
"database-service": "Database Service",
"database-service-name": "Nom du Service de la Base de Données",
"date": "Date",
"date-and-time": "Date & Heure",
@ -566,6 +568,7 @@
"messaging": "Messagerie",
"messaging-lowercase": "messagerie",
"messaging-plural": "Messageries",
"messaging-service": "Messaging Service",
"metadata": "Métadonnée",
"metadata-ingestion": "Ingestion des Métadonnées",
"metadata-lowercase": "métadonnées",
@ -584,6 +587,7 @@
"ml-model-lowercase": "Modèle d'Apprentissage Machine",
"ml-model-lowercase-plural": "Modèles d'Apprentissage Machine",
"ml-model-plural": "Modèles d'IA",
"ml-model-service": "Ml Model Service",
"mode": "Mode",
"model": "Modèle",
"model-name": "Nom du Modèle",
@ -690,6 +694,7 @@
"pipeline-lowercase-plural": "pipelines",
"pipeline-name": "Nom du Pipeline",
"pipeline-plural": "Pipelines",
"pipeline-service": "Pipeline Service",
"pipeline-state": "État du Pipeline",
"please-enter-value": "Merci d'entrer une valeur pour {{name}} ",
"please-password-type-first": "Merci d'entrer le mot de passe d'abord",
@ -827,6 +832,7 @@
"search-index": "Index de Recherche",
"search-index-ingestion": "Index de Recherche pour l'Ingestion",
"search-index-plural": "Indexes de Recherche",
"search-index-service": "Search Index Service",
"search-index-setting-plural": "Paramètres des Index de Recherche",
"second-plural": "Secondes",
"secret-key": "Clé Secrète",

View File

@ -205,6 +205,7 @@
"dashboard-lowercase-plural": "dashboards",
"dashboard-name": "ダッシュボード名",
"dashboard-plural": "ダッシュボード",
"dashboard-service": "Dashboard Service",
"data-aggregate": "Data Aggregate",
"data-aggregation": "Data Aggregation",
"data-asset": "データアセット",
@ -249,6 +250,7 @@
"database-name": "データベース名",
"database-plural": "データベース",
"database-schema": "データベースのスキーマ",
"database-service": "Database Service",
"database-service-name": "データベースサービス名",
"date": "日付",
"date-and-time": "日付と時間",
@ -566,6 +568,7 @@
"messaging": "メッセージング",
"messaging-lowercase": "メッセージング",
"messaging-plural": "Messagings",
"messaging-service": "Messaging Service",
"metadata": "メタデータ",
"metadata-ingestion": "メタデータのインジェスチョン",
"metadata-lowercase": "メタデータ",
@ -584,6 +587,7 @@
"ml-model-lowercase": "ML model",
"ml-model-lowercase-plural": "ML models",
"ml-model-plural": "MLモデル",
"ml-model-service": "Ml Model Service",
"mode": "モード",
"model": "Model",
"model-name": "モデル名",
@ -690,6 +694,7 @@
"pipeline-lowercase-plural": "pipelines",
"pipeline-name": "パイプライン名",
"pipeline-plural": "パイプライン",
"pipeline-service": "Pipeline Service",
"pipeline-state": "パイプラインの状態",
"please-enter-value": "{{name}}の値を入力してください",
"please-password-type-first": "パスワードを入力してください",
@ -827,6 +832,7 @@
"search-index": "Search Index",
"search-index-ingestion": "Search Index Ingestion",
"search-index-plural": "Search Indexes",
"search-index-service": "Search Index Service",
"search-index-setting-plural": "Search Index Settings",
"second-plural": "秒",
"secret-key": "Secret Key",

View File

@ -205,6 +205,7 @@
"dashboard-lowercase-plural": "dashboards",
"dashboard-name": "Nome do dashboard",
"dashboard-plural": "Dashboards",
"dashboard-service": "Dashboard Service",
"data-aggregate": "Data Aggregate",
"data-aggregation": "Data Aggregation",
"data-asset": "Recurso de dados",
@ -249,6 +250,7 @@
"database-name": "Nome do banco de dados",
"database-plural": "Bancos de dados",
"database-schema": "Schema do banco de dados",
"database-service": "Database Service",
"database-service-name": "Nome do serviço de banco de dados",
"date": "data",
"date-and-time": "data e hora",
@ -566,6 +568,7 @@
"messaging": "Mensageria",
"messaging-lowercase": "mensageria",
"messaging-plural": "Messagings",
"messaging-service": "Messaging Service",
"metadata": "Metadados",
"metadata-ingestion": "Ingestão de metadados",
"metadata-lowercase": "Metadados",
@ -584,6 +587,7 @@
"ml-model-lowercase": "ML model",
"ml-model-lowercase-plural": "ML models",
"ml-model-plural": "Modelos de ML",
"ml-model-service": "Ml Model Service",
"mode": "Modo",
"model": "Model",
"model-name": "Nome do modelo",
@ -690,6 +694,7 @@
"pipeline-lowercase-plural": "pipelines",
"pipeline-name": "Nome da pipeline",
"pipeline-plural": "Pipelines",
"pipeline-service": "Pipeline Service",
"pipeline-state": "Estado da pipeline",
"please-enter-value": "Por favor digite o valor de {{name}}",
"please-password-type-first": "Por favor, digite a senha primeiro",
@ -827,6 +832,7 @@
"search-index": "Search Index",
"search-index-ingestion": "Search Index Ingestion",
"search-index-plural": "Search Indexes",
"search-index-service": "Search Index Service",
"search-index-setting-plural": "Search Index Settings",
"second-plural": "Segundos",
"secret-key": "Chave Secreta",

View File

@ -205,6 +205,7 @@
"dashboard-lowercase-plural": "дашборды",
"dashboard-name": "Наименование дашборда",
"dashboard-plural": "Дашборды",
"dashboard-service": "Dashboard Service",
"data-aggregate": "Сводные данные",
"data-aggregation": "Агрегация данных",
"data-asset": "Объект данных",
@ -249,6 +250,7 @@
"database-name": "Наименование базы данных",
"database-plural": "Базы данных",
"database-schema": "Схема базы данных",
"database-service": "Database Service",
"database-service-name": "Наименование сервиса базы данных",
"date": "Дата",
"date-and-time": "Дата & Время",
@ -566,6 +568,7 @@
"messaging": "Обмен сообщениями",
"messaging-lowercase": "обмен сообщениями",
"messaging-plural": "Обмен сообщениями",
"messaging-service": "Messaging Service",
"metadata": "Метаданные",
"metadata-ingestion": "Получение метаданных",
"metadata-lowercase": "метаданные",
@ -584,6 +587,7 @@
"ml-model-lowercase": "ML модель",
"ml-model-lowercase-plural": "ML модели",
"ml-model-plural": "ML Модели",
"ml-model-service": "Ml Model Service",
"mode": "Режим",
"model": "Модель",
"model-name": "Наименование модели",
@ -690,6 +694,7 @@
"pipeline-lowercase-plural": "пайплайны",
"pipeline-name": "Наименование пайплайна",
"pipeline-plural": "Пайплайны",
"pipeline-service": "Pipeline Service",
"pipeline-state": "Состояние",
"please-enter-value": "Пожалуйста введите значение {{name}} ",
"please-password-type-first": "Пожалуйста, сначала введите пароль",
@ -827,6 +832,7 @@
"search-index": "Search Index",
"search-index-ingestion": "Получение поискового индекса",
"search-index-plural": "Search Indexes",
"search-index-service": "Search Index Service",
"search-index-setting-plural": "Search Index Settings",
"second-plural": "Секунды",
"secret-key": "Секретный ключ",

View File

@ -205,6 +205,7 @@
"dashboard-lowercase-plural": "仪表板",
"dashboard-name": "仪表板名称",
"dashboard-plural": "仪表板",
"dashboard-service": "Dashboard Service",
"data-aggregate": "数据聚合",
"data-aggregation": "数据聚合",
"data-asset": "数据资产",
@ -249,6 +250,7 @@
"database-name": "数据库名称",
"database-plural": "数据库",
"database-schema": "数据库结构",
"database-service": "Database Service",
"database-service-name": "数据库服务名称",
"date": "日期",
"date-and-time": "日期和时间",
@ -566,6 +568,7 @@
"messaging": "消息队列",
"messaging-lowercase": "消息队列",
"messaging-plural": "消息队列",
"messaging-service": "Messaging Service",
"metadata": "元数据",
"metadata-ingestion": "元数据提取",
"metadata-lowercase": "元数据",
@ -584,6 +587,7 @@
"ml-model-lowercase": "ML模型",
"ml-model-lowercase-plural": "ML模型",
"ml-model-plural": "ML模型",
"ml-model-service": "Ml Model Service",
"mode": "模式",
"model": "模型",
"model-name": "模型名称",
@ -690,6 +694,7 @@
"pipeline-lowercase-plural": "工作流",
"pipeline-name": "工作流名称",
"pipeline-plural": "工作流",
"pipeline-service": "Pipeline Service",
"pipeline-state": "工作流状态",
"please-enter-value": "请输入{{name}}值",
"please-password-type-first": "请先输入密码",
@ -827,6 +832,7 @@
"search-index": "Search Index",
"search-index-ingestion": "搜索索引提取",
"search-index-plural": "Search Indexes",
"search-index-service": "Search Index Service",
"search-index-setting-plural": "Search Index Settings",
"second-plural": "秒",
"secret-key": "秘钥",

View File

@ -95,6 +95,7 @@ export const getAPIfromSource = (
case EntityType.MLMODEL_SERVICE:
case EntityType.STORAGE_SERVICE:
case EntityType.DATABASE_SERVICE:
case EntityType.SEARCH_SERVICE:
return (id, queryFields) => {
const serviceCat = getServiceCategoryFromEntityType(source);
@ -140,6 +141,7 @@ export const getEntityAPIfromSource = (
case EntityType.MLMODEL_SERVICE:
case EntityType.STORAGE_SERVICE:
case EntityType.DATABASE_SERVICE:
case EntityType.SEARCH_SERVICE:
return (id, queryFields) => {
const serviceCat = getServiceCategoryFromEntityType(source);
@ -158,6 +160,14 @@ export const getAssetsSearchIndex = (source: AssetsOfEntity) => {
[EntityType.CONTAINER]: SearchIndex.CONTAINER,
[EntityType.STORED_PROCEDURE]: SearchIndex.STORED_PROCEDURE,
[EntityType.DASHBOARD_DATA_MODEL]: SearchIndex.DASHBOARD_DATA_MODEL,
[EntityType.SEARCH_INDEX]: SearchIndex.SEARCH_INDEX,
[EntityType.DATABASE_SERVICE]: SearchIndex.DATABASE_SERVICE,
[EntityType.MESSAGING_SERVICE]: SearchIndex.MESSAGING_SERVICE,
[EntityType.DASHBOARD_SERVICE]: SearchIndex.DASHBOARD_SERVICE,
[EntityType.PIPELINE_SERVICE]: SearchIndex.PIPELINE_SERVICE,
[EntityType.MLMODEL_SERVICE]: SearchIndex.ML_MODEL_SERVICE,
[EntityType.STORAGE_SERVICE]: SearchIndex.STORAGE_SERVICE,
[EntityType.SEARCH_SERVICE]: SearchIndex.SEARCH_SERVICE,
};
if (

View File

@ -20,7 +20,6 @@ import {
NO_DATA_PLACEHOLDER,
} from '../constants/constants';
import { EntityField } from '../constants/Feeds.constants';
import { SearchIndex } from '../enums/search.enum';
import { DataProduct } from '../generated/entity/domains/dataProduct';
import { Domain } from '../generated/entity/domains/domain';
import { ChangeDescription, EntityReference } from '../generated/entity/type';
@ -110,6 +109,3 @@ export const getUserNames = (
return getOwner(hasPermission, getEntityName(entity.owner), entity.owner);
};
export const DomainAssetsSearchIndex =
`${SearchIndex.DASHBOARD},${SearchIndex.TABLE},${SearchIndex.TOPIC},${SearchIndex.PIPELINE},${SearchIndex.MLMODEL},${SearchIndex.GLOSSARY},${SearchIndex.CONTAINER}` as SearchIndex;

View File

@ -33,6 +33,7 @@ import {
LineagePos,
} from '../components/Entity/EntityLineage/EntityLineage.interface';
import {
EntityServiceUnion,
EntityUnion,
EntityWithServices,
} from '../components/Explore/explore.interface';
@ -96,6 +97,7 @@ import { DataProduct } from '../generated/entity/domains/dataProduct';
import { Edge, EntityLineage } from '../generated/type/entityLineage';
import { EntityReference } from '../generated/type/entityUsage';
import { TagLabel } from '../generated/type/tagLabel';
import { UsageDetails } from '../generated/type/usageDetails';
import { Votes } from '../generated/type/votes';
import { EntityFieldThreadCount } from '../interface/feed.interface';
import {
@ -188,6 +190,11 @@ export const getOwnerNameWithProfilePic = (
</div>
) : null;
const getUsageData = (usageSummary: UsageDetails | undefined) =>
!isNil(usageSummary?.weeklyStats?.percentileRank)
? getUsagePercentile(usageSummary?.weeklyStats?.percentileRank ?? 0)
: NO_DATA;
const getTableFieldsFromTableDetails = (tableDetails: Table) => {
const {
fullyQualifiedName,
@ -206,10 +213,6 @@ const getTableFieldsFromTableDetails = (tableDetails: Table) => {
const tier = getTierFromTableTags(tags ?? []);
const usage = !isNil(usageSummary?.weeklyStats?.percentileRank)
? getUsagePercentile(usageSummary?.weeklyStats?.percentileRank ?? 0)
: NO_DATA;
return {
fullyQualifiedName,
owner,
@ -217,7 +220,7 @@ const getTableFieldsFromTableDetails = (tableDetails: Table) => {
database,
schema,
tier,
usage,
usage: getUsageData(usageSummary),
profile,
columns,
tableType,
@ -742,6 +745,140 @@ const getStoredProcedureOverview = (
return overview;
};
const getDatabaseOverview = (databaseDetails: Database) => {
const { owner, service, tags, usageSummary } = databaseDetails;
const tier = getTierFromTableTags(tags ?? []);
const overview = [
{
name: i18next.t('label.owner'),
value:
getOwnerNameWithProfilePic(owner) ??
i18next.t('label.no-entity', {
entity: i18next.t('label.owner'),
}),
url: getOwnerValue(owner as EntityReference),
isLink: !isEmpty(owner?.name),
visible: [DRAWER_NAVIGATION_OPTIONS.explore],
},
{
name: i18next.t('label.tier'),
value: tier ? tier.split(FQN_SEPARATOR_CHAR)[1] : NO_DATA,
isLink: false,
visible: [DRAWER_NAVIGATION_OPTIONS.explore],
},
{
name: i18next.t('label.service'),
value: service.fullyQualifiedName || NO_DATA,
url: getServiceDetailsPath(
service.fullyQualifiedName ?? '',
ServiceCategory.DATABASE_SERVICES
),
isLink: true,
visible: [DRAWER_NAVIGATION_OPTIONS.explore],
},
{
name: i18next.t('label.usage'),
value: getUsageData(usageSummary),
isLink: false,
visible: [DRAWER_NAVIGATION_OPTIONS.explore],
},
];
return overview;
};
const getDatabaseSchemaOverview = (databaseSchemaDetails: DatabaseSchema) => {
const { owner, service, tags, usageSummary, database } =
databaseSchemaDetails;
const tier = getTierFromTableTags(tags ?? []);
const overview = [
{
name: i18next.t('label.owner'),
value:
getOwnerNameWithProfilePic(owner) ??
i18next.t('label.no-entity', {
entity: i18next.t('label.owner'),
}),
url: getOwnerValue(owner as EntityReference),
isLink: !isEmpty(owner?.name),
visible: [DRAWER_NAVIGATION_OPTIONS.explore],
},
{
name: i18next.t('label.tier'),
value: tier ? tier.split(FQN_SEPARATOR_CHAR)[1] : NO_DATA,
isLink: false,
visible: [DRAWER_NAVIGATION_OPTIONS.explore],
},
{
name: i18next.t('label.service'),
value: service.fullyQualifiedName ?? NO_DATA,
url: getServiceDetailsPath(
service.fullyQualifiedName ?? '',
ServiceCategory.DATABASE_SERVICES
),
isLink: true,
visible: [DRAWER_NAVIGATION_OPTIONS.explore],
},
{
name: i18next.t('label.database'),
value: database.fullyQualifiedName ?? NO_DATA,
url: getDatabaseDetailsPath(database.fullyQualifiedName ?? ''),
isLink: true,
visible: [DRAWER_NAVIGATION_OPTIONS.explore],
},
{
name: i18next.t('label.usage'),
value: getUsageData(usageSummary),
isLink: false,
visible: [DRAWER_NAVIGATION_OPTIONS.explore],
},
];
return overview;
};
const getEntityServiceOverview = (serviceDetails: EntityServiceUnion) => {
const { owner, tags, serviceType } = serviceDetails;
const tier = getTierFromTableTags(tags ?? []);
const overview = [
{
name: i18next.t('label.owner'),
value:
getOwnerNameWithProfilePic(owner) ??
i18next.t('label.no-entity', {
entity: i18next.t('label.owner'),
}),
url: getOwnerValue(owner as EntityReference),
isLink: !isEmpty(owner?.name),
visible: [DRAWER_NAVIGATION_OPTIONS.explore],
},
{
name: i18next.t('label.tier'),
value: tier ? tier.split(FQN_SEPARATOR_CHAR)[1] : NO_DATA,
isLink: false,
visible: [DRAWER_NAVIGATION_OPTIONS.explore],
},
{
name: i18next.t('label.service-type'),
value: serviceType,
isLink: false,
visible: [DRAWER_NAVIGATION_OPTIONS.explore],
},
];
return overview;
};
export const getEntityOverview = (
type: string,
entityDetail: EntityUnion
@ -778,6 +915,23 @@ export const getEntityOverview = (
return getStoredProcedureOverview(entityDetail as StoredProcedure);
}
case ExplorePageTabs.DATABASE: {
return getDatabaseOverview(entityDetail as Database);
}
case ExplorePageTabs.DATABASE_SCHEMA: {
return getDatabaseSchemaOverview(entityDetail as DatabaseSchema);
}
case ExplorePageTabs.DATABASE_SERVICE:
case ExplorePageTabs.MESSAGING_SERVICE:
case ExplorePageTabs.DASHBOARD_SERVICE:
case ExplorePageTabs.ML_MODEL_SERVICE:
case ExplorePageTabs.PIPELINE_SERVICE:
case ExplorePageTabs.SEARCH_INDEX_SERVICE: {
return getEntityServiceOverview(entityDetail as EntityServiceUnion);
}
default:
return [];
}
@ -1160,6 +1314,8 @@ export const getEntityLinkFromType = (
return getContainerDetailPath(fullyQualifiedName);
case EntityType.DATABASE:
return getDatabaseDetailsPath(fullyQualifiedName);
case EntityType.DATABASE_SCHEMA:
return getDatabaseSchemaDetailsPath(fullyQualifiedName);
case EntityType.DATA_PRODUCT:
return getDataProductsDetailsPath(getEncodedFqn(fullyQualifiedName));
case EntityType.DASHBOARD_DATA_MODEL: