Skip to content

Commit

Permalink
Merge pull request #47 from xuzhu-591/fix-route
Browse files Browse the repository at this point in the history
fix: web console route
  • Loading branch information
xuzhu-591 authored Jul 7, 2023
2 parents 3aafb55 + cfaaf31 commit 390b046
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
9 changes: 9 additions & 0 deletions config/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,14 @@ const instanceRoutes = [
}
];

const clusterRoutes = [
{
path: '/clusters/*/-/webconsole',
menuRender: false,
component: 'instances/Pods/Console',
},
];

const adminRoutes = [
{
path: '/admin',
Expand Down Expand Up @@ -515,6 +523,7 @@ allRoute.push(...adminRoutes);
allRoute.push(...templateRoutes);
allRoute.push(...userRoutes);
allRoute.push(...webhookRoutes);
allRoute.push(...clusterRoutes);
// @ts-ignore
allRoute.push({
path: '/*',
Expand Down
7 changes: 7 additions & 0 deletions src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,13 @@ function formatClusterMenu(fullPath: string) {
menuHeaderRender: false,
footerRender: false,
},
{
path: `/clusters${fullPath}/-/webconsole`,
menuRender: false,
headerRender: false,
menuHeaderRender: false,
footerRender: false,
},
{
path: `/instances${fullPath}/-/settings`,
name: 'Settings',
Expand Down
1 change: 1 addition & 0 deletions src/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const getResourcePath = () => {
&& item !== 'groups'
&& item !== 'applications'
&& item !== 'instances'
&& item !== 'clusters'
&& item !== 'templates',
);
let path = '';
Expand Down

0 comments on commit 390b046

Please sign in to comment.