This is an automated email from the ASF dual-hosted git repository.
ppawar pushed a commit to branch atlas-2.5
in repository https://gitbox.apache.org/repos/asf/atlas.git
The following commit(s) were added to refs/heads/atlas-2.5 by this push:
new ba7b17971 ATLAS-5192: Atlas React UI: Align Table tab relationship
search with Classic UI (#502) ( cherry-picked from
01f926bb3dd161d1b537120d188ea5f31ee28d5c)
ba7b17971 is described below
commit ba7b1797160df6acf3924209fe8ea9c11214f24c
Author: Prasad Pawar <[email protected]>
AuthorDate: Fri Jan 23 14:35:33 2026 +0530
ATLAS-5192: Atlas React UI: Align Table tab relationship search with
Classic UI (#502)
( cherry-picked from 01f926bb3dd161d1b537120d188ea5f31ee28d5c)
---
.../DetailPage/EntityDetailTabs/ProfileTab.tsx | 58 +++++++++++++---------
1 file changed, 34 insertions(+), 24 deletions(-)
diff --git a/dashboard/src/views/DetailPage/EntityDetailTabs/ProfileTab.tsx
b/dashboard/src/views/DetailPage/EntityDetailTabs/ProfileTab.tsx
index baea3e3c9..e446f78cc 100644
--- a/dashboard/src/views/DetailPage/EntityDetailTabs/ProfileTab.tsx
+++ b/dashboard/src/views/DetailPage/EntityDetailTabs/ProfileTab.tsx
@@ -79,46 +79,56 @@ const ProfileTab: React.FC<EntityDetailTabProps> = ({
entity }) => {
const fetchRelationShipResult = useCallback(
async ({
pagination,
- sorting
+ sorting: _sorting
}: {
pagination?: any;
sorting: [{ id: string; desc: boolean }];
}) => {
- if (!entity?.typeName) {
+ if (!entity?.typeName || !guid) {
return;
}
- const { pageSize, pageIndex } = pagination || {};
- const offsetParam = searchParams.get("pageOffset");
- const limitParam = searchParams.get("pageLimit");
- if (pageIndex > 1) {
- searchParams.set("pageOffset", `${pageSize + pageIndex}`);
- }
- let params: any = {
- order: sorting[0]?.desc == false ? "asc" : "desc",
- offset: !isEmpty(offsetParam) ? offsetParam : pageIndex + pageSize,
- limit: !isEmpty(limitParam) ? limitParam : pageSize,
- sort_by: sorting[0]?.id || "timestamp",
+ const { pageSize = 25, pageIndex = 0 } = pagination || {};
+ const includeDeletedEntities = searchParams.get("includeDE") === "true";
+ const baseParams = {
guid: guid,
- relation:
- entity?.typeName === "hive_db"
- ? "__hive_table.db"
- : "__hbase_table.namespace",
- sortBy: sorting[0]?.id || "name",
- sortOrder: sorting[0]?.desc == false ? "ASCENDING" : "DESCENDING",
- excludeDeletedEntities: !isEmpty(searchParams.get("includeDE"))
- ? !searchParams.get("includeDE")
- : true,
+ limit: pageSize,
+ offset: pageIndex * pageSize,
+ sortBy: "name",
+ sortOrder: "ASCENDING",
+ excludeDeletedEntities: !includeDeletedEntities,
includeSubClassifications: true,
includeSubTypes: true,
includeClassificationAttributes: true
};
+ const relationList =
+ entity?.typeName === "hive_db"
+ ? ["__hive_table.db", "__iceberg_table.db"]
+ : entity?.typeName === "hbase_namespace"
+ ? ["__hbase_table.namespace"]
+ : [];
dispatch({ type: "request" });
try {
- let searchResp = await getRelationShip({ params: params });
+ const responses = await Promise.all(
+ relationList.map((relation) =>
+ getRelationShip({
+ params: {
+ ...baseParams,
+ relation
+ }
+ })
+ )
+ );
+ const mergedEntities = responses.flatMap(
+ (resp) => resp?.data?.entities || []
+ );
+ const uniqueEntities = mergedEntities.filter(
+ (entityObj, index, arr) =>
+ arr.findIndex((item) => item.guid === entityObj.guid) === index
+ );
dispatch({
type: "success",
- respData: searchResp.data.entities
+ respData: uniqueEntities
});
} catch (error: any) {
console.error("Error fetching data:",
error.response.data.errorMessage);