mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-12-04 19:44:58 +00:00
UI: Bug Fixes for lineage and glossary page (#5706)
This commit is contained in:
parent
cc4a74708f
commit
1f0c6534b3
@ -42,14 +42,6 @@ const getHandle = (
|
||||
};
|
||||
};
|
||||
|
||||
const getTopBottomHandleStyles = () => {
|
||||
return {
|
||||
opacity: 0,
|
||||
borderRadius: '0px',
|
||||
width: '110%',
|
||||
};
|
||||
};
|
||||
|
||||
if (nodeType === EntityLineageNodeType.OUTPUT) {
|
||||
return (
|
||||
<Fragment>
|
||||
@ -69,24 +61,6 @@ const getHandle = (
|
||||
}}
|
||||
type="target"
|
||||
/>
|
||||
<Handle
|
||||
id={id}
|
||||
isConnectable={isConnectable}
|
||||
position={Position.Bottom}
|
||||
style={{
|
||||
...getTopBottomHandleStyles(),
|
||||
}}
|
||||
type="target"
|
||||
/>
|
||||
<Handle
|
||||
id={id}
|
||||
isConnectable={isConnectable}
|
||||
position={Position.Top}
|
||||
style={{
|
||||
...getTopBottomHandleStyles(),
|
||||
}}
|
||||
type="target"
|
||||
/>
|
||||
</Fragment>
|
||||
);
|
||||
} else if (nodeType === EntityLineageNodeType.INPUT) {
|
||||
@ -108,24 +82,6 @@ const getHandle = (
|
||||
}}
|
||||
type="source"
|
||||
/>
|
||||
<Handle
|
||||
id={id}
|
||||
isConnectable={isConnectable}
|
||||
position={Position.Bottom}
|
||||
style={{
|
||||
...getTopBottomHandleStyles(),
|
||||
}}
|
||||
type="target"
|
||||
/>
|
||||
<Handle
|
||||
id={id}
|
||||
isConnectable={isConnectable}
|
||||
position={Position.Top}
|
||||
style={{
|
||||
...getTopBottomHandleStyles(),
|
||||
}}
|
||||
type="target"
|
||||
/>
|
||||
</Fragment>
|
||||
);
|
||||
} else if (nodeType === EntityLineageNodeType.NOT_CONNECTED) {
|
||||
@ -177,24 +133,6 @@ const getHandle = (
|
||||
}}
|
||||
type="source"
|
||||
/>
|
||||
<Handle
|
||||
id={id}
|
||||
isConnectable={isConnectable}
|
||||
position={Position.Bottom}
|
||||
style={{
|
||||
...getTopBottomHandleStyles(),
|
||||
}}
|
||||
type="target"
|
||||
/>
|
||||
<Handle
|
||||
id={id}
|
||||
isConnectable={isConnectable}
|
||||
position={Position.Top}
|
||||
style={{
|
||||
...getTopBottomHandleStyles(),
|
||||
}}
|
||||
type="target"
|
||||
/>
|
||||
</Fragment>
|
||||
);
|
||||
}
|
||||
|
||||
@ -296,12 +296,7 @@ const GlossaryDetails = ({ isHasAccess, glossary, updateGlossary }: props) => {
|
||||
data-testid="add-new-reviewer"
|
||||
disabled={isHasAccess}
|
||||
onClick={() => setShowRevieweModal(true)}>
|
||||
<SVGIcons
|
||||
alt="plus"
|
||||
className="tw-w-3.5 tw-mr-2"
|
||||
icon={Icons.ICON_PLUS_PRIMERY}
|
||||
/>
|
||||
<span>Add</span>
|
||||
<SVGIcons alt="edit" icon={Icons.EDIT} title="Edit" width="16px" />
|
||||
</button>
|
||||
</NonAdminAction>
|
||||
);
|
||||
@ -326,15 +321,7 @@ const GlossaryDetails = ({ isHasAccess, glossary, updateGlossary }: props) => {
|
||||
theme="primary"
|
||||
variant="text"
|
||||
onClick={handleSelectOwnerDropdown}>
|
||||
<span className="tw-mr-2">
|
||||
<SVGIcons
|
||||
alt="edit"
|
||||
icon={Icons.EDIT_OUTLINE_PRIMARY}
|
||||
title="Edit"
|
||||
width="16px"
|
||||
/>
|
||||
</span>
|
||||
<span>Edit</span>
|
||||
<SVGIcons alt="edit" icon={Icons.EDIT} title="Edit" width="16px" />
|
||||
</Button>
|
||||
</NonAdminAction>
|
||||
{listVisible && (
|
||||
@ -416,9 +403,7 @@ const GlossaryDetails = ({ isHasAccess, glossary, updateGlossary }: props) => {
|
||||
<div
|
||||
className="tw-w-full tw-h-full tw-flex tw-flex-col"
|
||||
data-testid="glossary-details">
|
||||
<div
|
||||
className="tw-flex tw-flex-wrap tw-group tw--mt-6 tw-mb-5"
|
||||
data-testid="tags">
|
||||
<div className="tw-flex tw-flex-wrap tw-group tw-mb-5" data-testid="tags">
|
||||
{!isTagEditable && (
|
||||
<>
|
||||
{glossary?.tags && glossary.tags.length > 0 && (
|
||||
|
||||
@ -339,12 +339,7 @@ const GlossaryTermsV1 = ({
|
||||
data-testid="add-new-reviewer"
|
||||
disabled={isHasAccess}
|
||||
onClick={() => setShowRevieweModal(true)}>
|
||||
<SVGIcons
|
||||
alt="plus"
|
||||
className="tw-w-3.5 tw-mr-2"
|
||||
icon={Icons.ICON_PLUS_PRIMERY}
|
||||
/>
|
||||
Add
|
||||
<SVGIcons alt="edit" icon={Icons.EDIT} title="Edit" width="16px" />
|
||||
</button>
|
||||
</NonAdminAction>
|
||||
);
|
||||
@ -375,15 +370,7 @@ const GlossaryTermsV1 = ({
|
||||
className="focus:tw-outline-none tw-text-primary"
|
||||
data-testid="edit-referencfe"
|
||||
onClick={onClick}>
|
||||
<span className="tw-mr-2">
|
||||
<SVGIcons
|
||||
alt="edit"
|
||||
icon={Icons.EDIT_OUTLINE_PRIMARY}
|
||||
title="Edit"
|
||||
width="16px"
|
||||
/>
|
||||
</span>
|
||||
<span>Edit</span>
|
||||
<SVGIcons alt="edit" icon={Icons.EDIT} title="Edit" width="16px" />
|
||||
</button>
|
||||
</NonAdminAction>
|
||||
);
|
||||
@ -636,7 +623,7 @@ const GlossaryTermsV1 = ({
|
||||
<div
|
||||
className="tw-w-full tw-h-full tw-flex tw-flex-col"
|
||||
data-testid="glossary-term">
|
||||
<p className="tw-text-lg tw-font-medium tw--mt-6">
|
||||
<p className="tw-text-lg tw-font-medium tw--mt-3">
|
||||
{getEntityName(glossaryTerm as unknown as EntityReference)}
|
||||
</p>
|
||||
{/* TODO: Add this stat when supporting status updation */}
|
||||
@ -645,7 +632,7 @@ const GlossaryTermsV1 = ({
|
||||
<div>{glossaryTerm.status}</div>
|
||||
</div> */}
|
||||
|
||||
<div className="tw-flex tw-flex-wrap tw-group" data-testid="tags">
|
||||
<div className="tw-flex tw-flex-wrap tw-group tw-mt-3" data-testid="tags">
|
||||
{!isTagEditable && (
|
||||
<>
|
||||
{glossaryTerm?.tags && glossaryTerm.tags.length > 0 && (
|
||||
|
||||
@ -75,15 +75,7 @@ const DescriptionV1 = ({
|
||||
className="focus:tw-outline-none tw-text-primary"
|
||||
data-testid="edit-description"
|
||||
onClick={onDescriptionEdit}>
|
||||
<span className="tw-mr-2">
|
||||
<SVGIcons
|
||||
alt="edit"
|
||||
icon={Icons.EDIT_OUTLINE_PRIMARY}
|
||||
title="Edit"
|
||||
width="16px"
|
||||
/>
|
||||
</span>
|
||||
<span>Edit</span>
|
||||
<SVGIcons alt="edit" icon={Icons.EDIT} title="Edit" width="16px" />
|
||||
</button>
|
||||
</NonAdminAction>
|
||||
) : (
|
||||
|
||||
@ -94,7 +94,7 @@ export const onLoad = (
|
||||
forceZoomReset = false
|
||||
) => {
|
||||
reactFlowInstance.fitView();
|
||||
if (forceZoomReset || (length && length <= 1)) {
|
||||
if (forceZoomReset || (length && length <= 2)) {
|
||||
reactFlowInstance.zoomTo(zoomValue);
|
||||
}
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user