mirror of
https://github.com/jumpserver/lina.git
synced 2025-09-01 15:07:43 +00:00
Merge branch 'master' of github.com:jumpserver/lina
This commit is contained in:
@@ -24,7 +24,14 @@ import Layout from '@/layout'
|
|||||||
activeMenu: '/example/list' if set path, the sidebar will highlight the path you set
|
activeMenu: '/example/list' if set path, the sidebar will highlight the path you set
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
const requireContext = require.context('@/views/', true, /\.js$/)
|
import UsersRoute from '@/views/users'
|
||||||
|
import AssetsRoute from '@/views/assets'
|
||||||
|
import ApplicationsRoute from '@/views/applications'
|
||||||
|
import PermsRoute from '@/views/perms'
|
||||||
|
import SessionsRoute from '@/views/sessions'
|
||||||
|
import OpsRoutes from '@/views/jobcenter'
|
||||||
|
import TicketsRoutes from '@/views/tickets'
|
||||||
|
import AuditsRoutes from '@/views/audits'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* constantRoutes
|
* constantRoutes
|
||||||
@@ -52,6 +59,71 @@ export const constantRoutes = [
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/users',
|
||||||
|
component: Layout,
|
||||||
|
redirect: '/users/users/',
|
||||||
|
name: 'Users',
|
||||||
|
meta: {
|
||||||
|
title: 'Users',
|
||||||
|
icon: 'users'
|
||||||
|
},
|
||||||
|
children: UsersRoute
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/assets',
|
||||||
|
component: Layout,
|
||||||
|
redirect: '/assets/assets/',
|
||||||
|
name: 'assets',
|
||||||
|
meta: { title: 'Assets', icon: 'inbox' },
|
||||||
|
children: AssetsRoute
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/applications/',
|
||||||
|
component: Layout,
|
||||||
|
redirect: '/applications/remote-apps/',
|
||||||
|
name: 'applications',
|
||||||
|
meta: { title: 'Applications', icon: 'th' },
|
||||||
|
children: ApplicationsRoute
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/perms/',
|
||||||
|
component: Layout,
|
||||||
|
redirect: '/perms/asset-permissions/',
|
||||||
|
name: 'Perms',
|
||||||
|
meta: { title: 'Perms', icon: 'edit' },
|
||||||
|
children: PermsRoute
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/terminal/',
|
||||||
|
component: Layout,
|
||||||
|
redirect: '/terminal/session-online/',
|
||||||
|
name: 'Sessions',
|
||||||
|
meta: { title: 'Sessions', icon: 'rocket' },
|
||||||
|
children: SessionsRoute
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/ops/',
|
||||||
|
component: Layout,
|
||||||
|
redirect: '/ops/tasks/',
|
||||||
|
name: 'JobCenter',
|
||||||
|
meta: { title: 'JobCenter', icon: 'coffee' },
|
||||||
|
children: OpsRoutes
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/tickets/',
|
||||||
|
component: Layout,
|
||||||
|
redirect: '/tickets/tickets/',
|
||||||
|
children: TicketsRoutes
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: '/audits/',
|
||||||
|
component: Layout,
|
||||||
|
redirect: '/audits/login-log/',
|
||||||
|
name: 'Audits',
|
||||||
|
meta: { title: 'Audits', icon: 'history' },
|
||||||
|
children: AuditsRoutes
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/settings',
|
path: '/settings',
|
||||||
component: Layout,
|
component: Layout,
|
||||||
@@ -69,8 +141,7 @@ export const constantRoutes = [
|
|||||||
name: 'CeleryTaskLog',
|
name: 'CeleryTaskLog',
|
||||||
hidden: true,
|
hidden: true,
|
||||||
meta: { title: 'CeleryTaskLog' }
|
meta: { title: 'CeleryTaskLog' }
|
||||||
},
|
}
|
||||||
...requireContext.keys().map(key => requireContext(key).default)
|
|
||||||
]
|
]
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -79,6 +150,99 @@ export const constantRoutes = [
|
|||||||
*/
|
*/
|
||||||
// 权限路由
|
// 权限路由
|
||||||
export const asyncRoutes = [
|
export const asyncRoutes = [
|
||||||
|
// {
|
||||||
|
// path: '/nested',
|
||||||
|
// component: Layout,
|
||||||
|
// redirect: '/nested/menu1',
|
||||||
|
// name: 'Nested',
|
||||||
|
// meta: {
|
||||||
|
// title: 'Nested',
|
||||||
|
// icon: 'nested'
|
||||||
|
// },
|
||||||
|
// children: [
|
||||||
|
// {
|
||||||
|
// path: 'menu1',
|
||||||
|
// component: () => import('@/views/nested/menu1/index'), // Parent router-view
|
||||||
|
// name: 'Menu1',
|
||||||
|
// meta: { title: 'Menu1' },
|
||||||
|
// children: [
|
||||||
|
// {
|
||||||
|
// path: 'menu1-1',
|
||||||
|
// component: () => import('@/views/nested/menu1/menu1-1'),
|
||||||
|
// name: 'Menu1-1',
|
||||||
|
// meta: { title: 'Menu1-1' }
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// path: 'menu1-2',
|
||||||
|
// component: () => import('@/views/nested/menu1/menu1-2'),
|
||||||
|
// name: 'Menu1-2',
|
||||||
|
// meta: { title: 'Menu1-2' },
|
||||||
|
// children: [
|
||||||
|
// {
|
||||||
|
// path: 'menu1-2-1',
|
||||||
|
// component: () => import('@/views/nested/menu1/menu1-2/menu1-2-1'),
|
||||||
|
// name: 'Menu1-2-1',
|
||||||
|
// meta: { title: 'Menu1-2-1' }
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// path: 'menu1-2-2',
|
||||||
|
// component: () => import('@/views/nested/menu1/menu1-2/menu1-2-2'),
|
||||||
|
// name: 'Menu1-2-2',
|
||||||
|
// meta: { title: 'Menu1-2-2' }
|
||||||
|
// }
|
||||||
|
// ]
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// path: 'menu1-3',
|
||||||
|
// component: () => import('@/views/nested/menu1/menu1-3'),
|
||||||
|
// name: 'Menu1-3',
|
||||||
|
// meta: { title: 'Menu1-3' }
|
||||||
|
// }
|
||||||
|
// ]
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// path: 'menu2',
|
||||||
|
// component: () => import('@/views/nested/menu2/index'),
|
||||||
|
// meta: { title: 'menu2' }
|
||||||
|
// }
|
||||||
|
// ]
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// path: '/users',
|
||||||
|
// component: Layout,
|
||||||
|
// redirect: '/users/list',
|
||||||
|
// name: 'Users',
|
||||||
|
// meta: {
|
||||||
|
// title: 'Users',
|
||||||
|
// icon: 'nested'
|
||||||
|
// },
|
||||||
|
// children: [
|
||||||
|
// {
|
||||||
|
// path: 'user/list',
|
||||||
|
// component: () => import('@/views/users/UserList.vue'), // Parent router-view
|
||||||
|
// name: 'UserList',
|
||||||
|
// meta: { title: 'List' }
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// path: 'user/:id',
|
||||||
|
// component: () => import('@/views/users/UserCreate.vue'), // Parent router-view
|
||||||
|
// name: 'UserEdit',
|
||||||
|
// meta: { title: 'Edit' },
|
||||||
|
// hidden: true
|
||||||
|
// }
|
||||||
|
// ]
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// path: 'external-link',
|
||||||
|
// component: Layout,
|
||||||
|
// children: [
|
||||||
|
// {
|
||||||
|
// path: 'https://panjiachen.github.io/vue-element-admin-site/#/',
|
||||||
|
// meta: { title: 'External Link', icon: 'link' }
|
||||||
|
// }
|
||||||
|
// ]
|
||||||
|
// },
|
||||||
|
|
||||||
// 404 page must be placed at the end !!!
|
// 404 page must be placed at the end !!!
|
||||||
{ path: '*', redirect: '/404', hidden: true }
|
{ path: '*', redirect: '/404', hidden: true }
|
||||||
]
|
]
|
||||||
|
@@ -1,6 +1,4 @@
|
|||||||
import Layout from '@/layout'
|
export default [
|
||||||
|
|
||||||
const ApplicationsRoute = [
|
|
||||||
{
|
{
|
||||||
path: 'remote-apps',
|
path: 'remote-apps',
|
||||||
name: 'RemoteAppList',
|
name: 'RemoteAppList',
|
||||||
@@ -20,12 +18,3 @@ const ApplicationsRoute = [
|
|||||||
meta: { title: 'DatabaseApp' }
|
meta: { title: 'DatabaseApp' }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
export default {
|
|
||||||
path: '/applications/',
|
|
||||||
component: Layout,
|
|
||||||
redirect: '/applications/remote-apps/',
|
|
||||||
name: 'applications',
|
|
||||||
meta: { title: 'Applications', icon: 'th' },
|
|
||||||
children: ApplicationsRoute
|
|
||||||
}
|
|
||||||
|
@@ -1,6 +1,4 @@
|
|||||||
import Layout from '@/layout'
|
export default [
|
||||||
|
|
||||||
const AssetsRoute = [
|
|
||||||
{
|
{
|
||||||
path: 'assets',
|
path: 'assets',
|
||||||
name: 'AssetList',
|
name: 'AssetList',
|
||||||
@@ -169,11 +167,3 @@ const AssetsRoute = [
|
|||||||
meta: { title: 'PlatformList' }
|
meta: { title: 'PlatformList' }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
export default {
|
|
||||||
path: '/assets',
|
|
||||||
component: Layout,
|
|
||||||
redirect: '/assets/assets/',
|
|
||||||
name: 'assets',
|
|
||||||
meta: { title: 'Assets', icon: 'inbox' },
|
|
||||||
children: AssetsRoute
|
|
||||||
}
|
|
||||||
|
@@ -1,5 +1,4 @@
|
|||||||
import Layout from '@/layout'
|
export default [
|
||||||
const AuditsRoutes = [
|
|
||||||
{
|
{
|
||||||
path: 'login-log',
|
path: 'login-log',
|
||||||
name: 'LoginLog',
|
name: 'LoginLog',
|
||||||
@@ -31,12 +30,3 @@ const AuditsRoutes = [
|
|||||||
meta: { title: 'BatchCommand' }
|
meta: { title: 'BatchCommand' }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
export default {
|
|
||||||
path: '/audits/',
|
|
||||||
component: Layout,
|
|
||||||
redirect: '/audits/login-log/',
|
|
||||||
name: 'Audits',
|
|
||||||
meta: { title: 'Audits', icon: 'history' },
|
|
||||||
children: AuditsRoutes
|
|
||||||
}
|
|
||||||
|
@@ -1,5 +1,4 @@
|
|||||||
import Layout from '@/layout'
|
export default [
|
||||||
const OpsRoutes = [
|
|
||||||
{
|
{
|
||||||
path: 'tasks',
|
path: 'tasks',
|
||||||
name: 'TaskList',
|
name: 'TaskList',
|
||||||
@@ -34,11 +33,3 @@ const OpsRoutes = [
|
|||||||
meta: { title: 'BatchCommand' }
|
meta: { title: 'BatchCommand' }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
export default {
|
|
||||||
path: '/ops/',
|
|
||||||
component: Layout,
|
|
||||||
redirect: '/ops/tasks/',
|
|
||||||
name: 'JobCenter',
|
|
||||||
meta: { title: 'JobCenter', icon: 'coffee' },
|
|
||||||
children: OpsRoutes
|
|
||||||
}
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
import Layout from '@/layout'
|
|
||||||
const PermsRoute = [
|
export default [
|
||||||
{
|
{
|
||||||
path: 'asset-permissions',
|
path: 'asset-permissions',
|
||||||
name: 'AssetPermissionList',
|
name: 'AssetPermissionList',
|
||||||
@@ -82,12 +82,3 @@ const PermsRoute = [
|
|||||||
meta: { title: 'DatabaseAppPermissionDetail', activeMenu: '/perms/database-app-permissions' }
|
meta: { title: 'DatabaseAppPermissionDetail', activeMenu: '/perms/database-app-permissions' }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
export default {
|
|
||||||
path: '/perms/',
|
|
||||||
component: Layout,
|
|
||||||
redirect: '/perms/asset-permissions/',
|
|
||||||
name: 'Perms',
|
|
||||||
meta: { title: 'Perms', icon: 'edit' },
|
|
||||||
children: PermsRoute
|
|
||||||
}
|
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
import Layout from '@/layout'
|
|
||||||
const SessionsRoute = [
|
export default [
|
||||||
{
|
{
|
||||||
path: 'session-online',
|
path: 'session-online',
|
||||||
name: 'SessionOnlineList',
|
name: 'SessionOnlineList',
|
||||||
@@ -92,11 +92,3 @@ const SessionsRoute = [
|
|||||||
hidden: true
|
hidden: true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
export default {
|
|
||||||
path: '/terminal/',
|
|
||||||
component: Layout,
|
|
||||||
redirect: '/terminal/session-online/',
|
|
||||||
name: 'Sessions',
|
|
||||||
meta: { title: 'Sessions', icon: 'rocket' },
|
|
||||||
children: SessionsRoute
|
|
||||||
}
|
|
||||||
|
@@ -1,5 +1,4 @@
|
|||||||
import Layout from '@/layout'
|
export default [
|
||||||
const TicketsRoutes = [
|
|
||||||
{
|
{
|
||||||
path: 'tickets',
|
path: 'tickets',
|
||||||
name: 'TicketsList',
|
name: 'TicketsList',
|
||||||
@@ -7,10 +6,3 @@ const TicketsRoutes = [
|
|||||||
meta: { title: 'Tickets', icon: 'check-square-o' }
|
meta: { title: 'Tickets', icon: 'check-square-o' }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
export default {
|
|
||||||
path: '/tickets/',
|
|
||||||
component: Layout,
|
|
||||||
redirect: '/tickets/tickets/',
|
|
||||||
children: TicketsRoutes
|
|
||||||
}
|
|
||||||
|
|
||||||
|
@@ -1,5 +1,4 @@
|
|||||||
import Layout from '@/layout'
|
export default [
|
||||||
const UsersRoute = [
|
|
||||||
{
|
{
|
||||||
path: 'users',
|
path: 'users',
|
||||||
component: () => import('./users/UserList.vue'), // Parent router-view
|
component: () => import('./users/UserList.vue'), // Parent router-view
|
||||||
@@ -55,16 +54,3 @@ const UsersRoute = [
|
|||||||
meta: { title: 'UserGroupDetail', activeMenu: '/users/groups' }
|
meta: { title: 'UserGroupDetail', activeMenu: '/users/groups' }
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
export default {
|
|
||||||
path: '/users',
|
|
||||||
component: Layout,
|
|
||||||
redirect: '/users/users/',
|
|
||||||
name: 'Users',
|
|
||||||
meta: {
|
|
||||||
title: 'Users',
|
|
||||||
icon: 'users'
|
|
||||||
},
|
|
||||||
children: UsersRoute
|
|
||||||
}
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user