File tree Expand file tree Collapse file tree 3 files changed +21
-2
lines changed
frontend/packages/dev-console Expand file tree Collapse file tree 3 files changed +21
-2
lines changed Original file line number Diff line number Diff line change 10181018 "path" : [
10191019 " /add" ,
10201020 " /import-sample" ,
1021- " /catalog" ,
10221021 " /samples" ,
10231022 " /topology" ,
10241023 " /deploy-image" ,
10631062 "type" : " console.page/route" ,
10641063 "properties" : {
10651064 "exact" : true ,
1066- "path" : [" /catalog/all-namespaces" , " /catalog/ns/:ns" ],
1065+ "path" : [" /catalog/all-namespaces" ],
1066+ "component" : { "$codeRef" : " CatalogDefaultNamespaceRedirect" }
1067+ }
1068+ },
1069+ {
1070+ "type" : " console.page/route" ,
1071+ "properties" : {
1072+ "exact" : true ,
1073+ "path" : [" /catalog/ns/:ns" ],
10671074 "component" : { "$codeRef" : " CatalogPage" }
10681075 }
10691076 },
Original file line number Diff line number Diff line change 3333 "CatalogTypesConfiguration" : " src/components/catalog/CatalogTypesConfiguration.tsx" ,
3434 "PinnedResourcesConfiguration" : " src/components/catalog/PinnedResourcesConfiguration.tsx" ,
3535 "CatalogPage" : " src/components/catalog/CatalogPage.tsx" ,
36+ "CatalogDefaultNamespaceRedirect" : " src/components/catalog/CatalogDefaultNamespaceRedirect.tsx" ,
3637 "fileUpload" : " src/components/jar-file-upload/jar-file-upload-utils.ts" ,
3738 "devConsoleComponentFactory" : " src/components/topology/components/devConsoleComponentFactory.ts" ,
3839 "hpaTabSection" : " src/components/topology/hpa-tab-section.tsx" ,
Original file line number Diff line number Diff line change 1+ import * as React from 'react' ;
2+ import { Navigate , useSearchParams } from 'react-router-dom-v5-compat' ;
3+
4+ // Redirect all-namespaces catalog to default namespace
5+ // TODO: Make Software Catalog work with all namespaces. https://issues.redhat.com/browse/CONSOLE-4827
6+ const CatalogDefaultNamespaceRedirect : React . FCC = ( ) => {
7+ const [ params ] = useSearchParams ( ) ;
8+ return < Navigate to = { `/catalog/ns/default?${ params . toString ( ) } ` } replace /> ;
9+ } ;
10+
11+ export default CatalogDefaultNamespaceRedirect ;
You can’t perform that action at this time.
0 commit comments