From 46e78c301f748607526390c0bef16538181368e3 Mon Sep 17 00:00:00 2001 From: Kapian1234 Date: Thu, 5 Sep 2024 11:45:35 +0800 Subject: [PATCH] Fix the data source URL reference Signed-off-by: Kapian1234 --- .../workspace_form/data_source_connection_table.tsx | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/plugins/workspace/public/components/workspace_form/data_source_connection_table.tsx b/src/plugins/workspace/public/components/workspace_form/data_source_connection_table.tsx index 7443cbb63f88..221fa44d7fdd 100644 --- a/src/plugins/workspace/public/components/workspace_form/data_source_connection_table.tsx +++ b/src/plugins/workspace/public/components/workspace_form/data_source_connection_table.tsx @@ -114,18 +114,13 @@ export const DataSourceConnectionTable = ({ }), truncateText: true, render: (name: string, record) => { - const origin = window.location.origin; - const basePath = http.basePath.serverBasePath; let url: string; if (record.connectionType === DataSourceConnectionType.OpenSearchConnection) { - url = http.basePath.prepend(`/app/dataSources/${record.id}`, { - withoutClientBasePath: true, - }); + url = http.basePath.prepend(`/app/dataSources/${record.id}`); } else { - url = `${origin}${basePath}/app/dataSources/manage/${name}?dataSourceMDSId=${record.parentId}`; - url = http.basePath.prepend(`/app/dataSources/${record.id}`, { - withoutClientBasePath: true, - }); + url = http.basePath.prepend( + `/app/dataSources/manage/${name}?dataSourceMDSId=${record.parentId}` + ); } return (