mirror of
				https://github.com/open-metadata/OpenMetadata.git
				synced 2025-10-31 10:39:30 +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 { EntityType } from 'enums/entity.enum'; | ||||||
| import React, { ReactNode } from 'react'; | import React, { ReactNode } from 'react'; | ||||||
| import { getEntityLinkFromType } from 'utils/EntityUtils'; | import { getEntityLinkFromType } from 'utils/EntityUtils'; | ||||||
| import { getEncodedFqn } from 'utils/StringsUtils'; |  | ||||||
| import EntityHeaderTitle from '../EntityHeaderTitle/EntityHeaderTitle.component'; | import EntityHeaderTitle from '../EntityHeaderTitle/EntityHeaderTitle.component'; | ||||||
| 
 | 
 | ||||||
| interface Props { | interface Props { | ||||||
| @ -63,10 +62,7 @@ export const EntityHeader = ({ | |||||||
|         icon={icon} |         icon={icon} | ||||||
|         link={ |         link={ | ||||||
|           titleIsLink && entityData.fullyQualifiedName && entityType |           titleIsLink && entityData.fullyQualifiedName && entityType | ||||||
|             ? getEntityLinkFromType( |             ? getEntityLinkFromType(entityData.fullyQualifiedName, entityType) | ||||||
|                 getEncodedFqn(entityData.fullyQualifiedName), |  | ||||||
|                 entityType |  | ||||||
|               ) |  | ||||||
|             : undefined |             : undefined | ||||||
|         } |         } | ||||||
|         name={entityData.name} |         name={entityData.name} | ||||||
|  | |||||||
| @ -49,6 +49,7 @@ import { | |||||||
|   getLogsViewerPath, |   getLogsViewerPath, | ||||||
|   getTestSuiteIngestionPath, |   getTestSuiteIngestionPath, | ||||||
| } from 'utils/RouterUtils'; | } from 'utils/RouterUtils'; | ||||||
|  | import { getEncodedFqn } from 'utils/StringsUtils'; | ||||||
| import { showErrorToast, showSuccessToast } from 'utils/ToastUtils'; | import { showErrorToast, showSuccessToast } from 'utils/ToastUtils'; | ||||||
| 
 | 
 | ||||||
| interface Props { | interface Props { | ||||||
| @ -59,6 +60,7 @@ const TestSuitePipelineTab = ({ testSuite }: Props) => { | |||||||
|   const { isAirflowAvailable, isFetchingStatus } = useAirflowStatus(); |   const { isAirflowAvailable, isFetchingStatus } = useAirflowStatus(); | ||||||
|   const { t } = useTranslation(); |   const { t } = useTranslation(); | ||||||
|   const testSuiteFQN = testSuite?.fullyQualifiedName ?? testSuite?.name ?? ''; |   const testSuiteFQN = testSuite?.fullyQualifiedName ?? testSuite?.name ?? ''; | ||||||
|  | 
 | ||||||
|   const { permissions } = usePermissionProvider(); |   const { permissions } = usePermissionProvider(); | ||||||
|   const history = useHistory(); |   const history = useHistory(); | ||||||
| 
 | 
 | ||||||
| @ -452,8 +454,8 @@ const TestSuitePipelineTab = ({ testSuite }: Props) => { | |||||||
|                     onClick={() => { |                     onClick={() => { | ||||||
|                       history.push( |                       history.push( | ||||||
|                         getTestSuiteIngestionPath( |                         getTestSuiteIngestionPath( | ||||||
|                           testSuiteFQN, |                           getEncodedFqn(testSuiteFQN), | ||||||
|                           record.fullyQualifiedName |                           getEncodedFqn(record.fullyQualifiedName ?? '') | ||||||
|                         ) |                         ) | ||||||
|                       ); |                       ); | ||||||
|                     }}> |                     }}> | ||||||
| @ -518,7 +520,7 @@ const TestSuitePipelineTab = ({ testSuite }: Props) => { | |||||||
|                     to={getLogsViewerPath( |                     to={getLogsViewerPath( | ||||||
|                       EntityType.TEST_SUITE, |                       EntityType.TEST_SUITE, | ||||||
|                       record.service?.name || '', |                       record.service?.name || '', | ||||||
|                       record.fullyQualifiedName || '' |                       getEncodedFqn(record.fullyQualifiedName || '') | ||||||
|                     )}> |                     )}> | ||||||
|                     <Button |                     <Button | ||||||
|                       className="p-0" |                       className="p-0" | ||||||
| @ -576,7 +578,9 @@ const TestSuitePipelineTab = ({ testSuite }: Props) => { | |||||||
|               icon={<PlusOutlined />} |               icon={<PlusOutlined />} | ||||||
|               type="primary" |               type="primary" | ||||||
|               onClick={() => { |               onClick={() => { | ||||||
|                 history.push(getTestSuiteIngestionPath(testSuiteFQN)); |                 history.push( | ||||||
|  |                   getTestSuiteIngestionPath(getEncodedFqn(testSuiteFQN)) | ||||||
|  |                 ); | ||||||
|               }}> |               }}> | ||||||
|               {t('label.add')} |               {t('label.add')} | ||||||
|             </Button> |             </Button> | ||||||
|  | |||||||
| @ -25,6 +25,7 @@ import { useParams } from 'react-router-dom'; | |||||||
| import { getTestCaseByFqn } from 'rest/testAPI'; | import { getTestCaseByFqn } from 'rest/testAPI'; | ||||||
| import { getEntityName } from 'utils/EntityUtils'; | import { getEntityName } from 'utils/EntityUtils'; | ||||||
| import { getDataQualityPagePath } from 'utils/RouterUtils'; | import { getDataQualityPagePath } from 'utils/RouterUtils'; | ||||||
|  | import { getEncodedFqn } from 'utils/StringsUtils'; | ||||||
| import { getFormattedDateFromSeconds } from 'utils/TimeUtils'; | import { getFormattedDateFromSeconds } from 'utils/TimeUtils'; | ||||||
| import { showErrorToast } from 'utils/ToastUtils'; | import { showErrorToast } from 'utils/ToastUtils'; | ||||||
| import './TestCaseDetailsPage.style.less'; | import './TestCaseDetailsPage.style.less'; | ||||||
| @ -36,7 +37,7 @@ function TestCaseDetailsPage() { | |||||||
| 
 | 
 | ||||||
|   const fetchTestCaseData = async () => { |   const fetchTestCaseData = async () => { | ||||||
|     try { |     try { | ||||||
|       const response = await getTestCaseByFqn(testCaseFQN, { |       const response = await getTestCaseByFqn(getEncodedFqn(testCaseFQN), { | ||||||
|         fields: ['testSuite', 'testCaseResult'], |         fields: ['testSuite', 'testCaseResult'], | ||||||
|       }); |       }); | ||||||
|       setTestCaseData(response.data); |       setTestCaseData(response.data); | ||||||
|  | |||||||
| @ -24,6 +24,7 @@ import Fqn from './Fqn'; | |||||||
| import i18n from './i18next/LocalUtil'; | import i18n from './i18next/LocalUtil'; | ||||||
| import { getSettingsPathFromPipelineType } from './IngestionUtils'; | import { getSettingsPathFromPipelineType } from './IngestionUtils'; | ||||||
| import { getDataQualityPagePath, getLogEntityPath } from './RouterUtils'; | 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 |  * 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, |         name: ingestionDetails.name, | ||||||
|         url: |         url: | ||||||
|           getTableTabPath( |           getTableTabPath( | ||||||
|             (ingestionDetails.sourceConfig.config as ConfigClass) |             getEncodedFqn( | ||||||
|               ?.entityFullyQualifiedName ?? '', |               (ingestionDetails.sourceConfig.config as ConfigClass) | ||||||
|  |                 ?.entityFullyQualifiedName ?? '' | ||||||
|  |             ), | ||||||
|             EntityTabs.PROFILER |             EntityTabs.PROFILER | ||||||
|           ) + `?activeTab=${TableProfilerTab.DATA_QUALITY}`, |           ) + `?activeTab=${TableProfilerTab.DATA_QUALITY}`, | ||||||
|       }, |       }, | ||||||
| @ -87,7 +90,9 @@ export const getLogBreadCrumbs = ( | |||||||
|     return { |     return { | ||||||
|       name: index === 0 ? startCase(path) : path, |       name: index === 0 ? startCase(path) : path, | ||||||
|       url: |       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
	 Ashish Gupta
						Ashish Gupta