From cefbfa49ce0d050aa31916271b9d11a5dd506b39 Mon Sep 17 00:00:00 2001 From: Gomathi9520 Date: Tue, 9 Sep 2025 09:01:20 +0530 Subject: [PATCH] refactor: clean up console logs in SimulationHandler and heatMapImageApi --- .../simulation/simulator/SimulationHandler.tsx | 17 ++--------------- .../simulation/products/heatMapImageApi.ts | 4 ++-- 2 files changed, 4 insertions(+), 17 deletions(-) diff --git a/app/src/modules/simulation/simulator/SimulationHandler.tsx b/app/src/modules/simulation/simulator/SimulationHandler.tsx index e7c649e..88dba01 100644 --- a/app/src/modules/simulation/simulator/SimulationHandler.tsx +++ b/app/src/modules/simulation/simulator/SimulationHandler.tsx @@ -115,9 +115,6 @@ const SimulationHandler = () => { } if (materials.length === 0 && materialHistory.length >= 0 && !hasActiveEntity) { - // let bakedResult = generateHeatmapOutput({ bakedPoints, gl, width, height, outputType: "url" }); - // console.log('bakedResult: ', bakedResult); - if (executionSequences?.length > 0) { executionSequences.forEach((sequence) => { sequence.forEach((entity) => { @@ -143,20 +140,10 @@ const SimulationHandler = () => { idleTime: obj.idleTime ?? 0, type: entity.type as "roboticArm" | "vehicle" | "machine" | "human" | "crane" | "storageUnit" | "transfer", }); - generateHeatmapOutput({ - bakedPoints, - gl, - width, - height, - outputType: "file", - download: false, - }).then((bakedResult) => { - console.log("Baked Result:", bakedResult); - + generateHeatmapOutput({ bakedPoints, gl, width, height, outputType: "file", download: false }).then((bakedResult) => { + // heatMapImageApi(projectId || "", selectedVersion?.versionId || "", selectedProduct?.productUuid, bakedResult); }); - - // heatMapImageApi(projectId || "", selectedVersion?.versionId || "", selectedProduct?.productUuid, bakedResult); }); }); } diff --git a/app/src/services/simulation/products/heatMapImageApi.ts b/app/src/services/simulation/products/heatMapImageApi.ts index b098dbf..1de7c33 100644 --- a/app/src/services/simulation/products/heatMapImageApi.ts +++ b/app/src/services/simulation/products/heatMapImageApi.ts @@ -1,7 +1,7 @@ let url_Backend_dwinzo = `http://${process.env.REACT_APP_SERVER_REST_API_BASE_URL}`; export const heatMapImageApi = async (projectId: string, versionId: string, productUuid: string,heatmaps:any) => { - console.log('heatmaps: ', heatmaps); + try { const response = await fetch(`${url_Backend_dwinzo}/api/V1/SimulatedImage`, { method: "PATCH", @@ -25,7 +25,7 @@ export const heatMapImageApi = async (projectId: string, versionId: string, prod } const result = await response.json(); - console.log('result: ', result); + return result; } catch { echo.error("Failed to delete event data");