Skip to content

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

Disabled few connectors and tagged coming soon (#174)

jagadeeswaran-zipstack69534c497013
diff --git a/frontend/src/assets/coming-soon.png b/frontend/src/assets/coming-soon.png
new file mode 100644
index 000000000..f1161bb9e
Binary files /dev/null and b/frontend/src/assets/coming-soon.png differ
diff --git a/frontend/src/components/agency/ds-settings-card/DsSettingsCard.jsx b/frontend/src/components/agency/ds-settings-card/DsSettingsCard.jsx
index 983813abd..0e1de04e5 100644
--- a/frontend/src/components/agency/ds-settings-card/DsSettingsCard.jsx
+++ b/frontend/src/components/agency/ds-settings-card/DsSettingsCard.jsx
@@ -48,6 +48,24 @@ const inputOptions = [
},
];
+const disabledIdsByType = {
+ FILE_SYSTEM: [
+ "box|4d94d237-ce4b-45d8-8f34-ddeefc37c0bf",
+ "google_cloud_storage|109bbe7b-8861-45eb-8841-7244e833d97b",
+ "azure_cloud_storage|1476a54a-ed17-4a01-9f8f-cb7e4cf91c8a",
+ "http|6fdea346-86e4-4383-9a21-132db7c9a576",
+ ],
+ DATABASE: [
+ "mariadb|146b0124-b9fc-466f-8e68-098ff60703e8",
+ "mysql|db709852-fa51-4aa6-9b91-afc45f111bec",
+ "mssql|6c6af35c-9498-4bd6-9258-23b5337e068b",
+ ],
+};
+
+const needToRemove = {
+ FILE_SYSTEM: ["pcs|b8cd25cd-4452-4d54-bd5e-e7d71459b702"],
+};
+
function DsSettingsCard({ type, endpointDetails, message }) {
const workflowStore = useWorkflowStore();
const { source, destination, allowChangeEndpoint } = workflowStore;
@@ -126,7 +144,16 @@ function DsSettingsCard({ type, endpointDetails, message }) {
) {
return;
}
- menuItems.push(getMenuItem(item?.name, item?.id, sourceIcon(item?.icon)));
+ menuItems.push(
+ getMenuItem(
+ item?.name,
+ item?.id,
+ sourceIcon(item?.icon),
+ undefined,
+ undefined,
+ item?.isDisabled
+ )
+ );
});
setSelectedId("");
setFilteredList(menuItems);
@@ -169,8 +196,26 @@ function DsSettingsCard({ type, endpointDetails, message }) {
axiosPrivate(requestOptions)
.then((res) => {
- const data = res?.data;
- setListOfConnectors(data || []);
+ let data = res?.data;
+ // Remove items specified in needToRemove from data
+ Object.keys(needToRemove).forEach((mode) => {
+ const idsToRemove = needToRemove[mode];
+ data = data.filter(
+ (source) =>
+ !(
+ source.connector_mode === mode &&
+ idsToRemove.includes(source.id)
+ )
+ );
+ });
+
+ const updatedSources = data?.map((source) => ({
+ ...source,
+ isDisabled: disabledIdsByType[source?.connector_mode]?.includes(
+ source?.id
+ ),
+ }));
+ setListOfConnectors(updatedSources || []);
})
.catch((err) => {
setAlertDetails(handleException(err));
diff --git a/frontend/src/components/agency/list-of-connectors/ListOfConnectors.css b/frontend/src/components/agency/list-of-connectors/ListOfConnectors.css
new file mode 100644
index 000000000..c506b8df0
--- /dev/null
+++ b/frontend/src/components/agency/list-of-connectors/ListOfConnectors.css
@@ -0,0 +1,13 @@
+.coming-soon-img {
+ position: absolute;
+ top: 0;
+ right: 0;
+ width: 40px;
+ height: 40px;
+}
+
+.coming-soon-container {
+ position: relative;
+ display: inline-block;
+ width: 100%;
+}
diff --git a/frontend/src/components/agency/list-of-connectors/ListOfConnectors.jsx b/frontend/src/components/agency/list-of-connectors/ListOfConnectors.jsx
index 6500d73dd..96a5aee33 100644
--- a/frontend/src/components/agency/list-of-connectors/ListOfConnectors.jsx
+++ b/frontend/src/components/agency/list-of-connectors/ListOfConnectors.jsx
@@ -1,5 +1,7 @@
-import { Menu } from "antd";
+import { Menu, Tooltip } from "antd";
import PropTypes from "prop-types";
+import comingSoon from "../../../assets/coming-soon.png";
+import "./ListOfConnectors.css";
function ListOfConnectors({ listOfConnectors, selectedId, handleSelectItem }) {
return (
@@ -9,7 +11,28 @@ function ListOfConnectors({ listOfConnectors, selectedId, handleSelectItem }) {
style={{ border: 0 }}
selectedKeys={[selectedId]}
mode="inline"
- items={listOfConnectors}
+ items={listOfConnectors.map((item) => ({
+ label: (
+ <>
+ {item?.isDisabled ? (
+ <Tooltip title="Coming Soon">
+ <div className="coming-soon-container">
+ <img
+ src={comingSoon}
+ alt="Coming Soon"
+ className="coming-soon-img"
+ />
+ {item?.label}
+ </div>
+ </Tooltip>
+ ) : (
+ item?.label
+ )}
+ </>
+ ),
+ disabled: item?.isDisabled,
+ icon: item?.icon,
+ }))}
onClick={handleSelectItem}
/>
</div>
diff --git a/frontend/src/components/input-output/data-source-card/DataSourceCard.css b/frontend/src/components/input-output/data-source-card/DataSourceCard.css
index 6f4e8d015..2658f1b1a 100644
--- a/frontend/src/components/input-output/data-source-card/DataSourceCard.css
+++ b/frontend/src/components/input-output/data-source-card/DataSourceCard.css
@@ -45,6 +45,9 @@
.cover-img {
position: relative;
z-index: 0;
+ align-items: center;
+ display: flex;
+ justify-content: center;
}
.ds-card.disabled {
diff --git a/frontend/src/components/input-output/data-source-card/DataSourceCard.jsx b/frontend/src/components/input-output/data-source-card/DataSourceCard.jsx
index 6286dc334..0f0c48ad6 100644
--- a/frontend/src/components/input-output/data-source-card/DataSourceCard.jsx
+++ b/frontend/src/components/input-output/data-source-card/DataSourceCard.jsx
@@ -24,7 +24,7 @@ function DataSourceCard({ srcDetails, setSelectedSourceId }) {
<div className="cover-img">
<Image
src={srcDetails?.icon}
- width="100%"
+ width="80%"
height="auto"
preview={false}
/>
diff --git a/frontend/src/components/input-output/list-of-sources/ListOfSources.jsx b/frontend/src/components/input-output/list-of-sources/ListOfSources.jsx
index b4243f964..d9a989bf1 100644
--- a/frontend/src/components/input-output/list-of-sources/ListOfSources.jsx
+++ b/frontend/src/components/input-output/list-of-sources/ListOfSources.jsx
@@ -29,6 +29,10 @@ function ListOfSources({ setSelectedSourceId, type }) {
"replicate|2715ce84-05af-4ab4-b8e9-67ac3211b81e",
"anthropic|90ebd4cd-2f19-4cef-a884-9eeb6ac0f203",
],
+ X2TEXT: [
+ "unstructuredenterprise|eb1b6c58-221f-4db0-a4a5-e5f9cdca44e1",
+ "unstructuredcommunity|eeed506f-1875-457f-9101-846fc7115676",
+ ],
};
useEffect(() => {
diff --git a/frontend/src/helpers/GetStaticData.js b/frontend/src/helpers/GetStaticData.js
index 53be3f7b9..074b24b58 100644
--- a/frontend/src/helpers/GetStaticData.js
+++ b/frontend/src/helpers/GetStaticData.js
@@ -364,13 +364,14 @@ const titleCase = (str) => {
return words.join(" ");
};
-const getMenuItem = (label, key, icon, children, type) => {
+const getMenuItem = (label, key, icon, children, type, isDisabled) => {
return {
key,
icon,
children,
label,
type,
+ isDisabled,
};
};