diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Entity/EntityHeader/EntityHeader.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Entity/EntityHeader/EntityHeader.component.tsx index d583c55a5de..92ad2cfc7e8 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Entity/EntityHeader/EntityHeader.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Entity/EntityHeader/EntityHeader.component.tsx @@ -17,7 +17,6 @@ import { TitleBreadcrumbProps } from 'components/common/title-breadcrumb/title-b import { EntityType } from 'enums/entity.enum'; import React, { ReactNode } from 'react'; import { getEntityLinkFromType } from 'utils/EntityUtils'; -import { getEncodedFqn } from 'utils/StringsUtils'; import EntityHeaderTitle from '../EntityHeaderTitle/EntityHeaderTitle.component'; interface Props { @@ -63,10 +62,7 @@ export const EntityHeader = ({ icon={icon} link={ titleIsLink && entityData.fullyQualifiedName && entityType - ? getEntityLinkFromType( - getEncodedFqn(entityData.fullyQualifiedName), - entityType - ) + ? getEntityLinkFromType(entityData.fullyQualifiedName, entityType) : undefined } name={entityData.name} diff --git a/openmetadata-ui/src/main/resources/ui/src/components/TestSuite/TestSuitePipelineTab/TestSuitePipelineTab.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/TestSuite/TestSuitePipelineTab/TestSuitePipelineTab.component.tsx index 3b06194c747..b1351d9e43f 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/TestSuite/TestSuitePipelineTab/TestSuitePipelineTab.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/TestSuite/TestSuitePipelineTab/TestSuitePipelineTab.component.tsx @@ -49,6 +49,7 @@ import { getLogsViewerPath, getTestSuiteIngestionPath, } from 'utils/RouterUtils'; +import { getEncodedFqn } from 'utils/StringsUtils'; import { showErrorToast, showSuccessToast } from 'utils/ToastUtils'; interface Props { @@ -59,6 +60,7 @@ const TestSuitePipelineTab = ({ testSuite }: Props) => { const { isAirflowAvailable, isFetchingStatus } = useAirflowStatus(); const { t } = useTranslation(); const testSuiteFQN = testSuite?.fullyQualifiedName ?? testSuite?.name ?? ''; + const { permissions } = usePermissionProvider(); const history = useHistory(); @@ -452,8 +454,8 @@ const TestSuitePipelineTab = ({ testSuite }: Props) => { onClick={() => { history.push( getTestSuiteIngestionPath( - testSuiteFQN, - record.fullyQualifiedName + getEncodedFqn(testSuiteFQN), + getEncodedFqn(record.fullyQualifiedName ?? '') ) ); }}> @@ -518,7 +520,7 @@ const TestSuitePipelineTab = ({ testSuite }: Props) => { to={getLogsViewerPath( EntityType.TEST_SUITE, record.service?.name || '', - record.fullyQualifiedName || '' + getEncodedFqn(record.fullyQualifiedName || '') )}> diff --git a/openmetadata-ui/src/main/resources/ui/src/pages/TestCaseDetailsPage/TestCaseDetailsPage.component.tsx b/openmetadata-ui/src/main/resources/ui/src/pages/TestCaseDetailsPage/TestCaseDetailsPage.component.tsx index 42bd0c08286..04119a150ac 100644 --- a/openmetadata-ui/src/main/resources/ui/src/pages/TestCaseDetailsPage/TestCaseDetailsPage.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/pages/TestCaseDetailsPage/TestCaseDetailsPage.component.tsx @@ -25,6 +25,7 @@ import { useParams } from 'react-router-dom'; import { getTestCaseByFqn } from 'rest/testAPI'; import { getEntityName } from 'utils/EntityUtils'; import { getDataQualityPagePath } from 'utils/RouterUtils'; +import { getEncodedFqn } from 'utils/StringsUtils'; import { getFormattedDateFromSeconds } from 'utils/TimeUtils'; import { showErrorToast } from 'utils/ToastUtils'; import './TestCaseDetailsPage.style.less'; @@ -36,7 +37,7 @@ function TestCaseDetailsPage() { const fetchTestCaseData = async () => { try { - const response = await getTestCaseByFqn(testCaseFQN, { + const response = await getTestCaseByFqn(getEncodedFqn(testCaseFQN), { fields: ['testSuite', 'testCaseResult'], }); setTestCaseData(response.data); diff --git a/openmetadata-ui/src/main/resources/ui/src/utils/LogsViewer.utils.ts b/openmetadata-ui/src/main/resources/ui/src/utils/LogsViewer.utils.ts index 148f16efd7a..fce4a4dac0a 100644 --- a/openmetadata-ui/src/main/resources/ui/src/utils/LogsViewer.utils.ts +++ b/openmetadata-ui/src/main/resources/ui/src/utils/LogsViewer.utils.ts @@ -24,6 +24,7 @@ import Fqn from './Fqn'; import i18n from './i18next/LocalUtil'; import { getSettingsPathFromPipelineType } from './IngestionUtils'; import { getDataQualityPagePath, getLogEntityPath } from './RouterUtils'; +import { getEncodedFqn } from './StringsUtils'; /** * It takes in a service type, an ingestion name, and an ingestion details object, and returns an array @@ -69,8 +70,10 @@ export const getLogBreadCrumbs = ( name: ingestionDetails.name, url: getTableTabPath( - (ingestionDetails.sourceConfig.config as ConfigClass) - ?.entityFullyQualifiedName ?? '', + getEncodedFqn( + (ingestionDetails.sourceConfig.config as ConfigClass) + ?.entityFullyQualifiedName ?? '' + ), EntityTabs.PROFILER ) + `?activeTab=${TableProfilerTab.DATA_QUALITY}`, }, @@ -87,7 +90,9 @@ export const getLogBreadCrumbs = ( return { name: index === 0 ? startCase(path) : path, url: - index !== urlPath.length - 1 ? getLogEntityPath(path, serviceType) : '', + index !== urlPath.length - 1 + ? getLogEntityPath(getEncodedFqn(path), serviceType) + : '', }; }); };