diff --git a/src/components/Apps/AccountListTable/AccountList.vue b/src/components/Apps/AccountListTable/AccountList.vue index f5e834739..cbba1f9fc 100644 --- a/src/components/Apps/AccountListTable/AccountList.vue +++ b/src/components/Apps/AccountListTable/AccountList.vue @@ -49,7 +49,7 @@ + + diff --git a/src/components/Table/TableFormatters/ShowKeyCopyFormatter.vue b/src/components/Table/TableFormatters/ShowKeyCopyFormatter.vue index f4d1656ef..84e62c920 100644 --- a/src/components/Table/TableFormatters/ShowKeyCopyFormatter.vue +++ b/src/components/Table/TableFormatters/ShowKeyCopyFormatter.vue @@ -23,8 +23,8 @@ v-if="item.has" :key="index" :content="item.tooltip" + :open-delay="500" effect="dark" - open-delay="500" placement="top" > diff --git a/src/components/Table/TableFormatters/index.js b/src/components/Table/TableFormatters/index.js index b3782104d..9032d53d4 100644 --- a/src/components/Table/TableFormatters/index.js +++ b/src/components/Table/TableFormatters/index.js @@ -18,6 +18,7 @@ import ProtocolsFormatter from './ProtocolsFormatter.vue' import TagChoicesFormatter from './TagChoicesFormatter.vue' import SwitchFormatter from './SwitchFormatter.vue' import AccountInfoFormatter from './AccountInfoFormatter.vue' +import PlatformFormatter from './PlatformFormatter.vue' export default { DetailFormatter, @@ -39,6 +40,7 @@ export default { TagChoicesFormatter, LabelsFormatter, SwitchFormatter, + PlatformFormatter, AccountInfoFormatter } @@ -62,5 +64,6 @@ export { TagChoicesFormatter, LabelsFormatter, SwitchFormatter, + PlatformFormatter, AccountInfoFormatter } diff --git a/src/layout/components/NavHeader/Organization.vue b/src/layout/components/NavHeader/Organization.vue index ada5512a0..7e00f82b0 100644 --- a/src/layout/components/NavHeader/Organization.vue +++ b/src/layout/components/NavHeader/Organization.vue @@ -82,7 +82,7 @@ export default { ] } const hasPerms = this.$hasPerm('orgs.view_organization | orgs.add_organization') - const isConsole = this.currentViewRoute.name === 'console' + const isConsole = ['console'].includes(this.currentViewRoute.name) return hasPerms && isConsole ? orgActions : {} }, orgChoicesGroup() { diff --git a/src/router/console/index.js b/src/router/console/index.js index 4c50cd610..bbccc7183 100644 --- a/src/router/console/index.js +++ b/src/router/console/index.js @@ -27,7 +27,7 @@ export default { children: [ { path: '/console/dashboard', - component: () => import('@/views/dashboard/Console/index'), + component: () => import('@/views/dashboard/Console/index.vue'), name: 'AdminDashboard', meta: { icon: 'dashboard', diff --git a/src/router/pam/index.js b/src/router/pam/index.js index c23632a85..55d7eb0a5 100644 --- a/src/router/pam/index.js +++ b/src/router/pam/index.js @@ -23,7 +23,7 @@ export default { children: [ { path: '/pam/dashboard', - component: () => import('@/views/dashboard/Audit/index'), + component: () => import('@/views/dashboard/Pam/index'), name: 'PamDashboard', meta: { icon: 'dashboard', @@ -34,7 +34,7 @@ export default { { path: '/pam/accounts', name: 'PamAccounts', - component: () => import('@/views/pam/Account/AccountList.vue'), + component: () => import('@/views/pam/Account/index.vue'), meta: { title: i18n.t('Accounts'), icon: 'accounts', diff --git a/src/store/modules/users.js b/src/store/modules/users.js index af0871a61..d42e30518 100644 --- a/src/store/modules/users.js +++ b/src/store/modules/users.js @@ -188,6 +188,7 @@ const actions = { commit('SET_MFA_VERIFY') }, changeToView({ commit }, viewName) { + console.log('Change to view') const mapper = { console: state.consoleOrgs, audit: state.auditOrgs, diff --git a/src/utils/jms.js b/src/utils/jms.js index 9cb63fe4b..d2a32ebab 100644 --- a/src/utils/jms.js +++ b/src/utils/jms.js @@ -96,7 +96,8 @@ export function getPermedViews() { ['audit', store.getters.auditOrgs.length > 0], ['workbench', true], ['tickets', hasPermission('tickets.view_ticket')], - ['settings', hasPermission('settings.view_setting')] + ['settings', hasPermission('settings.view_setting')], + ['pam', store.getters.consoleOrgs.length > 0] ] return viewShowMapper.filter(i => i[1]).map(i => i[0]) } @@ -155,3 +156,22 @@ export function IsSupportPauseSessionType(terminalType) { const supportedType = ['koko', 'lion', 'chen', 'kael'] return supportedType.includes(terminalType) } + +export function loadPlatformIcon(name, type) { + const platformMap = { + 'Huawei': 'huawei', + 'Cisco': 'cisco', + 'Gateway': 'gateway', + 'macOS': 'macos', + 'BSD': 'bsd', + 'Vmware-vSphere': 'vmware' + } + + const value = platformMap[name] || type + + try { + return require(`@/assets/img/icons/${value}.png`) + } catch (error) { + return require(`@/assets/img/icons/other.png`) + } +} diff --git a/src/utils/startup.js b/src/utils/startup.js index a5e368a02..668bd172d 100644 --- a/src/utils/startup.js +++ b/src/utils/startup.js @@ -131,7 +131,7 @@ export async function checkUserFirstLogin({ to, from, next }) { export async function changeCurrentViewIfNeed({ to, from, next }) { let viewName = to.path.split('/')[1] // 这几个是需要检测的, 切换视图组织时,避免 404, 这里不能加 settings, 因为 默认没有返回 setting 组织(System) 的管理权限 - if (['console', 'audit', 'workbench', 'tickets', ''].indexOf(viewName) === -1) { + if (['console', 'audit', 'workbench', 'tickets', 'pam', ''].indexOf(viewName) === -1) { Vue.$log.debug('Current view no need check', viewName) return } diff --git a/src/views/assets/Asset/AssetList/components/BaseList.vue b/src/views/assets/Asset/AssetList/components/BaseList.vue index c480425d3..f252838a3 100644 --- a/src/views/assets/Asset/AssetList/components/BaseList.vue +++ b/src/views/assets/Asset/AssetList/components/BaseList.vue @@ -23,7 +23,7 @@ + + diff --git a/src/views/dashboard/Pam/AssetProportionSummary.vue b/src/views/dashboard/Pam/AssetProportionSummary.vue new file mode 100644 index 000000000..fbee35614 --- /dev/null +++ b/src/views/dashboard/Pam/AssetProportionSummary.vue @@ -0,0 +1,60 @@ + + + + + + + {{ $tc('NoData') }} + + + + + + + diff --git a/src/views/dashboard/Pam/DataSummary.vue b/src/views/dashboard/Pam/DataSummary.vue new file mode 100644 index 000000000..4feb1e3bf --- /dev/null +++ b/src/views/dashboard/Pam/DataSummary.vue @@ -0,0 +1,104 @@ + + + + + + + + + + + + + diff --git a/src/views/dashboard/Pam/RankSummary.vue b/src/views/dashboard/Pam/RankSummary.vue new file mode 100644 index 000000000..459f30249 --- /dev/null +++ b/src/views/dashboard/Pam/RankSummary.vue @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + diff --git a/src/views/dashboard/Pam/RiskSummary.vue b/src/views/dashboard/Pam/RiskSummary.vue new file mode 100644 index 000000000..be4c89b58 --- /dev/null +++ b/src/views/dashboard/Pam/RiskSummary.vue @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + diff --git a/src/views/dashboard/Pam/SummaryChart.vue b/src/views/dashboard/Pam/SummaryChart.vue new file mode 100644 index 000000000..d3c6672f1 --- /dev/null +++ b/src/views/dashboard/Pam/SummaryChart.vue @@ -0,0 +1,124 @@ + + + + + + + {{ config.subTitle }} + + + + + 1000 + + + + {{ config.total }} + + + + + {{ $tc('WeekAdd') }}: + + {{ config.weekAdd }} + + + + + + + + + + + + + + + diff --git a/src/views/dashboard/Pam/UserAssetActivity.vue b/src/views/dashboard/Pam/UserAssetActivity.vue new file mode 100644 index 000000000..f94890796 --- /dev/null +++ b/src/views/dashboard/Pam/UserAssetActivity.vue @@ -0,0 +1,74 @@ + + + + + + + + + + + + + diff --git a/src/views/dashboard/Pam/index.vue b/src/views/dashboard/Pam/index.vue new file mode 100644 index 000000000..e2b98ef50 --- /dev/null +++ b/src/views/dashboard/Pam/index.vue @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/pam/Account/AccountList.vue b/src/views/pam/Account/AccountList.vue index f09eb182e..0c7e68ed8 100644 --- a/src/views/pam/Account/AccountList.vue +++ b/src/views/pam/Account/AccountList.vue @@ -1,42 +1,59 @@ - - - - - + + + + + + 过滤 + + 全部账号 + 拥有的 + 收藏夹 + 最近访问 + + + + 风险账号 + + 过期的密码 + 冲突的密码 + 违法策略 + 禁用的资源 + 回收站 + + + + 账号类型 + + 全部 + 主机 + 数据库 + 网络设备 + 云服务 + 其他 + + + + + + + + + + + @@ -130,4 +111,51 @@ export default { .asset-user-table { padding-left: 20px; } + + .expand-bar { + text-align: center; + + i { + cursor: pointer; + //transform: rotateY(90deg); + } + } + + .expanded-filter-zone { + display: flex; + + h5 { + font-weight: 600; + text-transform: uppercase; + font-size: 12px; + margin-bottom: .5rem; + line-height: 1.2; + display: inline-block; + } + + .item-zone { + margin-right: 30px; + margin-bottom: 5px; + } + + .item { + display: inline-block; + margin-right: 10px; + border-radius: 5px; + background-color: #f5f7fa; + color: #303133; + font-size: 12px; + cursor: pointer; + + &:hover { + color: var(--color-primary); + } + } + + ul { + list-style: none outside none; + margin-block-start: 0; + padding-left: 0; + } + } diff --git a/src/views/pam/Account/AssetList.vue b/src/views/pam/Account/AssetList.vue new file mode 100644 index 000000000..0b93c0764 --- /dev/null +++ b/src/views/pam/Account/AssetList.vue @@ -0,0 +1,24 @@ + + + + + diff --git a/src/views/pam/Account/index.vue b/src/views/pam/Account/index.vue new file mode 100644 index 000000000..2d88dc5b6 --- /dev/null +++ b/src/views/pam/Account/index.vue @@ -0,0 +1,49 @@ + + + + + + +