yangdx
commited on
Commit
·
9e0ee27
1
Parent(s):
ff39dc4
Simplify log message for graph query
Browse files
lightrag_webui/src/hooks/useLightragGraph.tsx
CHANGED
@@ -76,7 +76,7 @@ const fetchGraph = async (label: string, maxDepth: number, minDegree: number) =>
|
|
76 |
// Check if we need to fetch all database labels first
|
77 |
const lastSuccessfulQueryLabel = useGraphStore.getState().lastSuccessfulQueryLabel;
|
78 |
if (!lastSuccessfulQueryLabel) {
|
79 |
-
console.log('Last successful
|
80 |
try {
|
81 |
await useGraphStore.getState().fetchAllDatabaseLabels();
|
82 |
} catch (e) {
|
@@ -89,7 +89,7 @@ const fetchGraph = async (label: string, maxDepth: number, minDegree: number) =>
|
|
89 |
const queryLabel = label || '*';
|
90 |
|
91 |
try {
|
92 |
-
console.log(`Fetching graph
|
93 |
rawData = await queryGraphs(queryLabel, maxDepth, minDegree);
|
94 |
} catch (e) {
|
95 |
useBackendState.getState().setErrorMessage(errorMessage(e), 'Query Graphs Error!');
|
@@ -163,7 +163,7 @@ const fetchGraph = async (label: string, maxDepth: number, minDegree: number) =>
|
|
163 |
|
164 |
if (!validateGraph(rawGraph)) {
|
165 |
rawGraph = null
|
166 |
-
console.
|
167 |
}
|
168 |
console.log('Graph data loaded')
|
169 |
}
|
@@ -360,8 +360,6 @@ const useLightrangeGraph = () => {
|
|
360 |
|
361 |
// Reset camera view
|
362 |
state.setMoveToSelectedNode(true);
|
363 |
-
|
364 |
-
console.log('Graph data loaded successfully');
|
365 |
}
|
366 |
|
367 |
// Update flags
|
|
|
76 |
// Check if we need to fetch all database labels first
|
77 |
const lastSuccessfulQueryLabel = useGraphStore.getState().lastSuccessfulQueryLabel;
|
78 |
if (!lastSuccessfulQueryLabel) {
|
79 |
+
console.log('Last successful queryLabel is empty');
|
80 |
try {
|
81 |
await useGraphStore.getState().fetchAllDatabaseLabels();
|
82 |
} catch (e) {
|
|
|
89 |
const queryLabel = label || '*';
|
90 |
|
91 |
try {
|
92 |
+
console.log(`Fetching graph label: ${queryLabel}, depth: ${maxDepth}, deg: ${minDegree}`);
|
93 |
rawData = await queryGraphs(queryLabel, maxDepth, minDegree);
|
94 |
} catch (e) {
|
95 |
useBackendState.getState().setErrorMessage(errorMessage(e), 'Query Graphs Error!');
|
|
|
163 |
|
164 |
if (!validateGraph(rawGraph)) {
|
165 |
rawGraph = null
|
166 |
+
console.warn('Invalid graph data')
|
167 |
}
|
168 |
console.log('Graph data loaded')
|
169 |
}
|
|
|
360 |
|
361 |
// Reset camera view
|
362 |
state.setMoveToSelectedNode(true);
|
|
|
|
|
363 |
}
|
364 |
|
365 |
// Update flags
|