diff --git a/app/client/src/PluginActionEditor/components/PluginActionForm/components/UQIEditor/FormRender.tsx b/app/client/src/PluginActionEditor/components/PluginActionForm/components/UQIEditor/FormRender.tsx
index 644c090f73a8..68bad7447554 100644
--- a/app/client/src/PluginActionEditor/components/PluginActionForm/components/UQIEditor/FormRender.tsx
+++ b/app/client/src/PluginActionEditor/components/PluginActionForm/components/UQIEditor/FormRender.tsx
@@ -183,6 +183,7 @@ const FormRender = (props: Props) => {
@@ -221,7 +222,11 @@ const FormRender = (props: Props) => {
? "single_column"
: "double_column";
- return {children};
+ return (
+
+ {children}
+
+ );
}
default:
return children;
diff --git a/app/client/src/components/formControls/DatasourceLinkControl.tsx b/app/client/src/components/formControls/DatasourceLinkControl.tsx
new file mode 100644
index 000000000000..884c7ea15262
--- /dev/null
+++ b/app/client/src/components/formControls/DatasourceLinkControl.tsx
@@ -0,0 +1,59 @@
+import React, { useCallback } from "react";
+import omit from "lodash/omit";
+import history from "utils/history";
+import { Button, type ButtonProps } from "@appsmith/ads";
+import type { ControlType } from "constants/PropertyControlConstants";
+
+import BaseControl from "./BaseControl";
+import type { ControlProps } from "./BaseControl";
+import { useParentEntityInfo } from "ee/IDE/hooks/useParentEntityInfo";
+import { getIDETypeByUrl } from "ee/entities/IDE/utils";
+import { datasourcesEditorIdURL } from "ee/RouteBuilder";
+import { getQueryParams } from "utils/URLUtils";
+
+export interface DatasourceLinkControlProps extends ControlProps {
+ href: string;
+ text: string;
+ size?: ButtonProps["size"];
+ kind?: ButtonProps["kind"];
+ icon?: ButtonProps["startIcon"];
+}
+
+class DatasourceLinkControl extends BaseControl {
+ getControlType(): ControlType {
+ return "DATASOURCE_LINK";
+ }
+ render() {
+ return ;
+ }
+}
+
+function DatasourceLink(props: DatasourceLinkControlProps) {
+ const { icon, kind = "secondary", size = "sm", text } = props;
+ const ideType = getIDETypeByUrl(location.pathname);
+ const { parentEntityId } = useParentEntityInfo(ideType);
+
+ const onPress = useCallback(() => {
+ const url = datasourcesEditorIdURL({
+ baseParentEntityId: parentEntityId,
+ datasourceId: props.datasourceId as string,
+ params: { ...omit(getQueryParams(), "viewMode"), viewMode: false },
+ });
+
+ history.push(url);
+ }, [parentEntityId, props.datasourceId]);
+
+ return (
+
+ );
+}
+
+export { DatasourceLinkControl };
diff --git a/app/client/src/components/formControls/FunctionCallingConfigControl/components/FunctionCallingConfigForm.tsx b/app/client/src/components/formControls/FunctionCallingConfigControl/components/FunctionCallingConfigForm.tsx
index 26a7cf0e05d7..20054d4c3a88 100644
--- a/app/client/src/components/formControls/FunctionCallingConfigControl/components/FunctionCallingConfigForm.tsx
+++ b/app/client/src/components/formControls/FunctionCallingConfigControl/components/FunctionCallingConfigForm.tsx
@@ -59,6 +59,7 @@ export const FunctionCallingConfigForm = ({
;
+ },
+ },
+ );
}
}
diff --git a/app/client/src/utils/formControl/formControlTypes.ts b/app/client/src/utils/formControl/formControlTypes.ts
index 86554014d3e7..ba8143bc89dc 100644
--- a/app/client/src/utils/formControl/formControlTypes.ts
+++ b/app/client/src/utils/formControl/formControlTypes.ts
@@ -24,4 +24,5 @@ export default {
RAG_DOCUMENTS_SELECTOR: "RAG_DOCUMENTS_SELECTOR",
HYBRID_SEARCH: "HYBRID_SEARCH",
FUNCTION_CALLING_CONFIG_FORM: "FUNCTION_CALLING_CONFIG_FORM",
+ DATASOURCE_LINK: "DATASOURCE_LINK",
};