refactor: clean up console logs in SimulationHandler and heatMapImageApi
This commit is contained in:
@@ -115,9 +115,6 @@ const SimulationHandler = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (materials.length === 0 && materialHistory.length >= 0 && !hasActiveEntity) {
|
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) {
|
if (executionSequences?.length > 0) {
|
||||||
executionSequences.forEach((sequence) => {
|
executionSequences.forEach((sequence) => {
|
||||||
sequence.forEach((entity) => {
|
sequence.forEach((entity) => {
|
||||||
@@ -143,20 +140,10 @@ const SimulationHandler = () => {
|
|||||||
idleTime: obj.idleTime ?? 0,
|
idleTime: obj.idleTime ?? 0,
|
||||||
type: entity.type as "roboticArm" | "vehicle" | "machine" | "human" | "crane" | "storageUnit" | "transfer",
|
type: entity.type as "roboticArm" | "vehicle" | "machine" | "human" | "crane" | "storageUnit" | "transfer",
|
||||||
});
|
});
|
||||||
generateHeatmapOutput({
|
generateHeatmapOutput({ bakedPoints, gl, width, height, outputType: "file", download: false }).then((bakedResult) => {
|
||||||
bakedPoints,
|
//
|
||||||
gl,
|
|
||||||
width,
|
|
||||||
height,
|
|
||||||
outputType: "file",
|
|
||||||
download: false,
|
|
||||||
}).then((bakedResult) => {
|
|
||||||
console.log("Baked Result:", bakedResult);
|
|
||||||
|
|
||||||
heatMapImageApi(projectId || "", selectedVersion?.versionId || "", selectedProduct?.productUuid, bakedResult);
|
heatMapImageApi(projectId || "", selectedVersion?.versionId || "", selectedProduct?.productUuid, bakedResult);
|
||||||
});
|
});
|
||||||
|
|
||||||
// heatMapImageApi(projectId || "", selectedVersion?.versionId || "", selectedProduct?.productUuid, bakedResult);
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
let url_Backend_dwinzo = `http://${process.env.REACT_APP_SERVER_REST_API_BASE_URL}`;
|
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) => {
|
export const heatMapImageApi = async (projectId: string, versionId: string, productUuid: string,heatmaps:any) => {
|
||||||
console.log('heatmaps: ', heatmaps);
|
|
||||||
try {
|
try {
|
||||||
const response = await fetch(`${url_Backend_dwinzo}/api/V1/SimulatedImage`, {
|
const response = await fetch(`${url_Backend_dwinzo}/api/V1/SimulatedImage`, {
|
||||||
method: "PATCH",
|
method: "PATCH",
|
||||||
@@ -25,7 +25,7 @@ export const heatMapImageApi = async (projectId: string, versionId: string, prod
|
|||||||
}
|
}
|
||||||
|
|
||||||
const result = await response.json();
|
const result = await response.json();
|
||||||
console.log('result: ', result);
|
|
||||||
return result;
|
return result;
|
||||||
} catch {
|
} catch {
|
||||||
echo.error("Failed to delete event data");
|
echo.error("Failed to delete event data");
|
||||||
|
|||||||
Reference in New Issue
Block a user