mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-11-12 00:41:32 +00:00
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:
parent
5a3d759b48
commit
eb89d789bf
@ -114,6 +114,7 @@ const FeedCardHeader: FC<FeedHeaderProp> = ({
|
|||||||
{t('message.made-announcement-for-entity', { entity: entityType })}{' '}
|
{t('message.made-announcement-for-entity', { entity: entityType })}{' '}
|
||||||
<EntityPopOverCard entityFQN={entityFQN} entityType={entityType}>
|
<EntityPopOverCard entityFQN={entityFQN} entityType={entityType}>
|
||||||
<Link
|
<Link
|
||||||
|
className="break-all"
|
||||||
data-testid="entitylink"
|
data-testid="entitylink"
|
||||||
to={prepareFeedLink(entityType, entityFQN)}>
|
to={prepareFeedLink(entityType, entityFQN)}>
|
||||||
{entityDisplayName(entityType, entityFQN)}
|
{entityDisplayName(entityType, entityFQN)}
|
||||||
|
|||||||
@ -254,9 +254,11 @@ export const DataAssetsHeader = ({
|
|||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (dataAsset.fullyQualifiedName && !isTourPage && !excludeEntityService) {
|
if (dataAsset.fullyQualifiedName && !isTourPage) {
|
||||||
fetchActiveAnnouncement();
|
fetchActiveAnnouncement();
|
||||||
fetchTaskCount();
|
if (!excludeEntityService) {
|
||||||
|
fetchTaskCount();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (entityType === EntityType.CONTAINER) {
|
if (entityType === EntityType.CONTAINER) {
|
||||||
const asset = dataAsset as Container;
|
const asset = dataAsset as Container;
|
||||||
|
|||||||
@ -60,10 +60,11 @@ const AnnouncementDrawer: FC<Props> = ({
|
|||||||
|
|
||||||
const title = (
|
const title = (
|
||||||
<Space
|
<Space
|
||||||
|
align="start"
|
||||||
className="justify-between"
|
className="justify-between"
|
||||||
data-testid="title"
|
data-testid="title"
|
||||||
style={{ width: '100%' }}>
|
style={{ width: '100%' }}>
|
||||||
<Typography.Text className="font-medium">
|
<Typography.Text className="font-medium break-all">
|
||||||
{t('label.announcement-on-entity', { entity: entityName })}
|
{t('label.announcement-on-entity', { entity: entityName })}
|
||||||
</Typography.Text>
|
</Typography.Text>
|
||||||
<CloseOutlined onClick={onClose} />
|
<CloseOutlined onClick={onClose} />
|
||||||
|
|||||||
@ -19,7 +19,20 @@ export const ANNOUNCEMENT_ENTITIES = [
|
|||||||
EntityType.TOPIC,
|
EntityType.TOPIC,
|
||||||
EntityType.PIPELINE,
|
EntityType.PIPELINE,
|
||||||
EntityType.MLMODEL,
|
EntityType.MLMODEL,
|
||||||
|
EntityType.CONTAINER,
|
||||||
|
EntityType.DASHBOARD_DATA_MODEL,
|
||||||
|
EntityType.STORED_PROCEDURE,
|
||||||
EntityType.SEARCH_INDEX,
|
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) => {
|
export const isActiveAnnouncement = (startTime: number, endTime: number) => {
|
||||||
|
|||||||
@ -570,6 +570,10 @@ export const entityDisplayName = (entityType: string, entityFQN: string) => {
|
|||||||
EntityType.DASHBOARD_SERVICE,
|
EntityType.DASHBOARD_SERVICE,
|
||||||
EntityType.MESSAGING_SERVICE,
|
EntityType.MESSAGING_SERVICE,
|
||||||
EntityType.PIPELINE_SERVICE,
|
EntityType.PIPELINE_SERVICE,
|
||||||
|
EntityType.MLMODEL_SERVICE,
|
||||||
|
EntityType.METADATA_SERVICE,
|
||||||
|
EntityType.STORAGE_SERVICE,
|
||||||
|
EntityType.SEARCH_SERVICE,
|
||||||
EntityType.TYPE,
|
EntityType.TYPE,
|
||||||
EntityType.MLMODEL,
|
EntityType.MLMODEL,
|
||||||
].includes(entityType as EntityType)
|
].includes(entityType as EntityType)
|
||||||
|
|||||||
@ -242,6 +242,10 @@ export const getEntityLink = (
|
|||||||
case EntityType.DASHBOARD_SERVICE:
|
case EntityType.DASHBOARD_SERVICE:
|
||||||
case EntityType.MESSAGING_SERVICE:
|
case EntityType.MESSAGING_SERVICE:
|
||||||
case EntityType.PIPELINE_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`);
|
return getServiceDetailsPath(fullyQualifiedName, `${indexType}s`);
|
||||||
|
|
||||||
case EntityType.WEBHOOK:
|
case EntityType.WEBHOOK:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user