fix: user guidance when no resource

This commit is contained in:
jialin
2025-12-22 18:11:46 +08:00
parent 0d0592eee9
commit 711b3fee98
+7 -3
View File
@@ -53,7 +53,8 @@ const CHECK_RESOURCE_PATH = [
'/resources/workers',
'/cluster-management/clusters/list',
'/cluster-management/credentials',
'/cluster-management/clusters/create'
'/cluster-management/clusters/create',
''
];
const loginPath = DEFAULT_ENTER_PAGE.login;
@@ -255,8 +256,11 @@ export default (props: any) => {
const { location } = history;
const { pathname } = location;
if (!CHECK_RESOURCE_PATH.includes(pathname)) {
// fetchResourceData();
if (
!CHECK_RESOURCE_PATH.includes(pathname) &&
initialState?.currentUser?.is_admin
) {
fetchResourceData();
}
initRouteCacheValue(pathname);