mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-02 06:08:01 +00:00
MINOR: fix ui bugs (#14263)
This commit is contained in:
parent
566c36b7f3
commit
add00e54cb
@ -26,6 +26,7 @@ import Users from './Users.component';
|
|||||||
import { UserPageTabs } from './Users.interface';
|
import { UserPageTabs } from './Users.interface';
|
||||||
|
|
||||||
const mockParams = {
|
const mockParams = {
|
||||||
|
fqn: 'test',
|
||||||
tab: UserPageTabs.ACTIVITY,
|
tab: UserPageTabs.ACTIVITY,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -140,7 +141,6 @@ jest.mock('../common/EntityDescription/Description', () => {
|
|||||||
const updateUserDetails = jest.fn();
|
const updateUserDetails = jest.fn();
|
||||||
|
|
||||||
const mockProp = {
|
const mockProp = {
|
||||||
username: 'test',
|
|
||||||
queryFilters: {
|
queryFilters: {
|
||||||
myData: 'my-data',
|
myData: 'my-data',
|
||||||
following: 'following',
|
following: 'following',
|
||||||
|
@ -30,6 +30,7 @@ import { useAuth } from '../../hooks/authHooks';
|
|||||||
import { searchData } from '../../rest/miscAPI';
|
import { searchData } from '../../rest/miscAPI';
|
||||||
import { getEntityName } from '../../utils/EntityUtils';
|
import { getEntityName } from '../../utils/EntityUtils';
|
||||||
import { DEFAULT_ENTITY_PERMISSION } from '../../utils/PermissionsUtils';
|
import { DEFAULT_ENTITY_PERMISSION } from '../../utils/PermissionsUtils';
|
||||||
|
import { getDecodedFqn } from '../../utils/StringsUtils';
|
||||||
import { useAuthContext } from '../Auth/AuthProviders/AuthProvider';
|
import { useAuthContext } from '../Auth/AuthProviders/AuthProvider';
|
||||||
import Chip from '../common/Chip/Chip.component';
|
import Chip from '../common/Chip/Chip.component';
|
||||||
import DescriptionV1 from '../common/EntityDescription/DescriptionV1';
|
import DescriptionV1 from '../common/EntityDescription/DescriptionV1';
|
||||||
@ -49,20 +50,17 @@ import UserProfileInheritedRoles from './UsersProfile/UserProfileInheritedRoles/
|
|||||||
import UserProfileRoles from './UsersProfile/UserProfileRoles/UserProfileRoles.component';
|
import UserProfileRoles from './UsersProfile/UserProfileRoles/UserProfileRoles.component';
|
||||||
import UserProfileTeams from './UsersProfile/UserProfileTeams/UserProfileTeams.component';
|
import UserProfileTeams from './UsersProfile/UserProfileTeams/UserProfileTeams.component';
|
||||||
|
|
||||||
const Users = ({
|
const Users = ({ userData, queryFilters, updateUserDetails }: Props) => {
|
||||||
userData,
|
const { fqn: username, tab: activeTab = UserPageTabs.ACTIVITY } =
|
||||||
username,
|
useParams<{ fqn: string; tab: UserPageTabs }>();
|
||||||
queryFilters,
|
|
||||||
updateUserDetails,
|
|
||||||
}: Props) => {
|
|
||||||
const { tab: activeTab = UserPageTabs.ACTIVITY } =
|
|
||||||
useParams<{ tab: UserPageTabs }>();
|
|
||||||
const [assetCount, setAssetCount] = useState<number>(0);
|
const [assetCount, setAssetCount] = useState<number>(0);
|
||||||
const { isAdminUser } = useAuth();
|
const { isAdminUser } = useAuth();
|
||||||
const history = useHistory();
|
const history = useHistory();
|
||||||
const location = useLocation();
|
const location = useLocation();
|
||||||
const { currentUser } = useAuthContext();
|
const { currentUser } = useAuthContext();
|
||||||
|
|
||||||
|
const decodedUsername = useMemo(() => getDecodedFqn(username), [username]);
|
||||||
|
|
||||||
const [previewAsset, setPreviewAsset] =
|
const [previewAsset, setPreviewAsset] =
|
||||||
useState<EntityDetailsObjectInterface>();
|
useState<EntityDetailsObjectInterface>();
|
||||||
|
|
||||||
@ -158,7 +156,7 @@ const Users = ({
|
|||||||
<ActivityFeedProvider user={userData.id}>
|
<ActivityFeedProvider user={userData.id}>
|
||||||
<ActivityFeedTab
|
<ActivityFeedTab
|
||||||
entityType={EntityType.USER}
|
entityType={EntityType.USER}
|
||||||
fqn={username}
|
fqn={decodedUsername}
|
||||||
isForFeedTab={false}
|
isForFeedTab={false}
|
||||||
onFeedUpdate={noop}
|
onFeedUpdate={noop}
|
||||||
/>
|
/>
|
||||||
@ -204,7 +202,7 @@ const Users = ({
|
|||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
[activeTab, userData, username, setPreviewAsset, tabDataRender]
|
[activeTab, userData, decodedUsername, setPreviewAsset, tabDataRender]
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleDescriptionChange = useCallback(
|
const handleDescriptionChange = useCallback(
|
||||||
|
@ -19,7 +19,6 @@ export interface Props {
|
|||||||
myData: string;
|
myData: string;
|
||||||
following: string;
|
following: string;
|
||||||
};
|
};
|
||||||
username: string;
|
|
||||||
handlePaginate: (page: string | number) => void;
|
handlePaginate: (page: string | number) => void;
|
||||||
updateUserDetails: (data: Partial<User>) => Promise<void>;
|
updateUserDetails: (data: Partial<User>) => Promise<void>;
|
||||||
}
|
}
|
||||||
|
@ -73,7 +73,7 @@ const StoredProcedureTab = () => {
|
|||||||
setIsLoading(false);
|
setIsLoading(false);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
[decodedDatabaseSchemaFQN, pageSize]
|
[decodedDatabaseSchemaFQN, pageSize, showDeleted, handlePagingChange]
|
||||||
);
|
);
|
||||||
|
|
||||||
const storedProcedurePagingHandler = useCallback(
|
const storedProcedurePagingHandler = useCallback(
|
||||||
@ -87,7 +87,7 @@ const StoredProcedureTab = () => {
|
|||||||
}
|
}
|
||||||
handlePageChange(currentPage);
|
handlePageChange(currentPage);
|
||||||
},
|
},
|
||||||
[paging, handlePageChange]
|
[paging, handlePageChange, fetchStoreProcedureDetails]
|
||||||
);
|
);
|
||||||
|
|
||||||
const tableColumn: ColumnsType<ServicePageData> = useMemo(
|
const tableColumn: ColumnsType<ServicePageData> = useMemo(
|
||||||
|
@ -148,7 +148,6 @@ const UserPage = () => {
|
|||||||
}}
|
}}
|
||||||
updateUserDetails={updateUserDetails}
|
updateUserDetails={updateUserDetails}
|
||||||
userData={userData}
|
userData={userData}
|
||||||
username={username}
|
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user