Skip to content

Commit 1477712

Browse files
committed
perf: 修改 Pam
1 parent 77a0100 commit 1477712

13 files changed

+995
-143
lines changed

src/router/pam/activity.js

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
import empty from '@/layout/empty.vue'
2+
import i18n from '@/i18n/i18n'
3+
4+
export default [
5+
{
6+
path: 'session',
7+
name: 'AccountSession',
8+
component: empty,
9+
meta: {
10+
app: 'accounts',
11+
name: 'BaseAccountSession',
12+
icon: 'accounts',
13+
resource: 'pushaccountautomation'
14+
},
15+
children: [
16+
{
17+
path: '',
18+
component: () => import('@/views/pam/AccountScan/index.vue'),
19+
name: 'AccountPushList',
20+
meta: {
21+
title: i18n.t('账号会话'),
22+
menuTitle: i18n.t('账号会话'),
23+
permissions: ['accounts.view_pushaccountautomation']
24+
}
25+
}
26+
]
27+
},
28+
{
29+
path: 'activity',
30+
name: 'AccountActivity',
31+
component: empty,
32+
redirect: {
33+
name: 'AccountPushList'
34+
},
35+
meta: {
36+
app: 'accounts',
37+
name: 'BaseAccountRisk',
38+
icon: 'accounts',
39+
resource: 'pushaccountautomation'
40+
},
41+
children: [
42+
{
43+
path: '',
44+
component: () => import('@/views/accounts/AccountPush/index.vue'),
45+
name: 'AccountPushList',
46+
meta: {
47+
title: i18n.t('活动记录'),
48+
menuTitle: i18n.t('活动记录'),
49+
permissions: ['accounts.view_pushaccountautomation']
50+
}
51+
}
52+
]
53+
}
54+
]

src/router/pam/automations.js

-81
Original file line numberDiff line numberDiff line change
@@ -85,87 +85,6 @@ export default [
8585
}
8686
]
8787
},
88-
{
89-
path: 'account-push',
90-
name: 'AccountRisk',
91-
component: empty,
92-
redirect: {
93-
name: 'AccountPushList'
94-
},
95-
meta: {
96-
app: 'accounts',
97-
name: 'BaseAccountPushList',
98-
icon: 'accounts',
99-
resource: 'pushaccountautomation'
100-
},
101-
children: [
102-
{
103-
path: '',
104-
component: () => import('@/views/accounts/AccountPush/index.vue'),
105-
name: 'AccountPushList',
106-
meta: {
107-
title: i18n.t('AccountPushList'),
108-
menuTitle: i18n.t('AccountPushList'),
109-
permissions: ['accounts.view_pushaccountautomation']
110-
}
111-
},
112-
{
113-
path: 'create',
114-
component: () => import('@/views/accounts/AccountPush/AccountPushCreateUpdate.vue'),
115-
name: 'AccountPushCreate',
116-
hidden: true,
117-
meta: {
118-
title: i18n.t('AccountPushCreate'),
119-
// activeMenu: '/console/accounts/automations',
120-
permissions: ['accounts.add_pushaccountautomation']
121-
}
122-
},
123-
{
124-
path: ':id/update',
125-
component: () => import('@/views/accounts/AccountPush/AccountPushCreateUpdate.vue'),
126-
name: 'AccountPushUpdate',
127-
hidden: true,
128-
meta: {
129-
title: i18n.t('AccountPushUpdate'),
130-
// activeMenu: '/console/accounts/automations',
131-
permissions: ['accounts.change_pushaccountautomation']
132-
}
133-
},
134-
{
135-
path: ':id',
136-
component: () => import('@/views/accounts/AccountPush/AccountPushDetail/index.vue'),
137-
name: 'AccountPushDetail',
138-
hidden: true,
139-
meta: {
140-
title: i18n.t('AccountPushList'),
141-
// activeMenu: '/console/accounts/automations',
142-
permissions: ['accounts.view_pushaccountautomation']
143-
}
144-
},
145-
{
146-
path: 'executions',
147-
component: () => import('@/views/accounts/AccountPush/AccountPushExecutionList.vue'),
148-
name: 'AccountPushExecutionList',
149-
hidden: true,
150-
meta: {
151-
title: i18n.t('ExecutionList'),
152-
// activeMenu: '/console/accounts/automations',
153-
permissions: ['accounts.view_pushaccountexecution']
154-
}
155-
},
156-
{
157-
path: 'executions/:id',
158-
component: () => import('@/views/accounts/AccountPush/AccountPushExecutionDetail/index.vue'),
159-
name: 'AccountPushExecutionDetail',
160-
hidden: true,
161-
meta: {
162-
title: i18n.t('ExecutionDetail'),
163-
// activeMenu: '/console/accounts/automations',
164-
permissions: ['accounts.view_pushaccountexecution']
165-
}
166-
}
167-
]
168-
},
16988
{
17089
path: 'account-change-secret',
17190
name: 'AccountChangeSecret',

src/router/pam/index.js

+14-6
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,21 @@ import Layout from '@/layout'
22
import i18n from '@/i18n/i18n'
33

44
import empty from '@/layout/empty'
5-
import store from '@/store'
65
import automations from './automations'
76
import services from './service'
87
import security from './security'
8+
import activity from './activity'
99

1010
export default {
1111
path: '/pam/',
1212
name: 'pam',
1313
component: Layout,
1414
redirect: '/pam/dashboard',
1515
meta: {
16-
title: i18n.t('PAM'),
16+
title: '特权账号',
1717
icon: 'pam',
1818
type: 'view',
19-
showNavSwitcher: () => {
20-
return store.getters.consoleOrgs.length > 0
21-
},
19+
showNavSwitcher: true,
2220
permissions: [],
2321
view: 'pam'
2422
},
@@ -60,7 +58,7 @@ export default {
6058
name: 'AccountSecurity',
6159
component: empty,
6260
meta: {
63-
title: i18n.t('Security'),
61+
title: i18n.t('安全中心'),
6462
icon: 'accounts',
6563
permissions: []
6664
},
@@ -75,6 +73,16 @@ export default {
7573
permissions: []
7674
},
7775
children: services
76+
},
77+
{
78+
path: '/pam/activity',
79+
name: 'AccountActivity',
80+
meta: {
81+
title: i18n.t('Activity'),
82+
icon: 'accounts',
83+
permissions: []
84+
},
85+
children: activity
7886
}
7987
]
8088
}

