mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-29 11:26:05 +00:00
UI : Lineage UI improvement (#9312)
* Lineage UI improvement * added util function for name
This commit is contained in:
parent
d90e7f5edd
commit
f3d3fd453b
@ -32,6 +32,7 @@ import {
|
|||||||
ZOOM_SLIDER_STEP,
|
ZOOM_SLIDER_STEP,
|
||||||
ZOOM_TRANSITION_DURATION,
|
ZOOM_TRANSITION_DURATION,
|
||||||
} from '../../constants/Lineage.constants';
|
} from '../../constants/Lineage.constants';
|
||||||
|
import { getEntityName } from '../../utils/CommonUtils';
|
||||||
import { getLoadingStatusValue } from '../../utils/EntityLineageUtils';
|
import { getLoadingStatusValue } from '../../utils/EntityLineageUtils';
|
||||||
import SVGIcons, { Icons } from '../../utils/SvgUtils';
|
import SVGIcons, { Icons } from '../../utils/SvgUtils';
|
||||||
import { ControlProps } from './EntityLineage.interface';
|
import { ControlProps } from './EntityLineage.interface';
|
||||||
@ -128,7 +129,7 @@ const CustomControls: FC<ControlProps> = ({
|
|||||||
const nodeOptions = useMemo(
|
const nodeOptions = useMemo(
|
||||||
() =>
|
() =>
|
||||||
[lineageData.entity, ...(lineageData.nodes || [])].map((node) => ({
|
[lineageData.entity, ...(lineageData.nodes || [])].map((node) => ({
|
||||||
label: node.fullyQualifiedName || node.name || '',
|
label: getEntityName(node),
|
||||||
value: node.id,
|
value: node.id,
|
||||||
})),
|
})),
|
||||||
[lineageData]
|
[lineageData]
|
||||||
|
@ -25,8 +25,8 @@ export const entityData = [
|
|||||||
export const POSITION_X = 150;
|
export const POSITION_X = 150;
|
||||||
export const POSITION_Y = 60;
|
export const POSITION_Y = 60;
|
||||||
|
|
||||||
export const NODE_WIDTH = 600;
|
export const NODE_WIDTH = 400;
|
||||||
export const NODE_HEIGHT = 70;
|
export const NODE_HEIGHT = 50;
|
||||||
export const EXPANDED_NODE_HEIGHT = 300;
|
export const EXPANDED_NODE_HEIGHT = 300;
|
||||||
|
|
||||||
export const ELEMENT_DELETE_STATE = {
|
export const ELEMENT_DELETE_STATE = {
|
||||||
|
@ -47,9 +47,9 @@ import { FQN_SEPARATOR_CHAR } from '../constants/char.constants';
|
|||||||
import { SECONDARY_COLOR } from '../constants/constants';
|
import { SECONDARY_COLOR } from '../constants/constants';
|
||||||
import {
|
import {
|
||||||
EXPANDED_NODE_HEIGHT,
|
EXPANDED_NODE_HEIGHT,
|
||||||
|
MIN_ZOOM_VALUE,
|
||||||
NODE_HEIGHT,
|
NODE_HEIGHT,
|
||||||
NODE_WIDTH,
|
NODE_WIDTH,
|
||||||
ZOOM_VALUE,
|
|
||||||
} from '../constants/Lineage.constants';
|
} from '../constants/Lineage.constants';
|
||||||
import {
|
import {
|
||||||
EntityLineageDirection,
|
EntityLineageDirection,
|
||||||
@ -106,7 +106,7 @@ export const getHeaderLabel = (
|
|||||||
|
|
||||||
export const onLoad = (reactFlowInstance: ReactFlowInstance) => {
|
export const onLoad = (reactFlowInstance: ReactFlowInstance) => {
|
||||||
reactFlowInstance.fitView();
|
reactFlowInstance.fitView();
|
||||||
reactFlowInstance.zoomTo(ZOOM_VALUE);
|
reactFlowInstance.zoomTo(MIN_ZOOM_VALUE);
|
||||||
};
|
};
|
||||||
/* eslint-disable-next-line */
|
/* eslint-disable-next-line */
|
||||||
export const onNodeMouseEnter = (_event: ReactMouseEvent, _node: Node) => {
|
export const onNodeMouseEnter = (_event: ReactMouseEvent, _node: Node) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user