mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-26 01:15:08 +00:00
fix(ui): redirection issue of frequently join column (#12749)
This commit is contained in:
parent
146d8a5166
commit
f8048a6179
@ -125,6 +125,15 @@ const TableDetailsPageV1 = () => {
|
|||||||
() => tablePermissions.ViewAll || tablePermissions.ViewTests,
|
() => tablePermissions.ViewAll || tablePermissions.ViewTests,
|
||||||
[tablePermissions]
|
[tablePermissions]
|
||||||
);
|
);
|
||||||
|
const tableFqn = useMemo(
|
||||||
|
() =>
|
||||||
|
getPartialNameFromTableFQN(
|
||||||
|
datasetFQN,
|
||||||
|
[FqnPart.Service, FqnPart.Database, FqnPart.Schema, FqnPart.Table],
|
||||||
|
FQN_SEPARATOR_CHAR
|
||||||
|
),
|
||||||
|
[datasetFQN]
|
||||||
|
);
|
||||||
|
|
||||||
const fetchTableDetails = async () => {
|
const fetchTableDetails = async () => {
|
||||||
setLoading(true);
|
setLoading(true);
|
||||||
@ -136,7 +145,7 @@ const TableDetailsPageV1 = () => {
|
|||||||
if (viewTestSuitePermission) {
|
if (viewTestSuitePermission) {
|
||||||
fields += `,${TabSpecificField.TESTSUITE}`;
|
fields += `,${TabSpecificField.TESTSUITE}`;
|
||||||
}
|
}
|
||||||
const details = await getTableDetailsByFQN(datasetFQN, fields);
|
const details = await getTableDetailsByFQN(tableFqn, fields);
|
||||||
|
|
||||||
setTableDetails(details);
|
setTableDetails(details);
|
||||||
addToRecentViewed({
|
addToRecentViewed({
|
||||||
@ -248,11 +257,11 @@ const TableDetailsPageV1 = () => {
|
|||||||
const { getEntityPermissionByFqn } = usePermissionProvider();
|
const { getEntityPermissionByFqn } = usePermissionProvider();
|
||||||
|
|
||||||
const fetchResourcePermission = useCallback(
|
const fetchResourcePermission = useCallback(
|
||||||
async (datasetFQN) => {
|
async (tableFqn) => {
|
||||||
try {
|
try {
|
||||||
const tablePermission = await getEntityPermissionByFqn(
|
const tablePermission = await getEntityPermissionByFqn(
|
||||||
ResourceEntity.TABLE,
|
ResourceEntity.TABLE,
|
||||||
datasetFQN
|
tableFqn
|
||||||
);
|
);
|
||||||
|
|
||||||
setTablePermissions(tablePermission);
|
setTablePermissions(tablePermission);
|
||||||
@ -270,15 +279,15 @@ const TableDetailsPageV1 = () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (datasetFQN) {
|
if (tableFqn) {
|
||||||
fetchResourcePermission(datasetFQN);
|
fetchResourcePermission(tableFqn);
|
||||||
}
|
}
|
||||||
}, [datasetFQN]);
|
}, [tableFqn]);
|
||||||
|
|
||||||
const getEntityFeedCount = () => {
|
const getEntityFeedCount = () => {
|
||||||
getFeedCounts(
|
getFeedCounts(
|
||||||
EntityType.TABLE,
|
EntityType.TABLE,
|
||||||
datasetFQN,
|
tableFqn,
|
||||||
setEntityFieldThreadCount,
|
setEntityFieldThreadCount,
|
||||||
setFeedCount
|
setFeedCount
|
||||||
);
|
);
|
||||||
@ -287,7 +296,7 @@ const TableDetailsPageV1 = () => {
|
|||||||
const handleTabChange = (activeKey: string) => {
|
const handleTabChange = (activeKey: string) => {
|
||||||
if (activeKey !== activeTab) {
|
if (activeKey !== activeTab) {
|
||||||
if (!isTourOpen) {
|
if (!isTourOpen) {
|
||||||
history.push(getTableTabPath(datasetFQN, activeKey));
|
history.push(getTableTabPath(tableFqn, activeKey));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
@ -437,7 +446,7 @@ const TableDetailsPageV1 = () => {
|
|||||||
EntityField.DESCRIPTION,
|
EntityField.DESCRIPTION,
|
||||||
entityFieldThreadCount
|
entityFieldThreadCount
|
||||||
)}
|
)}
|
||||||
entityFqn={datasetFQN}
|
entityFqn={tableFqn}
|
||||||
entityName={entityName}
|
entityName={entityName}
|
||||||
entityType={EntityType.TABLE}
|
entityType={EntityType.TABLE}
|
||||||
hasEditAccess={
|
hasEditAccess={
|
||||||
@ -453,7 +462,7 @@ const TableDetailsPageV1 = () => {
|
|||||||
/>
|
/>
|
||||||
<SchemaTab
|
<SchemaTab
|
||||||
columnName={getPartialNameFromTableFQN(
|
columnName={getPartialNameFromTableFQN(
|
||||||
datasetFQN,
|
tableFqn,
|
||||||
[FqnPart['Column']],
|
[FqnPart['Column']],
|
||||||
FQN_SEPARATOR_CHAR
|
FQN_SEPARATOR_CHAR
|
||||||
)}
|
)}
|
||||||
@ -462,7 +471,7 @@ const TableDetailsPageV1 = () => {
|
|||||||
EntityField.COLUMNS,
|
EntityField.COLUMNS,
|
||||||
entityFieldThreadCount
|
entityFieldThreadCount
|
||||||
)}
|
)}
|
||||||
entityFqn={datasetFQN}
|
entityFqn={tableFqn}
|
||||||
hasDescriptionEditAccess={
|
hasDescriptionEditAccess={
|
||||||
tablePermissions.EditAll || tablePermissions.EditDescription
|
tablePermissions.EditAll || tablePermissions.EditDescription
|
||||||
}
|
}
|
||||||
@ -490,7 +499,7 @@ const TableDetailsPageV1 = () => {
|
|||||||
<Space className="w-full" direction="vertical" size="large">
|
<Space className="w-full" direction="vertical" size="large">
|
||||||
<TagsContainerV2
|
<TagsContainerV2
|
||||||
displayType={DisplayType.READ_MORE}
|
displayType={DisplayType.READ_MORE}
|
||||||
entityFqn={datasetFQN}
|
entityFqn={tableFqn}
|
||||||
entityThreadLink={getEntityThreadLink(entityFieldThreadCount)}
|
entityThreadLink={getEntityThreadLink(entityFieldThreadCount)}
|
||||||
entityType={EntityType.TABLE}
|
entityType={EntityType.TABLE}
|
||||||
permission={
|
permission={
|
||||||
@ -505,7 +514,7 @@ const TableDetailsPageV1 = () => {
|
|||||||
|
|
||||||
<TagsContainerV2
|
<TagsContainerV2
|
||||||
displayType={DisplayType.READ_MORE}
|
displayType={DisplayType.READ_MORE}
|
||||||
entityFqn={datasetFQN}
|
entityFqn={tableFqn}
|
||||||
entityThreadLink={getEntityThreadLink(entityFieldThreadCount)}
|
entityThreadLink={getEntityThreadLink(entityFieldThreadCount)}
|
||||||
entityType={EntityType.TABLE}
|
entityType={EntityType.TABLE}
|
||||||
permission={
|
permission={
|
||||||
@ -821,7 +830,7 @@ const TableDetailsPageV1 = () => {
|
|||||||
|
|
||||||
const versionHandler = useCallback(() => {
|
const versionHandler = useCallback(() => {
|
||||||
version &&
|
version &&
|
||||||
history.push(getVersionPath(EntityType.TABLE, datasetFQN, version + ''));
|
history.push(getVersionPath(EntityType.TABLE, tableFqn, version + ''));
|
||||||
}, [version]);
|
}, [version]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@ -833,7 +842,7 @@ const TableDetailsPageV1 = () => {
|
|||||||
getEntityFeedCount();
|
getEntityFeedCount();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, [datasetFQN, isTourOpen, isTourPage, tablePermissions]);
|
}, [tableFqn, isTourOpen, isTourPage, tablePermissions]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (tableDetails) {
|
if (tableDetails) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user