src/router/pam/security.js

+27-56
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import i18n from '@/i18n/i18n'
33

44
export default [
55
{
6-
path: 'risk',
7-
name: 'AccountRisk',
6+
path: 'scan',
7+
name: 'AccountScan',
88
component: empty,
99
redirect: {
1010
name: 'AccountPushList'
@@ -18,68 +18,39 @@ export default [
1818
children: [
1919
{
2020
path: '',
21-
component: () => import('@/views/accounts/AccountPush/index.vue'),
21+
component: () => import('@/views/pam/AccountScan/index.vue'),
2222
name: 'AccountPushList',
2323
meta: {
24-
title: i18n.t('风险扫描'),
25-
menuTitle: i18n.t('风险扫描'),
24+
title: i18n.t('账号检查'),
25+
menuTitle: i18n.t('账号检查'),
2626
permissions: ['accounts.view_pushaccountautomation']
2727
}
28-
},
29-
{
30-
path: 'create',
31-
component: () => import('@/views/accounts/AccountPush/AccountPushCreateUpdate.vue'),
32-
name: 'AccountPushCreate',
33-
hidden: true,
34-
meta: {
35-
title: i18n.t('AccountPushCreate'),
36-
// activeMenu: '/console/accounts/automations',
37-
permissions: ['accounts.add_pushaccountautomation']
38-
}
39-
},
40-
{
41-
path: ':id/update',
42-
component: () => import('@/views/accounts/AccountPush/AccountPushCreateUpdate.vue'),
43-
name: 'AccountPushUpdate',
44-
hidden: true,
45-
meta: {
46-
title: i18n.t('AccountPushUpdate'),
47-
// activeMenu: '/console/accounts/automations',
48-
permissions: ['accounts.change_pushaccountautomation']
49-
}
50-
},
28+
}
29+
]
30+
},
31+
{
32+
path: 'risk',
33+
name: 'AccountRisk',
34+
component: empty,
35+
redirect: {
36+
name: 'AccountPushList'
37+
},
38+
meta: {
39+
app: 'accounts',
40+
name: 'BaseAccountRisk',
41+
icon: 'accounts',
42+
resource: 'pushaccountautomation'
43+
},
44+
children: [
5145
{
52-
path: ':id',
53-
component: () => import('@/views/accounts/AccountPush/AccountPushDetail/index.vue'),
54-
name: 'AccountPushDetail',
55-
hidden: true,
46+
path: '',
47+
component: () => import('@/views/accounts/AccountPush/index.vue'),
48+
name: 'AccountPushList',
5649
meta: {
57-
title: i18n.t('AccountPushList'),
58-
// activeMenu: '/console/accounts/automations',
50+
title: i18n.t('风险分析'),
51+
menuTitle: i18n.t('风险分析'),
5952
permissions: ['accounts.view_pushaccountautomation']
6053
}
61-
},
62-
{
63-
path: 'executions',
64-
component: () => import('@/views/accounts/AccountPush/AccountPushExecutionList.vue'),
65-
name: 'AccountPushExecutionList',
66-
hidden: true,
67-
meta: {
68-
title: i18n.t('ExecutionList'),
69-
// activeMenu: '/console/accounts/automations',
70-
permissions: ['accounts.view_pushaccountexecution']
71-
}
72-
},
73-
{
74-
path: 'executions/:id',
75-
component: () => import('@/views/accounts/AccountPush/AccountPushExecutionDetail/index.vue'),
76-
name: 'AccountPushExecutionDetail',
77-
hidden: true,
78-
meta: {
79-
title: i18n.t('ExecutionDetail'),
80-
// activeMenu: '/console/accounts/automations',
81-
permissions: ['accounts.view_pushaccountexecution']
82-
}
8354
}
8455
]
8556
}

0 commit comments

Comments
 (0)