From 6ce3092e510502bead42d63f09e69107779c4f91 Mon Sep 17 00:00:00 2001 From: Bhavya Jain Date: Sat, 10 Aug 2024 18:53:57 +0530 Subject: [PATCH] remove console logs --- keep-ui/app/workflows/builder/builder-store.tsx | 9 --------- keep-ui/app/workflows/builder/builder.tsx | 2 -- keep-ui/app/workflows/builder/editors.tsx | 4 ---- keep-ui/utils/helpers.ts | 1 - keep-ui/utils/hooks/useWorkflowInitialization.ts | 4 ---- 5 files changed, 20 deletions(-) diff --git a/keep-ui/app/workflows/builder/builder-store.tsx b/keep-ui/app/workflows/builder/builder-store.tsx index f737a836c..32a1c7e4c 100644 --- a/keep-ui/app/workflows/builder/builder-store.tsx +++ b/keep-ui/app/workflows/builder/builder-store.tsx @@ -158,7 +158,6 @@ function addNodeBetween(nodeOrEdge: string | null, step: any, type: string, set: newStep, { id: targetId, type: 'temp_node', name: 'temp_node', 'componentType': 'temp_node', edgeNotNeeded: true } ], { x: 0, y: 0 }, true); - console.log("new nodes, edges", nodes, edges); const newEdges = [ ...edges, ...(get().edges.filter(edge => !(edge.source == sourceId && edge.target == targetId)) || []), @@ -300,7 +299,6 @@ const useStore = create((set, get) => ({ if (!step) { return; } - console.log("step", step); step = JSON.parse(step); if (!step) return; // Use the screenToFlowPosition function to get flow coordinates @@ -347,24 +345,17 @@ const useStore = create((set, get) => ({ } let idArray = Array.isArray(ids) ? ids : [ids]; - console.log("nodes", nodes); - const startNode = nodes[nodeStartIndex]; - console.log("startNode", startNode); const customIdentifier = `${startNode?.data?.type}__end__${startNode?.id}`; - console.log("customIdentifier", customIdentifier); let endIndex = nodes.findIndex((node) => node.id === customIdentifier); endIndex = endIndex === -1 ? nodeStartIndex : endIndex; - console.log("endIndex", endIndex); const endNode = nodes[endIndex]; - console.log("endNode", endNode); const edges = get().edges; let finalEdges = edges; idArray = nodes.slice(nodeStartIndex, endIndex + 1).map((node) => node.id); - console.log("idArray", idArray); finalEdges = edges.filter((edge) => !(idArray.includes(edge.source) || idArray.includes(edge.target))); const sources = [...new Set(edges.filter((edge) => startNode.id === edge.target))]; diff --git a/keep-ui/app/workflows/builder/builder.tsx b/keep-ui/app/workflows/builder/builder.tsx index cd5767fa5..19b873991 100644 --- a/keep-ui/app/workflows/builder/builder.tsx +++ b/keep-ui/app/workflows/builder/builder.tsx @@ -92,8 +92,6 @@ function Builder({ const searchParams = useSearchParams(); - console.log("definition", definition); - const updateWorkflow = () => { const apiUrl = getApiURL(); const url = `${apiUrl}/workflows/${workflowId}`; diff --git a/keep-ui/app/workflows/builder/editors.tsx b/keep-ui/app/workflows/builder/editors.tsx index d677adeb8..054466fd9 100644 --- a/keep-ui/app/workflows/builder/editors.tsx +++ b/keep-ui/app/workflows/builder/editors.tsx @@ -56,7 +56,6 @@ export function GlobalEditorV2() { const handleSubmit = () => { // Save the finalized properties setProperty(localProperties); - console.log('Final properties saved:', localProperties); }; return ( @@ -641,9 +640,6 @@ export function StepEditorV2({ // Finalize the changes before saving updateSelectedNodeData('name', formData.name); updateSelectedNodeData('properties', formData.properties); - - // Perform any additional save logic, such as API calls - console.log('Final data saved:', formData); }; return ( diff --git a/keep-ui/utils/helpers.ts b/keep-ui/utils/helpers.ts index 969d19e95..11bf31af5 100644 --- a/keep-ui/utils/helpers.ts +++ b/keep-ui/utils/helpers.ts @@ -57,7 +57,6 @@ export async function installWebhook(provider: Provider, accessToken: string) { success: `${provider.type} webhook installed 👌`, error: { render({ data }) { - console.log(data); // When the promise reject, data will contains the error return `Webhook installation failed 😢 Error: ${ (data as any).detail diff --git a/keep-ui/utils/hooks/useWorkflowInitialization.ts b/keep-ui/utils/hooks/useWorkflowInitialization.ts index f333d0b8e..0c3b68cf0 100644 --- a/keep-ui/utils/hooks/useWorkflowInitialization.ts +++ b/keep-ui/utils/hooks/useWorkflowInitialization.ts @@ -244,7 +244,6 @@ const useWorkflowInitialization = ( const initializeWorkflow = async () => { setIsLoading(true); let parsedWorkflow = definition?.value; - console.log("parsedWorkflow", parsedWorkflow); setV2Properties(parsedWorkflow?.properties ?? {}); // let { nodes: newNodes, edges: newEdges } = processWorkflow( // parsedWorkflow?.sequence @@ -268,9 +267,6 @@ const useWorkflowInitialization = ( ]; const intialPositon = { x: 0, y: 50 }; let { nodes, edges } = processWorkflowV2(sequences, intialPositon, true); - console.log(nodes, edges); - console.log("nodes", nodes); - console.log("edges", edges); setIsLayouted(false); setNodes(nodes); setEdges(edges);