fix(ui): supported announcement in pending entities (#13414)

* supported announcement in pending entities

* added announcement support in database, database schema and entity services
This commit is contained in:
Ashish Gupta 2023-10-04 17:05:14 +05:30 committed by GitHub
parent 5a3d759b48
commit eb89d789bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 28 additions and 3 deletions

View File

@ -114,6 +114,7 @@ const FeedCardHeader: FC<FeedHeaderProp> = ({
{t('message.made-announcement-for-entity', { entity: entityType })}{' '}
<EntityPopOverCard entityFQN={entityFQN} entityType={entityType}>
<Link
className="break-all"
data-testid="entitylink"
to={prepareFeedLink(entityType, entityFQN)}>
{entityDisplayName(entityType, entityFQN)}

View File

@ -254,9 +254,11 @@ export const DataAssetsHeader = ({
};
useEffect(() => {
if (dataAsset.fullyQualifiedName && !isTourPage && !excludeEntityService) {
if (dataAsset.fullyQualifiedName && !isTourPage) {
fetchActiveAnnouncement();
fetchTaskCount();
if (!excludeEntityService) {
fetchTaskCount();
}
}
if (entityType === EntityType.CONTAINER) {
const asset = dataAsset as Container;

View File

@ -60,10 +60,11 @@ const AnnouncementDrawer: FC<Props> = ({
const title = (
<Space
align="start"
className="justify-between"
data-testid="title"
style={{ width: '100%' }}>
<Typography.Text className="font-medium">
<Typography.Text className="font-medium break-all">
{t('label.announcement-on-entity', { entity: entityName })}
</Typography.Text>
<CloseOutlined onClick={onClose} />

View File

@ -19,7 +19,20 @@ export const ANNOUNCEMENT_ENTITIES = [
EntityType.TOPIC,
EntityType.PIPELINE,
EntityType.MLMODEL,
EntityType.CONTAINER,
EntityType.DASHBOARD_DATA_MODEL,
EntityType.STORED_PROCEDURE,
EntityType.SEARCH_INDEX,
EntityType.DATABASE,
EntityType.DATABASE_SCHEMA,
EntityType.DATABASE_SERVICE,
EntityType.MESSAGING_SERVICE,
EntityType.DASHBOARD_SERVICE,
EntityType.PIPELINE_SERVICE,
EntityType.MLMODEL_SERVICE,
EntityType.STORAGE_SERVICE,
EntityType.METADATA_SERVICE,
EntityType.SEARCH_SERVICE,
];
export const isActiveAnnouncement = (startTime: number, endTime: number) => {

View File

@ -570,6 +570,10 @@ export const entityDisplayName = (entityType: string, entityFQN: string) => {
EntityType.DASHBOARD_SERVICE,
EntityType.MESSAGING_SERVICE,
EntityType.PIPELINE_SERVICE,
EntityType.MLMODEL_SERVICE,
EntityType.METADATA_SERVICE,
EntityType.STORAGE_SERVICE,
EntityType.SEARCH_SERVICE,
EntityType.TYPE,
EntityType.MLMODEL,
].includes(entityType as EntityType)

View File

@ -242,6 +242,10 @@ export const getEntityLink = (
case EntityType.DASHBOARD_SERVICE:
case EntityType.MESSAGING_SERVICE:
case EntityType.PIPELINE_SERVICE:
case EntityType.MLMODEL_SERVICE:
case EntityType.METADATA_SERVICE:
case EntityType.STORAGE_SERVICE:
case EntityType.SEARCH_SERVICE:
return getServiceDetailsPath(fullyQualifiedName, `${indexType}s`);
case EntityType.WEBHOOK: