LLM-Driven Extraction of Unstructured Data — Built for API Deployments & ETL Pipeline Workflows
Python ai-agentsdata-engineeringdocument-aigenerative-aiidpjson-extractionllmmcp-serverocrpdf-extractionprompt-engineeringstructured-output
[Feat] Improved simplified workflow connector UI and deployment options (#1472)
jagadeeswaran-zipstackd87ce32468d3
diff --git a/frontend/src/components/agency/agency/Agency.jsx b/frontend/src/components/agency/agency/Agency.jsxindex 13b6247ce..6c38331fa 100644--- a/frontend/src/components/agency/agency/Agency.jsx+++ b/frontend/src/components/agency/agency/Agency.jsx@@ -165,14 +165,9 @@ function Agency() {destination?.connection_type === "API";setApiOpsPresent(isApiOps);- // If API ops is enabled and other deployment types were selected, reset- if (- isApiOps &&- selectedDeploymentType &&- selectedDeploymentType !== "API"- ) {- setSelectedDeploymentType(null);- }+ // Clear deployment selection when connector types change+ // This ensures user has to re-select deployment type after changing connectors+ setSelectedDeploymentType(null);// Enable Deploy as Task Pipeline only when// destination connection_type is FILESYSTEM and Source & Destination are ConfiguredsetCanAddTaskPipeline(@@ -1049,13 +1044,22 @@ function Agency() {source,!allowChangeEndpoint);- return status.configured ? "✓" : "1";+ // Show connector type for non-API configured connectors+ if (+ status?.configured &&+ source?.connection_type &&+ source?.connection_type !== "API"+ ) {+ return source?.connection_type;+ }+ return status?.configured ? "✓" : "1";})()}title="Configure Source Connector"description="Select and configure your data input connector"type={sourceTypes.connectors[0]}endpointDetails={source}message={sourceMsg}+ connectorIcon={source?.connector_instance?.icon}/></Col>@@ -1067,13 +1071,22 @@ function Agency() {destination,!allowChangeEndpoint);- return status.configured ? "✓" : "2";+ // Show connector type for non-API configured connectors+ if (+ status?.configured &&+ destination?.connection_type &&+ destination?.connection_type !== "API"+ ) {+ return destination?.connection_type;+ }+ return status?.configured ? "✓" : "2";})()}title="Configure Output Destination"description="Select and configure your data output connector"type={sourceTypes.connectors[1]}endpointDetails={destination}message={destinationMsg}+ connectorIcon={destination?.connector_instance?.icon}/></Col><Col span={12}>@@ -1131,22 +1144,33 @@ function Agency() {<div className="workflow-card-content"><SelectclassName="workflow-select"- placeholder="Select Deployment Type"+ placeholder={+ !source?.connection_type ||+ !destination?.connection_type+ ? "Select both connectors first"+ : "Select Deployment Type"+ }value={deploymentInfo? deploymentInfo.type: selectedDeploymentType}onChange={handleDeploymentTypeChange}- disabled={deploymentInfo || !allowChangeEndpoint}- options={[- {- value: "API",- label: getDeploymentStatusText("API"),- disabled: false,- },- ...(apiOpsPresent && !deploymentInfo- ? []+ disabled={+ deploymentInfo ||+ !allowChangeEndpoint ||+ !source?.connection_type ||+ !destination?.connection_type+ }+ options={+ apiOpsPresent+ ? [+ {+ value: "API",+ label: getDeploymentStatusText("API"),+ disabled: false,+ },+ ]: [{value: "ETL",@@ -1158,15 +1182,17 @@ function Agency() {label: getDeploymentStatusText("TASK"),disabled: false,},- ]),- ]}+ ]+ }/><Buttontype="primary"disabled={deploymentInfo ||!allowChangeEndpoint ||- !selectedDeploymentType+ !selectedDeploymentType ||+ !source?.connection_type ||+ !destination?.connection_type}onClick={() =>selectedDeploymentType &&diff --git a/frontend/src/components/agency/configure-connector-modal/ConfigureConnectorModal.jsx b/frontend/src/components/agency/configure-connector-modal/ConfigureConnectorModal.jsxindex 00c46fd84..7eaeacee7 100644--- a/frontend/src/components/agency/configure-connector-modal/ConfigureConnectorModal.jsx+++ b/frontend/src/components/agency/configure-connector-modal/ConfigureConnectorModal.jsx@@ -231,13 +231,13 @@ ConfigureConnectorModal.propTypes = {setSelectedId: PropTypes.func.isRequired,handleUpdate: PropTypes.func.isRequired,filteredList: PropTypes.array,- connectorMetadata: PropTypes.object.isRequired,+ connectorMetadata: PropTypes.object,specConfig: PropTypes.object,formDataConfig: PropTypes.object,setFormDataConfig: PropTypes.func.isRequired,isSpecConfigLoading: PropTypes.bool.isRequired,connDetails: PropTypes.object,- connType: PropTypes.string.isRequired,+ connType: PropTypes.string,selectedItemName: PropTypes.string,setSelectedItemName: PropTypes.func.isRequired,workflowDetails: PropTypes.object,diff --git a/frontend/src/components/agency/configure-forms-layout/ConfigureFormsLayout.jsx b/frontend/src/components/agency/configure-forms-layout/ConfigureFormsLayout.jsxindex d423e39e1..d213fe89e 100644--- a/frontend/src/components/agency/configure-forms-layout/ConfigureFormsLayout.jsx+++ b/frontend/src/components/agency/configure-forms-layout/ConfigureFormsLayout.jsx@@ -82,7 +82,7 @@ ConfigureFormsLayout.propTypes = {type: PropTypes.string.isRequired,handleUpdate: PropTypes.func.isRequired,editItemId: PropTypes.string,- connectorMetadata: PropTypes.object.isRequired,+ connectorMetadata: PropTypes.object,isConnAvailable: PropTypes.bool.isRequired,specConfig: PropTypes.object,formDataConfig: PropTypes.object,diff --git a/frontend/src/components/agency/ds-settings-card/DsSettingsCard.jsx b/frontend/src/components/agency/ds-settings-card/DsSettingsCard.jsxindex 9555bee7d..c42e37c58 100644--- a/frontend/src/components/agency/ds-settings-card/DsSettingsCard.jsx+++ b/frontend/src/components/agency/ds-settings-card/DsSettingsCard.jsx@@ -332,9 +332,6 @@ function DsSettingsCard({ type, endpointDetails, message }) {// Generate configure button tooltip messageconst getConfigureTooltipMessage = () => {- if (!allowChangeEndpoint) {- return "Configuration disabled - Workflow is deployed";- }if (!endpointDetails?.connection_type) {return "Select the connector type from the dropdown";}@@ -376,8 +373,7 @@ function DsSettingsCard({ type, endpointDetails, message }) {disabled={!endpointDetails?.connection_type ||connType === "API" ||- connType === "APPDEPLOYMENT" ||- !allowChangeEndpoint+ connType === "APPDEPLOYMENT"}>Configurediff --git a/frontend/src/components/agency/workflow-card/WorkflowCard.css b/frontend/src/components/agency/workflow-card/WorkflowCard.cssindex 073b9ba34..4703883e8 100644--- a/frontend/src/components/agency/workflow-card/WorkflowCard.css+++ b/frontend/src/components/agency/workflow-card/WorkflowCard.css@@ -17,3 +17,16 @@.workflow-card-content > div {width: 100%;}++/* Connector type badge styling */+.connector-type-badge {+ font-size: 12px;+ font-weight: 600;+ text-transform: uppercase;+}++/* Connector icon styling */+.workflow-card-number .connector-icon {+ display: block;+ object-fit: contain;+}diff --git a/frontend/src/components/agency/workflow-card/WorkflowCard.jsx b/frontend/src/components/agency/workflow-card/WorkflowCard.jsxindex 26d160493..783f0a63d 100644--- a/frontend/src/components/agency/workflow-card/WorkflowCard.jsx+++ b/frontend/src/components/agency/workflow-card/WorkflowCard.jsx@@ -1,10 +1,69 @@import { CheckOutlined } from "@ant-design/icons";-import { Flex, Typography } from "antd";+import { Flex, Typography, Image } from "antd";import PropTypes from "prop-types";import { DsSettingsCard } from "../ds-settings-card/DsSettingsCard";import "./WorkflowCard.css";+// Constants for connector types+const CONNECTOR_TYPES = {+ FILESYSTEM: "FILESYSTEM",+ DATABASE: "DATABASE",+ MANUALREVIEW: "MANUALREVIEW",+ APPDEPLOYMENT: "APPDEPLOYMENT",+};++// Mapping for connector type abbreviations+const CONNECTOR_ABBREVIATIONS = {+ [CONNECTOR_TYPES.MANUALREVIEW]: "MR",+ [CONNECTOR_TYPES.APPDEPLOYMENT]: "AD",+};++// Helper functions to reduce complexity+const isStringType = (value) => typeof value === "string";+const isCompletedStatus = (number) =>+ isStringType(number) && number.startsWith("✓");+const isConnectorTypeStatus = (number) =>+ isStringType(number) && Object.values(CONNECTOR_TYPES).includes(number);+const isFileSystemOrDatabase = (number) =>+ number === CONNECTOR_TYPES.FILESYSTEM || number === CONNECTOR_TYPES.DATABASE;++// Render connector icon+const renderConnectorIcon = (connectorIcon) => (+ <Image+ src={connectorIcon}+ height={20}+ width={20}+ preview={false}+ className="connector-icon"+ />+);++// Render connector badge+const renderConnectorBadge = (number, stepNumber) => {+ const displayText = isFileSystemOrDatabase(number)+ ? stepNumber+ : CONNECTOR_ABBREVIATIONS[number] || number;++ return <span className="connector-type-badge">{displayText}</span>;+};++// Main function to render the number display+const renderNumberDisplay = (number, connectorIcon, stepNumber) => {+ if (isCompletedStatus(number)) {+ return <CheckOutlined />;+ }++ if (isConnectorTypeStatus(number)) {+ const hasIcon = connectorIcon && isFileSystemOrDatabase(number);+ return hasIcon+ ? renderConnectorIcon(connectorIcon)+ : renderConnectorBadge(number, stepNumber);+ }++ return number;+};+function WorkflowCard({number,title,@@ -13,17 +72,22 @@ function WorkflowCard({endpointDetails,message,customContent,+ connectorIcon,}) {- // Check if step is completed (number starts with ✓ or number is a specific completed indicator)- const isCompleted = typeof number === "string" && number.startsWith("✓");+ const isCompleted = isCompletedStatus(number);+ const isConnectorType = isConnectorTypeStatus(number);+ const stepNumber = title.includes("Source") ? "1" : "2";+ const showCompletedStyle = isCompleted || isConnectorType;return (<div className="workflow-card"><div className="workflow-card-header"><div- className={`workflow-card-number ${isCompleted ? "completed" : ""}`}+ className={`workflow-card-number ${+ showCompletedStyle ? "completed" : ""+ }`}>- {isCompleted ? <CheckOutlined /> : number}+ {renderNumberDisplay(number, connectorIcon, stepNumber)}</div><Flex vertical><div className="workflow-card-info">@@ -53,6 +117,7 @@ WorkflowCard.propTypes = {endpointDetails: PropTypes.object,message: PropTypes.string,customContent: PropTypes.node,+ connectorIcon: PropTypes.string,};export { WorkflowCard };diff --git a/frontend/src/components/common/PromptStudioModal.jsx b/frontend/src/components/common/PromptStudioModal.jsxindex b4ee1ba6b..606ac0b7b 100644--- a/frontend/src/components/common/PromptStudioModal.jsx+++ b/frontend/src/components/common/PromptStudioModal.jsx@@ -1,6 +1,7 @@import { Button, Modal } from "antd";import PropTypes from "prop-types";import { useNavigate } from "react-router-dom";+import { useSessionStore } from "../../store/session-store";import "./PromptStudioModal.css";@@ -63,9 +64,10 @@ export function PromptStudioModal({ onClose, showModal }) {PromptStudioModal.propTypes = {onClose: PropTypes.func,- showModal: PropTypes.bool.isRequired,+ showModal: PropTypes.bool,};PromptStudioModal.defaultProps = {onClose: null,+ showModal: false,};