Skip to content

Commit

Permalink
Fix the data source URL reference
Browse files Browse the repository at this point in the history
Signed-off-by: Kapian1234 <[email protected]>
  • Loading branch information
Kapian1234 committed Sep 5, 2024
1 parent 5c8d72f commit 46e78c3
Showing 1 changed file with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
<EuiLink href={url} className="eui-textTruncate">
Expand Down

0 comments on commit 46e78c3

Please sign in to comment.