From e68aaec187a42652ea1741153049b51defae2d3a Mon Sep 17 00:00:00 2001 From: Daniel D'Abate Date: Thu, 6 Jun 2024 10:33:39 +0200 Subject: [PATCH 1/3] Bugfix - Fix crash when executing JS function from node and fix hidden response --- packages/ui/src/ui-component/dialog/ExpandTextDialog.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/ui/src/ui-component/dialog/ExpandTextDialog.jsx b/packages/ui/src/ui-component/dialog/ExpandTextDialog.jsx index c93655fe176..6dfd6eec864 100644 --- a/packages/ui/src/ui-component/dialog/ExpandTextDialog.jsx +++ b/packages/ui/src/ui-component/dialog/ExpandTextDialog.jsx @@ -78,7 +78,7 @@ const ExpandTextDialog = ({ show, dialogProps, onCancel, onConfirm }) => { useEffect(() => { if (executeCustomFunctionNodeApi.error) { if (typeof executeCustomFunctionNodeApi.error === 'object' && executeCustomFunctionNodeApi.error?.response?.data) { - setCodeExecutedResult(executeCustomFunctionNodeApi.error?.response?.data) + setCodeExecutedResult(JSON.stringify(executeCustomFunctionNodeApi.error?.response?.data, null, 2)) } else if (typeof executeCustomFunctionNodeApi.error === 'string') { setCodeExecutedResult(executeCustomFunctionNodeApi.error) } @@ -100,7 +100,7 @@ const ExpandTextDialog = ({ show, dialogProps, onCancel, onConfirm }) => { borderColor: theme.palette.grey['500'], borderRadius: '12px', height: '100%', - maxHeight: languageType === 'js' ? 'calc(100vh - 250px)' : 'calc(100vh - 220px)', + maxHeight: languageType === 'js' ? 'calc(100vh - 430px)' : 'calc(100vh - 400px)', overflowX: 'hidden', backgroundColor: 'white' }} @@ -108,7 +108,7 @@ const ExpandTextDialog = ({ show, dialogProps, onCancel, onConfirm }) => { Date: Thu, 6 Jun 2024 13:56:32 +0100 Subject: [PATCH 2/3] add toString() to code executed result --- packages/ui/src/ui-component/dialog/ExpandTextDialog.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/ui/src/ui-component/dialog/ExpandTextDialog.jsx b/packages/ui/src/ui-component/dialog/ExpandTextDialog.jsx index 6dfd6eec864..b0906353d9e 100644 --- a/packages/ui/src/ui-component/dialog/ExpandTextDialog.jsx +++ b/packages/ui/src/ui-component/dialog/ExpandTextDialog.jsx @@ -152,7 +152,7 @@ const ExpandTextDialog = ({ show, dialogProps, onCancel, onConfirm }) => {
Date: Thu, 6 Jun 2024 15:07:47 +0200 Subject: [PATCH 3/3] Change height of CodeEditor to make it bigger, but still make the result visible below. --- packages/ui/src/ui-component/dialog/ExpandTextDialog.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/ui/src/ui-component/dialog/ExpandTextDialog.jsx b/packages/ui/src/ui-component/dialog/ExpandTextDialog.jsx index b0906353d9e..068f26c100b 100644 --- a/packages/ui/src/ui-component/dialog/ExpandTextDialog.jsx +++ b/packages/ui/src/ui-component/dialog/ExpandTextDialog.jsx @@ -100,7 +100,7 @@ const ExpandTextDialog = ({ show, dialogProps, onCancel, onConfirm }) => { borderColor: theme.palette.grey['500'], borderRadius: '12px', height: '100%', - maxHeight: languageType === 'js' ? 'calc(100vh - 430px)' : 'calc(100vh - 400px)', + maxHeight: languageType === 'js' ? 'calc(100vh - 330px)' : 'calc(100vh - 220px)', overflowX: 'hidden', backgroundColor: 'white' }} @@ -108,7 +108,7 @@ const ExpandTextDialog = ({ show, dialogProps, onCancel, onConfirm }) => {