fix: remove the heat page in the administrator

Remove the heat page and menu in the administrator, because the heat api has a problem with the permission determination of the scope.system.all=true level.

Change-Id: I4438c205056004e95176852697e7d92f0bd316e9
This commit is contained in:
zhangjingwei 2022-09-02 11:16:11 +08:00
parent ca4bb7baf2
commit 450f62a0bb
2 changed files with 60 additions and 54 deletions

View File

@ -21,7 +21,6 @@ import {
MonitorOutlined,
SettingOutlined,
HomeOutlined,
AppstoreOutlined,
SwitcherOutlined,
ContainerOutlined,
DatabaseFilled,
@ -715,43 +714,47 @@ const renderMenu = (t) => {
// },
// ],
// },
{
path: '/heat',
name: t('Orchestration'),
key: 'heatAdmin',
endpoints: 'heat',
icon: <AppstoreOutlined />,
children: [
{
path: '/heat/stack-admin',
name: t('Stacks'),
key: 'stackAdmin',
level: 1,
children: [
{
path: /^\/heat\/stack-admin\/detail\/.[^/]+\/.[^/]+$/,
name: t('Stack Detail'),
key: 'stackDetailAdmin',
level: 2,
routePath: '/heat/stack-admin/detail/:id/:name',
},
{
path: '/heat/stack-admin/create',
name: t('Create Stack'),
key: 'stackCreateAdmin',
level: 2,
},
{
path: /^\/heat\/stack-admin\/edit\/.[^/]+\/.[^/]+$/,
name: t('Update Template'),
key: 'stackEditAdmin',
level: 2,
routePath: '/heat/stack-admin/edit/:id/:name',
},
],
},
],
},
// remove heat menu in the administrator,
// because the heat api has a problem with the permission determination
// of the scope.system.all=true level.
// {
// path: '/heat',
// name: t('Orchestration'),
// key: 'heatAdmin',
// endpoints: 'heat',
// icon: <AppstoreOutlined />,
// children: [
// {
// path: '/heat/stack-admin',
// name: t('Stacks'),
// key: 'stackAdmin',
// level: 1,
// children: [
// {
// path: /^\/heat\/stack-admin\/detail\/.[^/]+\/.[^/]+$/,
// name: t('Stack Detail'),
// key: 'stackDetailAdmin',
// level: 2,
// routePath: '/heat/stack-admin/detail/:id/:name',
// },
// {
// path: '/heat/stack-admin/create',
// name: t('Create Stack'),
// key: 'stackCreateAdmin',
// level: 2,
// },
// {
// path: /^\/heat\/stack-admin\/edit\/.[^/]+\/.[^/]+$/,
// name: t('Update Template'),
// key: 'stackEditAdmin',
// level: 2,
// routePath: '/heat/stack-admin/edit/:id/:name',
// },
// ],
// },
// ],
// },
{
path: '/database',
name: t('Database'),

View File

@ -25,33 +25,36 @@ export default [
component: BaseLayout,
routes: [
{ path: `${PATH}/stack`, component: Stack, exact: true },
{ path: `${PATH}/stack-admin`, component: Stack, exact: true },
{ path: `${PATH}/stack/create`, component: CreateStack, exact: true },
{
path: `${PATH}/stack-admin/create`,
component: CreateStack,
exact: true,
},
{
path: `${PATH}/stack/edit/:id/:name`,
component: CreateStack,
exact: true,
},
{
path: `${PATH}/stack-admin/edit/:id/:name`,
component: CreateStack,
exact: true,
},
{
path: `${PATH}/stack/detail/:id/:name`,
component: StackDetail,
exact: true,
},
{
path: `${PATH}/stack-admin/detail/:id/:name`,
component: StackDetail,
exact: true,
},
// remove heat page in the administrator,
// because the heat api has a problem with the permission determination
// of the scope.system.all=true level.
// { path: `${PATH}/stack-admin`, component: Stack, exact: true },
// {
// path: `${PATH}/stack-admin/create`,
// component: CreateStack,
// exact: true,
// },
// {
// path: `${PATH}/stack-admin/edit/:id/:name`,
// component: CreateStack,
// exact: true,
// },
// {
// path: `${PATH}/stack-admin/detail/:id/:name`,
// component: StackDetail,
// exact: true,
// },
{ path: '*', component: E404 },
],
},