Fix relation info in kownledge graph UI
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -5,7 +5,7 @@
|
||||
<link rel="icon" type="image/svg+xml" href="./logo.png" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Lightrag</title>
|
||||
<script type="module" crossorigin src="./assets/index-CJz72b6Q.js"></script>
|
||||
<script type="module" crossorigin src="./assets/index-BCtjO3U7.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="./assets/index-CH-3l4_Z.css">
|
||||
</head>
|
||||
<body>
|
||||
|
@@ -744,11 +744,7 @@ class Neo4JStorage(BaseGraphStorage):
|
||||
result.nodes.append(
|
||||
KnowledgeGraphNode(
|
||||
id=f"{node_id}",
|
||||
labels=[
|
||||
label
|
||||
for label in node.labels
|
||||
if label != "base"
|
||||
],
|
||||
labels=[node.get("entity_id")],
|
||||
properties=dict(node),
|
||||
)
|
||||
)
|
||||
@@ -865,9 +861,7 @@ class Neo4JStorage(BaseGraphStorage):
|
||||
# Create KnowledgeGraphNode for target
|
||||
target_node = KnowledgeGraphNode(
|
||||
id=f"{target_id}",
|
||||
labels=[
|
||||
label for label in b_node.labels if label != "base"
|
||||
],
|
||||
labels=list(f"{target_id}"),
|
||||
properties=dict(b_node.properties),
|
||||
)
|
||||
|
||||
@@ -907,9 +901,7 @@ class Neo4JStorage(BaseGraphStorage):
|
||||
# Create initial KnowledgeGraphNode
|
||||
start_node = KnowledgeGraphNode(
|
||||
id=f"{node_record['n'].get('entity_id')}",
|
||||
labels=[
|
||||
label for label in node_record["n"].labels if label != "base"
|
||||
],
|
||||
labels=list(f"{node_record['n'].get('entity_id')}"),
|
||||
properties=dict(node_record["n"].properties),
|
||||
)
|
||||
finally:
|
||||
|
@@ -95,9 +95,9 @@ const refineNodeProperties = (node: RawNodeType): NodeType => {
|
||||
const neighbour = state.rawGraph.getNode(neighbourId)
|
||||
if (neighbour) {
|
||||
relationships.push({
|
||||
type: isTarget ? 'Target' : 'Source',
|
||||
type: 'Target',
|
||||
id: neighbourId,
|
||||
label: neighbour.labels.join(', ')
|
||||
label: neighbour.properties['entity_id']
|
||||
})
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user