diff --git a/src/router/pam/automations.js b/src/router/pam/automations.js index dbe7b4ffd..6c42d6bdb 100644 --- a/src/router/pam/automations.js +++ b/src/router/pam/automations.js @@ -242,8 +242,7 @@ export default [ title: i18n.t('ExecutionDetail'), permissions: ['accounts.view_pushaccountexecution'] } - } - ] + }] }, { path: 'account-backup', diff --git a/src/views/accounts/AccountChangeSecret/AccountChangeSecretExecution/AccountChangeSecretExecutionDetail/AccountChangeSecretRecord.vue b/src/views/accounts/AccountChangeSecret/AccountChangeSecretExecution/AccountChangeSecretExecutionDetail/AccountChangeSecretRecord.vue index 9e9624888..ce43794df 100644 --- a/src/views/accounts/AccountChangeSecret/AccountChangeSecretExecution/AccountChangeSecretExecutionDetail/AccountChangeSecretRecord.vue +++ b/src/views/accounts/AccountChangeSecret/AccountChangeSecretExecution/AccountChangeSecretExecutionDetail/AccountChangeSecretRecord.vue @@ -21,20 +21,13 @@ export default { RecordViewSecret, GenericListTable }, - props: { - object: { - type: Object, - required: true, - default: () => ({}) - } - }, data() { const vm = this return { secretUrl: '', showViewSecretDialog: false, tableConfig: { - url: `/api/v1/accounts/change-secret-records/?execution_id=${this.object.id}`, + url: '/api/v1/accounts/change-secret-records/', columns: [ 'asset', 'account', 'date_finished', 'is_success', 'error', 'actions' ], @@ -157,6 +150,10 @@ export default { { value: 'failed', label: this.$t('Failed') + }, + { + label: this.$t('Execution'), + value: 'execution_id' } ] } diff --git a/src/views/accounts/AccountChangeSecret/AccountChangeSecretExecution/AccountChangeSecretExecutionDetail/index.vue b/src/views/accounts/AccountChangeSecret/AccountChangeSecretExecution/AccountChangeSecretExecutionDetail/index.vue index 9269d6c00..83970c2b1 100644 --- a/src/views/accounts/AccountChangeSecret/AccountChangeSecretExecution/AccountChangeSecretExecutionDetail/index.vue +++ b/src/views/accounts/AccountChangeSecret/AccountChangeSecretExecution/AccountChangeSecretExecutionDetail/index.vue @@ -32,11 +32,6 @@ export default { title: this.$t('Basic'), name: 'AccountChangeSecretExecutionInfo', hidden: () => !this.$hasPerm('accounts.view_changesecretexecution') - }, - { - title: this.$t('TaskList'), - name: 'AccountChangeSecretRecord', - hidden: () => !this.$hasPerm('accounts.view_changesecretrecord') } ], getTitle: this.getExecutionTitle diff --git a/src/views/accounts/AccountChangeSecret/AccountChangeSecretExecution/AccountChangeSecretExecutionList.vue b/src/views/accounts/AccountChangeSecret/AccountChangeSecretExecution/AccountChangeSecretExecutionList.vue index 726a7108f..b0dbb9a55 100644 --- a/src/views/accounts/AccountChangeSecret/AccountChangeSecretExecution/AccountChangeSecretExecutionList.vue +++ b/src/views/accounts/AccountChangeSecret/AccountChangeSecretExecution/AccountChangeSecretExecutionList.vue @@ -12,13 +12,6 @@ export default { components: { GenericListTable }, - props: { - object: { - type: Object, - required: false, - default: () => ({}) - } - }, data() { return { tableConfig: { @@ -35,7 +28,7 @@ export default { }, columnsMeta: { automation: { - label: this.$t('TaskID'), + label: this.$t('ExecutionID'), formatter: function(row) { return {row.automation} } @@ -105,6 +98,20 @@ export default { callback: function({ row }) { window.open(`/api/v1/accounts/change-secret-executions/${row.id}/report/`) } + }, + { + name: 'record', + title: this.$t('Record'), + can: this.$hasPerm('accounts.view_changesecretrecord'), + callback: function({ row }) { + return this.$router.push({ + name: 'AccountChangeSecretList', + query: { + tab: 'ChangeSecretRecord', + execution_id: row.id + } + }) + } } ] } diff --git a/src/views/accounts/AccountChangeSecret/index.vue b/src/views/accounts/AccountChangeSecret/index.vue index 4bc5f0d56..b6ce82160 100644 --- a/src/views/accounts/AccountChangeSecret/index.vue +++ b/src/views/accounts/AccountChangeSecret/index.vue @@ -34,6 +34,14 @@ export default { component: () => import( '@/views/accounts/AccountChangeSecret/AccountChangeSecretExecution/AccountChangeSecretExecutionList.vue' ) + }, + { + title: this.$t('RecordList'), + name: 'ChangeSecretRecord', + hidden: () => !this.$hasPerm('accounts.view_changesecretrecord'), + component: () => import( + '@/views/accounts/AccountChangeSecret/AccountChangeSecretExecution/AccountChangeSecretExecutionDetail/AccountChangeSecretRecord.vue' + ) } ] } diff --git a/src/views/accounts/AccountPush/AccountPushExecutionDetail/AccountPushRecord.vue b/src/views/accounts/AccountPush/AccountPushExecutionDetail/AccountPushRecord.vue new file mode 100644 index 000000000..293b93e4b --- /dev/null +++ b/src/views/accounts/AccountPush/AccountPushExecutionDetail/AccountPushRecord.vue @@ -0,0 +1,137 @@ + + + + + diff --git a/src/views/accounts/AccountPush/AccountPushExecutionList.vue b/src/views/accounts/AccountPush/AccountPushExecutionList.vue index 0a5ea1f15..9f6a38dab 100644 --- a/src/views/accounts/AccountPush/AccountPushExecutionList.vue +++ b/src/views/accounts/AccountPush/AccountPushExecutionList.vue @@ -12,13 +12,6 @@ export default { components: { GenericListTable }, - props: { - object: { - type: Object, - required: false, - default: () => ({}) - } - }, data() { return { tableConfig: { @@ -35,7 +28,7 @@ export default { }, columnsMeta: { automation: { - label: this.$t('TaskID'), + label: this.$t('ExecutionID'), formatter: function(row) { return {row.automation} } @@ -91,7 +84,6 @@ export default { { name: 'detail', title: this.$t('Detail'), - type: 'info', can: this.$hasPerm('accounts.view_pushaccountexecution'), callback: function({ row }) { return this.$router.push({ name: 'AccountPushExecutionDetail', params: { id: row.id }}) @@ -100,11 +92,24 @@ export default { { name: 'report', title: this.$t('Report'), - type: 'success', can: this.$hasPerm('accounts.view_pushaccountexecution'), callback: function({ row }) { window.open(`/api/v1/accounts/push-account-executions/${row.id}/report/`) } + }, + { + name: 'record', + title: this.$t('Record'), + can: this.$hasPerm('accounts.view_pushsecretrecord'), + callback: function({ row }) { + return this.$router.push({ + name: 'AccountPushList', + query: { + tab: 'AccountPushRecord', + execution_id: row.id + } + }) + } } ] } diff --git a/src/views/accounts/AccountPush/index.vue b/src/views/accounts/AccountPush/index.vue index e5a64bdd3..af4e0b3db 100644 --- a/src/views/accounts/AccountPush/index.vue +++ b/src/views/accounts/AccountPush/index.vue @@ -26,6 +26,14 @@ export default { name: 'AccountPushExecutionList', hidden: !this.$hasPerm('accounts.view_pushaccountexecution'), component: () => import('@/views/accounts/AccountPush/AccountPushExecutionList.vue') + }, + { + title: this.$t('RecordList'), + name: 'AccountPushRecord', + hidden: () => !this.$hasPerm('accounts.view_pushsecretrecord'), + component: () => import( + '@/views/accounts/AccountPush/AccountPushExecutionDetail/AccountPushRecord.vue' + ) } ] } diff --git a/src/views/dashboard/Pam/DataSummary.vue b/src/views/dashboard/Pam/DataSummary.vue index 8c3ececb5..8a26d5847 100644 --- a/src/views/dashboard/Pam/DataSummary.vue +++ b/src/views/dashboard/Pam/DataSummary.vue @@ -56,8 +56,8 @@ export default { this.accountConfig.connectable = data.total_connectivity_ok_accounts // TODO 额外两个字段 - // this.accountConfig.privilegedAccount = data.total_privileged_accounts - // this.accountConfig.regularAccount = data.total_regular_accounts + this.accountConfig.privilegedAccount = data.total_privileged_accounts + this.accountConfig.regularAccount = data.total_regular_accounts } } } diff --git a/src/views/dashboard/Pam/RiskSummary.vue b/src/views/dashboard/Pam/RiskSummary.vue index 61f31022d..709588803 100644 --- a/src/views/dashboard/Pam/RiskSummary.vue +++ b/src/views/dashboard/Pam/RiskSummary.vue @@ -39,7 +39,11 @@ export default { total_weak_password_accounts: '.', total_long_time_change_password_accounts: '.', total_leaked_password_accounts: '.', - total_repeated_password_accounts: '.' + total_repeated_password_accounts: '.', + total_password_expired_accounts: '.', + total_no_admin_account_accounts: '.', + total_password_error_accounts: '.', + total_new_found_accounts: '.' } } }, @@ -83,16 +87,32 @@ export default { } }, { - title: 'Unmanaged' + title: this.$t('Unmanaged'), + body: { + count: this.counter.total_new_found_accounts, + disabled: true + } }, { - title: 'Password expiration' + title: this.$t('Password expiration'), + body: { + count: this.counter.total_password_expired_accounts, + disabled: true + } }, { - title: 'Wrong password' + title: this.$t('Error password'), + body: { + count: this.counter.total_password_error_accounts, + disabled: true + } }, { - title: 'No admin' + title: this.$t('No admin'), + body: { + count: this.counter.total_no_admin_account_accounts, + disabled: true + } } ] } diff --git a/src/views/dashboard/Pam/SummaryChart.vue b/src/views/dashboard/Pam/SummaryChart.vue index 8be33c3d7..ac6ec6211 100644 --- a/src/views/dashboard/Pam/SummaryChart.vue +++ b/src/views/dashboard/Pam/SummaryChart.vue @@ -91,6 +91,7 @@ $text-color: #646A73; padding: 1.25rem; background-color: #FFF; overflow: hidden; + border-radius: 0.25rem; .total-section { display: flex; diff --git a/src/views/dashboard/Pam/index.vue b/src/views/dashboard/Pam/index.vue index ebd372e2c..c85fb363c 100644 --- a/src/views/dashboard/Pam/index.vue +++ b/src/views/dashboard/Pam/index.vue @@ -67,12 +67,11 @@ export default { } .summary-container { - .account-secret-summary, .asset-proportion-summary, .risk-summary, .mission-summery { - border-radius: 0.5rem; + border-radius: 0.25rem; } .account-secret-summary, diff --git a/vue.config.js b/vue.config.js index 7465664f6..25eaa0e31 100644 --- a/vue.config.js +++ b/vue.config.js @@ -95,14 +95,6 @@ module.exports = { }, extensions: ['.vue', '.js', '.json'] }, - plugins: [ - new CompressionWebpackPlugin({ - algorithm: 'gzip', - test: productionGzipExtensions, // 处理所有匹配此 {RegExp} 的资源 - threshold: 10240, // 只处理比这个值大的资源。按字节计算(楼主设置10K以上进行压缩) - minRatio: 0.8 // 只有压缩率比这个值小的资源才会被处理 - }) - ] }, chainWebpack(config) { // it can improve the speed of the first screen, it is recommended to turn on preload @@ -153,6 +145,21 @@ module.exports = { config => config.devtool('cheap-source-map') ) + config + .when(process.env.NODE_ENV === 'production', config => { + config + .plugin('CompressionWebpackPlugin') + .use(CompressionWebpackPlugin, [ + { + algorithm: 'gzip', + test: productionGzipExtensions, // 处理所有匹配此 {RegExp} 的资源 + threshold: 10240, // 只处理比这个值大的资源。按字节计算(楼主设置10K以上进行压缩) + minRatio: 0.8, // 只有压缩率比这个值小的资源才会被处理 + cache: false + } + ]) + }) + config .when(process.env.NODE_ENV !== 'development', config => {