Merge branch 'dev' of https://github.com/logspace-ai/langflow into dev
This commit is contained in:
commit
c630f293b0
2 changed files with 3 additions and 5 deletions
|
|
@ -34,7 +34,6 @@ export default function GenericNode({
|
||||||
const { reactFlowInstance } = useContext(typesContext);
|
const { reactFlowInstance } = useContext(typesContext);
|
||||||
const [params, setParams] = useState([]);
|
const [params, setParams] = useState([]);
|
||||||
|
|
||||||
console.log();
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (reactFlowInstance) {
|
if (reactFlowInstance) {
|
||||||
|
|
@ -53,15 +52,13 @@ export default function GenericNode({
|
||||||
body: JSON.stringify(reactFlowInstance.toObject()),
|
body: JSON.stringify(reactFlowInstance.toObject()),
|
||||||
});
|
});
|
||||||
|
|
||||||
console.log(response.status, response.body);
|
|
||||||
|
|
||||||
if (response.status === 200) {
|
if (response.status === 200) {
|
||||||
setValidationStatus("success");
|
setValidationStatus("success");
|
||||||
} else if (response.status === 500) {
|
} else if (response.status === 500) {
|
||||||
setValidationStatus("error");
|
setValidationStatus("error");
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("Error validating node:", error);
|
// console.error("Error validating node:", error);
|
||||||
setValidationStatus("error");
|
setValidationStatus("error");
|
||||||
}
|
}
|
||||||
}, 1000), // Adjust the debounce delay (500ms) as needed
|
}, 1000), // Adjust the debounce delay (500ms) as needed
|
||||||
|
|
|
||||||
|
|
@ -158,7 +158,7 @@ export default function FlowPage({ flow }:{flow:FlowType}) {
|
||||||
const onDelete = (mynodes) => {
|
const onDelete = (mynodes) => {
|
||||||
setEdges(
|
setEdges(
|
||||||
edges.filter(
|
edges.filter(
|
||||||
(ns) => !nodes.some((n) => ns.source === n.id || ns.target === n.id)
|
(ns) => !mynodes.some((n) => ns.source === n.id || ns.target === n.id)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
@ -208,6 +208,7 @@ export default function FlowPage({ flow }:{flow:FlowType}) {
|
||||||
onDragOver={onDragOver}
|
onDragOver={onDragOver}
|
||||||
onDrop={onDrop}
|
onDrop={onDrop}
|
||||||
onNodesDelete={onDelete}
|
onNodesDelete={onDelete}
|
||||||
|
selectNodesOnDrag={false}
|
||||||
>
|
>
|
||||||
<Background className="dark:bg-gray-900"/>
|
<Background className="dark:bg-gray-900"/>
|
||||||
<Controls className="[&>button]:text-black [&>button]:dark:bg-gray-800 hover:[&>button]:dark:bg-gray-700 [&>button]:dark:text-gray-400 [&>button]:dark:fill-gray-400 [&>button]:dark:border-gray-600">
|
<Controls className="[&>button]:text-black [&>button]:dark:bg-gray-800 hover:[&>button]:dark:bg-gray-700 [&>button]:dark:text-gray-400 [&>button]:dark:fill-gray-400 [&>button]:dark:border-gray-600">
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue