diff --git a/src/icons/svg/pam.svg b/src/icons/svg/pam.svg new file mode 100644 index 000000000..bf5a18065 --- /dev/null +++ b/src/icons/svg/pam.svg @@ -0,0 +1,8 @@ + + + + + diff --git a/src/layout/components/NavHeader/ViewSwitcher.vue b/src/layout/components/NavHeader/ViewSwitcher.vue index a1f44c5f6..7b0577384 100644 --- a/src/layout/components/NavHeader/ViewSwitcher.vue +++ b/src/layout/components/NavHeader/ViewSwitcher.vue @@ -115,6 +115,7 @@ export default { this.tipHasRead = '1' this.iShowTip = false } + console.log('Route to: ', routeName) this.$router.push(routeName) this.$emit('view-change', routeName) } diff --git a/src/router/index.js b/src/router/index.js index 2e7f255db..ce5bce788 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -32,6 +32,7 @@ import workbenchViewRoutes from './workbench' import ticketsRoutes from './tickets' import settingsRoutes from './settings' import profileRoutes from './profile' +import pamViewRoutes from './pam' import { getPropView } from '@/utils/jms' import store from '@/store' @@ -92,6 +93,7 @@ export const viewRoutes = [ consoleViewRoutes, auditViewRoutes, workbenchViewRoutes, + pamViewRoutes, ticketsRoutes, settingsRoutes, profileRoutes diff --git a/src/router/pam/automations.js b/src/router/pam/automations.js new file mode 100644 index 000000000..7fa60d7b1 --- /dev/null +++ b/src/router/pam/automations.js @@ -0,0 +1,318 @@ +import empty from '@/layout/empty.vue' +import i18n from '@/i18n/i18n' + +export default [ + { + path: 'account-gather', + component: empty, + redirect: { + name: 'AccountGatherList' + }, + name: 'AccountGather', + meta: { + title: i18n.t('AccountGatherList'), + app: 'accounts', + icon: 'client' + // activeMenu: '/console/accounts/automations', + }, + children: [ + { + path: '', + component: () => import('@/views/accounts/AccountGather/index.vue'), + name: 'AccountGatherList', + meta: { + menuTitle: i18n.t('GatherAccounts'), + title: i18n.t('AccountGatherTaskList'), + // activeMenu: '/console/accounts/automations', + permissions: ['accounts.view_gatheredaccount'] + } + }, + { + path: 'create', + component: () => import('@/views/accounts/AccountGather/TaskCreateUpdate'), + name: 'AccountGatherTaskCreate', + hidden: true, + meta: { + title: i18n.t('AccountGatherTaskCreate'), + // activeMenu: '/console/accounts/automations', + permissions: ['accounts.add_gatheraccountsautomation'] + } + }, + { + path: ':id', + component: () => import('@/views/accounts/AccountGather/TaskDetail/index'), + name: 'AccountGatherTaskDetail', + hidden: true, + meta: { + title: i18n.t('AccountGatherTaskDetail'), + // activeMenu: '/console/accounts/automations', + permissions: ['accounts.view_gatheraccountsautomation'] + } + }, + { + path: ':id/update', + component: () => import('@/views/accounts/AccountGather/TaskCreateUpdate'), + name: 'AccountGatherTaskUpdate', + hidden: true, + meta: { + title: i18n.t('AccountGatherTaskUpdate'), + action: 'update', + permissions: ['accounts.change_gatheraccountsautomation'], + activeMenu: '/accounts/account-gather' + } + }, + { + path: 'executions', + component: () => import('@/views/accounts/AccountGather/TaskDetail/TaskExecutionList.vue'), + name: 'AccountGatherTaskExecutionList', + hidden: true, + meta: { + title: i18n.t('ExecutionList'), + // activeMenu: '/console/accounts/automations', + permissions: ['accounts.view_gatheraccountsexecution'] + } + }, + { + path: 'executions/:id', + component: () => import('@/views/accounts/AccountGather/TaskDetail/AccountGatherExecutionDetail/index.vue'), + name: 'AccountGatherExecutionDetail', + hidden: true, + meta: { + title: i18n.t('ExecutionDetail'), + // activeMenu: '/console/accounts/automations', + permissions: ['accounts.view_gatheraccountsexecution'] + } + } + ] + }, + { + path: 'account-push', + name: 'AccountRisk', + component: empty, + redirect: { + name: 'AccountPushList' + }, + meta: { + app: 'accounts', + name: 'BaseAccountPushList', + icon: 'accounts', + resource: 'pushaccountautomation' + }, + children: [ + { + path: '', + component: () => import('@/views/accounts/AccountPush/index.vue'), + name: 'AccountPushList', + meta: { + title: i18n.t('AccountPushList'), + menuTitle: i18n.t('AccountPushList'), + permissions: ['accounts.view_pushaccountautomation'] + } + }, + { + path: 'create', + component: () => import('@/views/accounts/AccountPush/AccountPushCreateUpdate.vue'), + name: 'AccountPushCreate', + hidden: true, + meta: { + title: i18n.t('AccountPushCreate'), + // activeMenu: '/console/accounts/automations', + permissions: ['accounts.add_pushaccountautomation'] + } + }, + { + path: ':id/update', + component: () => import('@/views/accounts/AccountPush/AccountPushCreateUpdate.vue'), + name: 'AccountPushUpdate', + hidden: true, + meta: { + title: i18n.t('AccountPushUpdate'), + // activeMenu: '/console/accounts/automations', + permissions: ['accounts.change_pushaccountautomation'] + } + }, + { + path: ':id', + component: () => import('@/views/accounts/AccountPush/AccountPushDetail/index.vue'), + name: 'AccountPushDetail', + hidden: true, + meta: { + title: i18n.t('AccountPushList'), + // activeMenu: '/console/accounts/automations', + permissions: ['accounts.view_pushaccountautomation'] + } + }, + { + path: 'executions', + component: () => import('@/views/accounts/AccountPush/AccountPushExecutionList.vue'), + name: 'AccountPushExecutionList', + hidden: true, + meta: { + title: i18n.t('ExecutionList'), + // activeMenu: '/console/accounts/automations', + permissions: ['accounts.view_pushaccountexecution'] + } + }, + { + path: 'executions/:id', + component: () => import('@/views/accounts/AccountPush/AccountPushExecutionDetail/index.vue'), + name: 'AccountPushExecutionDetail', + hidden: true, + meta: { + title: i18n.t('ExecutionDetail'), + // activeMenu: '/console/accounts/automations', + permissions: ['accounts.view_pushaccountexecution'] + } + } + ] + }, + { + path: 'account-change-secret', + name: 'AccountChangeSecret', + component: empty, + redirect: { + name: 'AccountChangeSecretList' + }, + meta: { + title: i18n.t('BaseAccountChangeSecret'), + icon: 'basic', + app: 'accounts' + }, + children: [ + { + path: '', + component: () => import('@/views/accounts/AccountChangeSecret/index.vue'), + name: 'AccountChangeSecretList', + meta: { + menuTitle: i18n.t('ChangeCredentials'), + title: i18n.t('AccountChangeSecret'), + permissions: ['accounts.view_changesecretautomation'] + } + }, + { + path: 'create', + component: () => import('@/views/accounts/AccountChangeSecret/AccountChangeSecretCreateUpdate.vue'), + name: 'AccountChangeSecretCreate', + hidden: true, + meta: { + title: i18n.t('AssetChangeSecretCreate'), + permissions: ['accounts.add_changesecretautomation'] + } + }, + { + path: ':id/update', + component: () => import('@/views/accounts/AccountChangeSecret/AccountChangeSecretCreateUpdate.vue'), + name: 'AccountChangeSecretUpdate', + hidden: true, + meta: { + title: i18n.t('AssetChangeSecretUpdate'), + permissions: ['accounts.change_changesecretautomation'] + } + }, + { + path: ':id', + component: () => import('@/views/accounts/AccountChangeSecret/AccountChangeSecretDetail/index.vue'), + name: 'AccountChangeSecretDetail', + hidden: true, + meta: { + title: i18n.t('AccountChangeSecret'), + permissions: ['accounts.view_changesecretautomation'] + } + }, + { + path: 'executions', + component: () => import('@/views/accounts/AccountChangeSecret/AccountChangeSecretDetail/AccountChangeSecretExecution/AccountChangeSecretExecutionList.vue'), + name: 'AccountChangeSecretExecutionList', + hidden: true, + meta: { + title: i18n.t('ExecutionList'), + permissions: ['accounts.view_changesecretexecution'] + } + }, + { + path: 'executions/:id', + component: () => import('@/views/accounts/AccountChangeSecret/AccountChangeSecretDetail/AccountChangeSecretExecution/AccountChangeSecretExecutionDetail/index.vue'), + name: 'AccountChangeSecretExecutionDetail', + hidden: true, + meta: { + title: i18n.t('ExecutionDetail'), + permissions: ['accounts.view_changesecretexecution'] + } + } + ] + }, + { + path: 'account-backup', + component: empty, + name: 'AccountBackup', + redirect: { + name: 'AccountBackupList' + }, + meta: { + title: i18n.t('AccountBackup'), + app: 'accounts', + icon: 'clean', + resource: 'accountbackupautomation' + }, + children: [ + { + path: '', + component: () => import('@/views/accounts/AccountBackup/index.vue'), + name: 'AccountBackupList', + meta: { + menuTitle: i18n.t('AccountBackup'), + title: i18n.t('AccountBackupList'), + // activeMenu: '/console/accounts/automations', + permissions: ['accounts.view_accountbackupautomation'] + } + }, + { + path: 'create', + component: () => import('@/views/accounts/AccountBackup/AccountBackupCreateUpdate.vue'), + name: 'AccountBackupCreate', + meta: { + title: i18n.t('AccountBackupCreate'), + // activeMenu: '/console/accounts/automations', + action: 'create' + }, + hidden: true + }, + { + path: ':id/update', + component: () => import('@/views/accounts/AccountBackup/AccountBackupCreateUpdate.vue'), + name: 'AccountBackupUpdate', + meta: { + title: i18n.t('AccountBackupUpdate'), + // activeMenu: '/console/accounts/automations', + action: 'update' + }, + hidden: true + }, + { + path: ':id', + component: () => import('@/views/accounts/AccountBackup/AccountBackupDetail/index.vue'), + name: 'AccountBackupDetail', + // activeMenu: '/console/accounts/automations', + meta: { + title: i18n.t('AccountBackupDetail'), + activeMenu: '/console/accounts/automations' + }, + hidden: true + }, + { + path: 'executions', + component: () => import('@/views/accounts/AccountBackup/AccountBackupDetail/AccountBackupExecution/AccountBackupExecutionList.vue'), + name: 'AccountBackupExecutionList', + meta: { title: i18n.t('ExecutionDetail') }, + hidden: true + }, + { + path: 'executions/:id', + component: () => import('@/views/accounts/AccountBackup/AccountBackupDetail/AccountBackupExecution/AccountBackupExecutionDetail/index.vue'), + name: 'AccountBackupExecutionDetail', + meta: { title: i18n.t('ExecutionDetail') }, + hidden: true + } + ] + } +] diff --git a/src/router/pam/index.js b/src/router/pam/index.js new file mode 100644 index 000000000..5f3f2597c --- /dev/null +++ b/src/router/pam/index.js @@ -0,0 +1,80 @@ +import Layout from '@/layout' +import i18n from '@/i18n/i18n' + +import empty from '@/layout/empty' +import store from '@/store' +import automations from './automations' +import services from './service' +import security from './security' + +export default { + path: '/pam/', + name: 'pam', + component: Layout, + redirect: '/pam/dashboard', + meta: { + title: i18n.t('PAM'), + icon: 'pam', + type: 'view', + showNavSwitcher: () => { + return store.getters.consoleOrgs.length > 0 + }, + permissions: [], + view: 'pam' + }, + children: [ + { + path: '/pam/dashboard', + component: () => import('@/views/dashboard/Audit/index'), + name: 'PamDashboard', + meta: { + icon: 'dashboard', + title: i18n.t('Dashboard'), + permissions: [] + } + }, + { + path: '/pam/accounts', + name: 'PamAccounts', + component: () => import('@/views/pam/Account/AccountList.vue'), + meta: { + title: i18n.t('Accounts'), + icon: 'accounts', + permissions: [] + } + }, + { + path: '/pam/automations', + name: 'AccountAutomation', + component: empty, + // redirect: '/audit/sessions/sessions', + meta: { + title: i18n.t('Automation'), + icon: 'accounts', + permissions: [] + }, + children: automations + }, + { + path: '/pam/security', + name: 'AccountSecurity', + component: empty, + meta: { + title: i18n.t('Security'), + icon: 'accounts', + permissions: [] + }, + children: security + }, + { + path: '/pam/services', + name: 'AccountService', + meta: { + title: i18n.t('Service'), + icon: 'accounts', + permissions: [] + }, + children: services + } + ] +} diff --git a/src/router/pam/security.js b/src/router/pam/security.js new file mode 100644 index 000000000..20b5d465f --- /dev/null +++ b/src/router/pam/security.js @@ -0,0 +1,86 @@ +import empty from '@/layout/empty.vue' +import i18n from '@/i18n/i18n' + +export default [ + { + path: 'risk', + name: 'AccountRisk', + component: empty, + redirect: { + name: 'AccountPushList' + }, + meta: { + app: 'accounts', + name: 'BaseAccountRisk', + icon: 'accounts', + resource: 'pushaccountautomation' + }, + children: [ + { + path: '', + component: () => import('@/views/accounts/AccountPush/index.vue'), + name: 'AccountPushList', + meta: { + title: i18n.t('风险扫描'), + menuTitle: i18n.t('风险扫描'), + permissions: ['accounts.view_pushaccountautomation'] + } + }, + { + path: 'create', + component: () => import('@/views/accounts/AccountPush/AccountPushCreateUpdate.vue'), + name: 'AccountPushCreate', + hidden: true, + meta: { + title: i18n.t('AccountPushCreate'), + // activeMenu: '/console/accounts/automations', + permissions: ['accounts.add_pushaccountautomation'] + } + }, + { + path: ':id/update', + component: () => import('@/views/accounts/AccountPush/AccountPushCreateUpdate.vue'), + name: 'AccountPushUpdate', + hidden: true, + meta: { + title: i18n.t('AccountPushUpdate'), + // activeMenu: '/console/accounts/automations', + permissions: ['accounts.change_pushaccountautomation'] + } + }, + { + path: ':id', + component: () => import('@/views/accounts/AccountPush/AccountPushDetail/index.vue'), + name: 'AccountPushDetail', + hidden: true, + meta: { + title: i18n.t('AccountPushList'), + // activeMenu: '/console/accounts/automations', + permissions: ['accounts.view_pushaccountautomation'] + } + }, + { + path: 'executions', + component: () => import('@/views/accounts/AccountPush/AccountPushExecutionList.vue'), + name: 'AccountPushExecutionList', + hidden: true, + meta: { + title: i18n.t('ExecutionList'), + // activeMenu: '/console/accounts/automations', + permissions: ['accounts.view_pushaccountexecution'] + } + }, + { + path: 'executions/:id', + component: () => import('@/views/accounts/AccountPush/AccountPushExecutionDetail/index.vue'), + name: 'AccountPushExecutionDetail', + hidden: true, + meta: { + title: i18n.t('ExecutionDetail'), + // activeMenu: '/console/accounts/automations', + permissions: ['accounts.view_pushaccountexecution'] + } + } + ] + } +] diff --git a/src/router/pam/service.js b/src/router/pam/service.js new file mode 100644 index 000000000..1c965dbac --- /dev/null +++ b/src/router/pam/service.js @@ -0,0 +1,86 @@ +import empty from '@/layout/empty.vue' +import i18n from '@/i18n/i18n' + +export default [ + { + path: 'service', + name: 'AccountService', + component: empty, + redirect: { + name: 'AccountServiceList' + }, + meta: { + app: 'accounts', + name: 'AccountService', + icon: 'accounts', + resource: 'pushaccountautomation' + }, + children: [ + { + path: '', + component: () => import('@/views/accounts/AccountPush/index.vue'), + name: 'AccountServiceList', + meta: { + title: i18n.t('服务对接'), + menuTitle: i18n.t('服务对接'), + permissions: ['accounts.view_pushaccountautomation'] + } + }, + { + path: 'create', + component: () => import('@/views/accounts/AccountPush/AccountPushCreateUpdate.vue'), + name: 'AccountPushCreate', + hidden: true, + meta: { + title: i18n.t('AccountPushCreate'), + // activeMenu: '/console/accounts/automations', + permissions: ['accounts.add_pushaccountautomation'] + } + }, + { + path: ':id/update', + component: () => import('@/views/accounts/AccountPush/AccountPushCreateUpdate.vue'), + name: 'AccountPushUpdate', + hidden: true, + meta: { + title: i18n.t('AccountPushUpdate'), + // activeMenu: '/console/accounts/automations', + permissions: ['accounts.change_pushaccountautomation'] + } + }, + { + path: ':id', + component: () => import('@/views/accounts/AccountPush/AccountPushDetail/index.vue'), + name: 'AccountPushDetail', + hidden: true, + meta: { + title: i18n.t('AccountPushList'), + // activeMenu: '/console/accounts/automations', + permissions: ['accounts.view_pushaccountautomation'] + } + }, + { + path: 'executions', + component: () => import('@/views/accounts/AccountPush/AccountPushExecutionList.vue'), + name: 'AccountPushExecutionList', + hidden: true, + meta: { + title: i18n.t('ExecutionList'), + // activeMenu: '/console/accounts/automations', + permissions: ['accounts.view_pushaccountexecution'] + } + }, + { + path: 'executions/:id', + component: () => import('@/views/accounts/AccountPush/AccountPushExecutionDetail/index.vue'), + name: 'AccountPushExecutionDetail', + hidden: true, + meta: { + title: i18n.t('ExecutionDetail'), + // activeMenu: '/console/accounts/automations', + permissions: ['accounts.view_pushaccountexecution'] + } + } + ] + } +] diff --git a/src/views/pam/Account/AccountList.vue b/src/views/pam/Account/AccountList.vue new file mode 100644 index 000000000..f09eb182e --- /dev/null +++ b/src/views/pam/Account/AccountList.vue @@ -0,0 +1,133 @@ + + + + +