Skip to content

Commit 622e9c4

Browse files
Merge pull request #14901 from rhamilto/OCPBUGS-53227
OCPBUGS-53227: fix bug where /k8s/all-namespaces/volumesnapshots 404s
2 parents e2ffe96 + 4f65d74 commit 622e9c4

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

frontend/public/components/app-contents.tsx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import { useActivePerspective, Perspective } from '@console/dynamic-plugin-sdk';
1212
import { useDynamicPluginInfo } from '@console/plugin-sdk/src/api/useDynamicPluginInfo';
1313
import { FLAGS, useUserSettings, getPerspectiveVisitedKey, usePerspectives } from '@console/shared';
1414
import { ErrorBoundaryPage } from '@console/shared/src/components/error';
15+
import { getReferenceForModel } from '@console/dynamic-plugin-sdk/src/utils/k8s';
1516
import { connectToFlags } from '../reducers/connectToFlags';
1617
import { flagPending, FlagsObject } from '../reducers/features';
1718
import { GlobalNotifications } from './global-notifications';
@@ -555,14 +556,11 @@ const AppContents: React.FC<{}> = () => {
555556
}
556557
/>
557558
<Route
558-
path={`/k8s/all-namespaces/${VolumeSnapshotModel.plural}/~new/form`}
559+
path={`/k8s/all-namespaces/${VolumeSnapshotModel.plural}`}
559560
element={
560-
<AsyncComponent
561-
loader={() =>
562-
import(
563-
'@console/app/src/components/volume-snapshot/create-volume-snapshot/create-volume-snapshot' /* webpackChunkName: "create-volume-snapshot" */
564-
).then((m) => m.VolumeSnapshot)
565-
}
561+
<Navigate
562+
to={`/k8s/all-namespaces/${getReferenceForModel(VolumeSnapshotModel)}`}
563+
replace
566564
/>
567565
}
568566
/>

0 commit comments

Comments
 (0)