Skip to content

LLM-Driven Extraction of Unstructured Data — Built for API Deployments & ETL Pipeline Workflows

added link and message to open after deployment in workflow page (#146)

vishnuszipstack12acf5c5ca08
diff --git a/frontend/src/components/agency/actions/Actions.jsx b/frontend/src/components/agency/actions/Actions.jsx
index 763503586..d894280d9 100644
--- a/frontend/src/components/agency/actions/Actions.jsx
+++ b/frontend/src/components/agency/actions/Actions.jsx
@@ -8,7 +8,7 @@ import {
StepForwardOutlined,
StopOutlined,
} from "@ant-design/icons";
-import { Button, Divider, Space, Tooltip, Typography } from "antd";
+import { Button, Divider, Space, Tooltip, Typography, Alert } from "antd";
import PropTypes from "prop-types";
import { useEffect, useState } from "react";
@@ -41,7 +41,8 @@ function Actions({ statusBarMsg, initializeWfComp, stepLoader }) {
const [canAddETLPipeline, setCanAddETAPipeline] = useState(false);
const [openAddTaskModal, setOpenAddTaskModal] = useState(false);
const [openAddETLModal, setOpenAddETLModal] = useState(false);
-
+ const [deploymentName, setDeploymentName] = useState("");
+ const [deploymentType, setDeploymentType] = useState("");
const {
details,
isLoading,
@@ -52,9 +53,8 @@ function Actions({ statusBarMsg, initializeWfComp, stepLoader }) {
} = useWorkflowStore();
const { setAlertDetails } = useAlertStore();
const { sessionDetails } = useSessionStore();
-
+ const { orgName } = sessionDetails;
const axiosPrivate = useAxiosPrivate();
-
useEffect(() => {
// Enable Deploy as API only when
// Source & Destination connection_type are selected as API
@@ -77,7 +77,15 @@ function Actions({ statusBarMsg, initializeWfComp, stepLoader }) {
destination.connector_instance
);
}, [source, destination]);
-
+ useEffect(() => {
+ if (apiOpsPresent) {
+ setDeploymentType("API");
+ } else if (canAddTaskPipeline) {
+ setDeploymentType("Task Pipeline");
+ } else if (canAddETLPipeline) {
+ setDeploymentType("ETL Pipeline");
+ }
+ }, [deploymentName]);
useEffect(() => {
if (stepExecType === wfExecutionTypes[1]) {
setStepExecType("");
@@ -468,6 +476,26 @@ function Actions({ statusBarMsg, initializeWfComp, stepLoader }) {
<ApiOutlined />
</Button>
</Tooltip>
+ <Divider type="vertical" />
+ {deploymentName && (
+ <Alert
+ message={
+ <>
+ <span>
+ This Workflow has been deployed as an {deploymentType}:{" "}
+ </span>
+ <a
+ href={`/${orgName}/${deploymentType
+ .split(" ")[0]
+ .toLowerCase()}`}
+ >
+ {deploymentName}
+ </a>
+ </>
+ }
+ type="success"
+ />
+ )}
</Space>
<div className="status-bar">
<Typography.Text>{statusBarMsg}</Typography.Text>
@@ -489,6 +517,7 @@ function Actions({ statusBarMsg, initializeWfComp, stepLoader }) {
setOpen={setOpenAddApiModal}
isEdit={false}
workflowId={details?.id}
+ setDeploymentName={setDeploymentName}
/>
)}
{openAddTaskModal && (
@@ -498,6 +527,7 @@ function Actions({ statusBarMsg, initializeWfComp, stepLoader }) {
type="task"
title={deploymentsStaticContent["task"].modalTitle}
workflowId={details?.id}
+ setDeploymentName={setDeploymentName}
/>
)}
{openAddETLModal && (
@@ -507,6 +537,7 @@ function Actions({ statusBarMsg, initializeWfComp, stepLoader }) {
type="etl"
title={deploymentsStaticContent["etl"].modalTitle}
workflowId={details?.id}
+ setDeploymentName={setDeploymentName}
/>
)}
<SocketMessages logId={logId} />
diff --git a/frontend/src/components/deployments/api-deployment/ApiDeployment.jsx b/frontend/src/components/deployments/api-deployment/ApiDeployment.jsx
index 15c1c7465..21af9d91b 100644
--- a/frontend/src/components/deployments/api-deployment/ApiDeployment.jsx
+++ b/frontend/src/components/deployments/api-deployment/ApiDeployment.jsx
@@ -44,7 +44,6 @@ function ApiDeployment() {
getApiDeploymentList();
getWorkflows();
}, []);
-
const getWorkflows = () => {
workflowApiService
.getWorkflowEndpointList("SOURCE", "API")
diff --git a/frontend/src/components/deployments/create-api-deployment-modal/CreateApiDeploymentModal.jsx b/frontend/src/components/deployments/create-api-deployment-modal/CreateApiDeploymentModal.jsx
index 81f47106c..53cb10999 100644
--- a/frontend/src/components/deployments/create-api-deployment-modal/CreateApiDeploymentModal.jsx
+++ b/frontend/src/components/deployments/create-api-deployment-modal/CreateApiDeploymentModal.jsx
@@ -1,7 +1,6 @@
import { Form, Input, Modal, Select } from "antd";
import PropTypes from "prop-types";
import { useEffect, useState } from "react";
-
import { getBackendErrorDetail } from "../../../helpers/GetStaticData.js";
import { useAlertStore } from "../../../store/alert-store";
import { apiDeploymentsService } from "../../deployments/api-deployment/api-deployments-service.js";
@@ -25,13 +24,13 @@ const CreateApiDeploymentModal = ({
setSelectedRow,
workflowId,
workflowEndpointList,
+ setDeploymentName,
}) => {
const workflowStore = useWorkflowStore();
const { updateWorkflow } = workflowStore;
const apiDeploymentsApiService = apiDeploymentsService();
const { setAlertDetails } = useAlertStore();
const handleException = useExceptionHandler();
-
const { Option } = Select;
const [formDetails, setFormDetails] = useState(
isEdit ? { ...selectedRow } : { ...defaultFromDetails }
@@ -40,7 +39,6 @@ const CreateApiDeploymentModal = ({
const [form] = Form.useForm();
const [backendErrors, setBackendErrors] = useState(null);
const [isFormChanged, setIsFormChanged] = useState(false);
-
const handleInputChange = (changedValues, allValues) => {
setIsFormChanged(true);
setFormDetails({ ...formDetails, ...allValues });
@@ -102,6 +100,7 @@ const CreateApiDeploymentModal = ({
if (workflowId) {
// Update - can update workflow endpoint status in store
updateWorkflow({ allowChangeEndpoint: false });
+ setDeploymentName(body.display_name);
} else {
updateTableData();
setSelectedRow(res?.data);
@@ -252,6 +251,7 @@ CreateApiDeploymentModal.propTypes = {
setSelectedRow: PropTypes.func,
workflowId: PropTypes.string,
workflowEndpointList: PropTypes.object,
+ setDeploymentName: PropTypes.func,
};
export { CreateApiDeploymentModal };
diff --git a/frontend/src/components/pipelines-or-deployments/etl-task-deploy/EtlTaskDeploy.jsx b/frontend/src/components/pipelines-or-deployments/etl-task-deploy/EtlTaskDeploy.jsx
index b01b13c8a..1444c1971 100644
--- a/frontend/src/components/pipelines-or-deployments/etl-task-deploy/EtlTaskDeploy.jsx
+++ b/frontend/src/components/pipelines-or-deployments/etl-task-deploy/EtlTaskDeploy.jsx
@@ -39,6 +39,7 @@ const EtlTaskDeploy = ({
title,
setTableData,
workflowId,
+ setDeploymentName,
}) => {
const workflowStore = useWorkflowStore();
const { updateWorkflow } = workflowStore;
@@ -270,6 +271,7 @@ const EtlTaskDeploy = ({
if (workflowId) {
// Update - can update workflow endpoint status in store
updateWorkflow({ allowChangeEndpoint: false });
+ setDeploymentName(body.pipeline_name);
} else {
addPipeline(res?.data);
}
@@ -406,5 +408,6 @@ EtlTaskDeploy.propTypes = {
title: PropTypes.string.isRequired,
setTableData: PropTypes.func,
workflowId: PropTypes.string,
+ setDeploymentName: PropTypes.func,
};
export { EtlTaskDeploy };