From d0b9edbfc11c550b0b683a4645188305dc9f99f8 Mon Sep 17 00:00:00 2001 From: vishnuszipstack <117254672+vishnuszipstack@users.noreply.github.com> Date: Fri, 12 Jul 2024 11:07:18 +0530 Subject: [PATCH 1/2] Fix/manual review enable etl (#482) * added etl condition fix for manual review * fixed issue in handleException import error * removed important tag that made for temporay fix --- frontend/src/components/agency/actions/Actions.jsx | 8 ++++---- .../output-for-doc-modal/OutputForDocModal.jsx | 2 +- frontend/src/components/custom-tools/tool-ide/ToolIde.css | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/frontend/src/components/agency/actions/Actions.jsx b/frontend/src/components/agency/actions/Actions.jsx index faa973bf0..ba57e40fb 100644 --- a/frontend/src/components/agency/actions/Actions.jsx +++ b/frontend/src/components/agency/actions/Actions.jsx @@ -77,10 +77,10 @@ function Actions({ statusBarMsg, initializeWfComp, stepLoader }) { // Enable Deploy as ETL Pipeline only when // destination connection_type is DATABASE and Source & Destination are Configured setCanAddETLPipeline( - (destination?.connection_type === "DATABASE" || - destination.connection_type === "MANUALREVIEW") && - source?.connector_instance && - destination.connector_instance + source?.connector_instance && + ((destination?.connection_type === "DATABASE" && + destination.connector_instance) || + destination.connection_type === "MANUALREVIEW") ); }, [source, destination]); useEffect(() => { diff --git a/frontend/src/components/custom-tools/output-for-doc-modal/OutputForDocModal.jsx b/frontend/src/components/custom-tools/output-for-doc-modal/OutputForDocModal.jsx index 23de585e2..69f517f75 100644 --- a/frontend/src/components/custom-tools/output-for-doc-modal/OutputForDocModal.jsx +++ b/frontend/src/components/custom-tools/output-for-doc-modal/OutputForDocModal.jsx @@ -78,7 +78,7 @@ function OutputForDocModal({ const axiosPrivate = useAxiosPrivate(); const navigate = useNavigate(); const { setAlertDetails } = useAlertStore(); - const { handleException } = useExceptionHandler(); + const handleException = useExceptionHandler(); const { tokenUsage } = useTokenUsageStore(); const [selectedProfile, setSelectedProfile] = useState(defaultLlmProfile); diff --git a/frontend/src/components/custom-tools/tool-ide/ToolIde.css b/frontend/src/components/custom-tools/tool-ide/ToolIde.css index bf0b907b1..e568d504b 100644 --- a/frontend/src/components/custom-tools/tool-ide/ToolIde.css +++ b/frontend/src/components/custom-tools/tool-ide/ToolIde.css @@ -37,7 +37,7 @@ .tool-ide-prompts { padding: 12px 6px 1px 12px; - height: 100% !important; + height: 100%; } .tool-ide-pdf { From c23194efd87e400e58aafc41e8cd0e3db327747a Mon Sep 17 00:00:00 2001 From: Rahul Johny <116638720+johnyrahul@users.noreply.github.com> Date: Fri, 12 Jul 2024 16:36:24 +0530 Subject: [PATCH 2/2] Load file util function fix (#483) * Updating load file to return file name fom file path * Added docstring --- backend/workflow_manager/endpoint/source.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/backend/workflow_manager/endpoint/source.py b/backend/workflow_manager/endpoint/source.py index 4dd096044..9a4306e4c 100644 --- a/backend/workflow_manager/endpoint/source.py +++ b/backend/workflow_manager/endpoint/source.py @@ -386,6 +386,17 @@ def handle_final_result( results.append({"file": file_name, "result": result}) def load_file(self, input_file_path: str) -> tuple[str, BytesIO]: + """Load file contnt and file name based on the file path. + + Args: + input_file_path (str): source file + + Raises: + InvalidSource: _description_ + + Returns: + tuple[str, BytesIO]: file_name , file content + """ connector: ConnectorInstance = self.endpoint.connector_instance connector_settings: dict[str, Any] = connector.connector_metadata source_fs: fsspec.AbstractFileSystem = self.get_fsspec( @@ -395,7 +406,7 @@ def load_file(self, input_file_path: str) -> tuple[str, BytesIO]: file_content = remote_file.read() file_stream = BytesIO(file_content) - return remote_file.key, file_stream + return os.path.basename(input_file_path), file_stream @classmethod def add_input_file_to_api_storage(