Skip to content

Commit c072cbc

Browse files
committed
temp [ci skip]
1 parent ae398de commit c072cbc

3 files changed

Lines changed: 14 additions & 8 deletions

File tree

vscode/extension/src/webviews/lineagePanel.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ export class LineagePanel implements WebviewViewProvider, Disposable {
139139
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; frame-src ${externalAuthority}; connect-src ${externalAuthority}; img-src ${externalAuthority} data:; script-src 'unsafe-inline' ${externalAuthority}; style-src 'unsafe-inline' ${externalAuthority};">
140140
</head>
141141
<body>
142+
${isProduction() ? '' : `<div>${externalUrl}</div>`}
142143
<iframe src="${externalUrl}" style="width:100%; height:100vh;" frameborder="0" allow="clipboard-read; clipboard-write"></iframe>
143144
</body>
144145
</html> `;

vscode/react/src/components/graph/ModelNode.tsx

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,15 @@ export default function ModelNode({
4646
} = useLineageFlow()
4747

4848
const columns: Column[] = useMemo(() => {
49-
const model = models[id]
49+
const modelsArray = Object.values(models)
50+
const decodedId = decodeURIComponent(id)
51+
const model = modelsArray.find((m: Model) => m.fqn === decodedId)
52+
if (!model) {
53+
throw new Error(`Model not found: ${id}`)
54+
}
5055
const modelColumns = model?.columns ?? []
5156

52-
Object.keys(lineage[id]?.columns ?? {}).forEach((column: string) => {
57+
Object.keys(lineage[decodedId]?.columns ?? {}).forEach((column: string) => {
5358
const found = modelColumns.find(({ name }) => {
5459
try {
5560
return name === decodeURI(column)
@@ -131,11 +136,6 @@ export default function ModelNode({
131136
const isModelSeed = nodeData.type === EnumLineageNodeModelType.seed
132137
const isModelUnknown = nodeData.type === EnumLineageNodeModelType.unknown
133138
const showColumns =
134-
(hasSelectedColumns ||
135-
nodeData.withColumns ||
136-
isMouseOver ||
137-
isSelected ||
138-
isMainNode) &&
139139
isArrayNotEmpty(columns) &&
140140
isFalse(hasHighlightedNodes)
141141
const isActiveNode =
@@ -151,6 +151,10 @@ export default function ModelNode({
151151
// isFalse(isModelUnknown)
152152
const shouldDisableColumns = isFalse(isModelSQL)
153153

154+
console.log(
155+
'showcolumns', showColumns,
156+
)
157+
154158
return (
155159
<div
156160
onMouseEnter={() => setIsMouseOver(true)}

vscode/react/src/components/graph/context.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ export default function LineageFlowProvider({
121121
handleError,
122122
handleClickModel,
123123
children,
124-
showColumns = false,
124+
showColumns = true,
125125
showConnected = false,
126126
showControls = true,
127127
models,
@@ -157,6 +157,7 @@ export default function LineageFlowProvider({
157157
const [hasBackground, setHasBackground] = useState(true)
158158
const [withImpacted, setWithImpacted] = useState(true)
159159
const [withSecondary, setWithSecondary] = useState(false)
160+
console.log('withColumns in provider', withColumns)
160161

161162
const nodesMap = useMemo(
162163
() =>

0 commit comments

Comments
 (0)