mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-09 09:02:12 +00:00
fix the redirect issue in DQ pipeline because of encoding (#12754)
This commit is contained in:
parent
f8048a6179
commit
9ae5efc352
@ -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}
|
||||
|
@ -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 || '')
|
||||
)}>
|
||||
<Button
|
||||
className="p-0"
|
||||
@ -576,7 +578,9 @@ const TestSuitePipelineTab = ({ testSuite }: Props) => {
|
||||
icon={<PlusOutlined />}
|
||||
type="primary"
|
||||
onClick={() => {
|
||||
history.push(getTestSuiteIngestionPath(testSuiteFQN));
|
||||
history.push(
|
||||
getTestSuiteIngestionPath(getEncodedFqn(testSuiteFQN))
|
||||
);
|
||||
}}>
|
||||
{t('label.add')}
|
||||
</Button>
|
||||
|
@ -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);
|
||||
|
@ -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)
|
||||
: '',
|
||||
};
|
||||
});
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user