Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature;: 审计模块增加续期通知类型业务 #2667

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions frontend/src/language/lang/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -1182,6 +1182,7 @@ export const m = {
'管理类API白名单创建': 'Management class API whitelist create',
'管理类API白名单删除': 'Management class API whitelist delete',
'操作敏感等级更新': 'Action sensitivity level update',
'续期通知更新': 'Renewal notice update',
'回滚事件': 'Rollback event',
'管理空间用户组成员续期': 'Management space group members renew',
'用户组成员续期': 'Group members renew',
Expand Down
1 change: 1 addition & 0 deletions frontend/src/language/lang/zh.js
Original file line number Diff line number Diff line change
Expand Up @@ -1177,6 +1177,7 @@ export const m = {
'管理类API白名单创建': '管理类API白名单创建',
'管理类API白名单删除': '管理类API白名单删除',
'操作敏感等级更新': '操作敏感等级更新',
'续期通知更新': '续期通知更新',
'回滚事件': '回滚事件',
'管理空间用户组成员续期': '管理空间用户组成员续期',
'用户组成员续期': '用户组成员续期',
Expand Down
116 changes: 66 additions & 50 deletions frontend/src/views/audit/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
ref="tableRef"
row-key="id"
v-bkloading="{ isLoading: tableLoading, opacity: 1 }"
:cell-class-name="getCellClass"
@page-change="pageChange"
@page-limit-change="limitChange"
@expand-change="handleExpandChange">
Expand Down Expand Up @@ -399,7 +400,8 @@
'management.api.allow.list.config.create': this.$t(`m.audit['管理类API白名单创建']`),
'management.api.allow.list.config.delete': this.$t(`m.audit['管理类API白名单删除']`),
'group.transfer': this.$t(`m.audit['用户组权限交接']`),
'action.sensitivity.level.update': this.$t(`m.audit['操作敏感等级更新']`)
'action.sensitivity.level.update': this.$t(`m.audit['操作敏感等级更新']`),
'role.update.notification.config': this.$t(`m.audit['续期通知更新']`)
},
currentMonth: '',
noDetailType: NO_DETAIL_TYPE,
Expand Down Expand Up @@ -541,14 +543,21 @@
await this.fetchAuditList();
},

getCellClass ({ row, column, rowIndex, columnIndex }) {
if (columnIndex === 0 && ['role.update.notification.config'].includes(row.type)) {
return 'audit-renewal-notice-cell-cls';
}
return '';
},

refreshCurrentQuery () {
const { limit, current } = this.pagination;
const params = {};
const queryParams = {
limit,
current,
month: this.currentMonth,
...this.searchParams
...this.searchParams
};
window.history.replaceState({}, '', `?${buildURLParams(queryParams)}`);
for (const key in this.searchParams) {
Expand All @@ -564,10 +573,10 @@
}
}
return {
...params,
limit,
current,
month: this.currentMonth
...params,
limit,
current,
month: this.currentMonth
};
},

Expand All @@ -591,7 +600,7 @@
object_type: '',
object_id: '',
status: '',
...this.searchParams
...this.searchParams
};
try {
const { code, data } = await this.$store.dispatch('audit/getAuditList', params);
Expand Down Expand Up @@ -704,7 +713,8 @@
{ id: 'authorization.api.allow.list.config.delete', name: this.$t(`m.audit['授权类API白名单删除']`) },
{ id: 'management.api.allow.list.config.create', name: this.$t(`m.audit['管理类API白名单创建']`) },
{ id: 'management.api.allow.list.config.delete', name: this.$t(`m.audit['管理类API白名单删除']`) },
{ id: 'action.sensitivity.level.update', name: this.$t(`m.audit['操作敏感等级更新']`) }
{ id: 'action.sensitivity.level.update', name: this.$t(`m.audit['操作敏感等级更新']`) },
{ id: 'role.update.notification.config', name: this.$t(`m.audit['续期通知更新']`) }
];
if (value === '') {
return Promise.resolve(list);
Expand Down Expand Up @@ -786,7 +796,7 @@
});
}
if (this.onlyExtraInfoType.includes(row.detail.type)) {
if (row.detail.type !== 'role.group.renew' && row.detail.type !== 'template.version.sync') {
if (!['role.group.renew', 'template.version.sync'].includes(row.detail.type)) {
row.detail.extra_info.policies.forEach(item => {
item.system_id = row.detail.extra_info.system.id;
item.system_name = row.detail.extra_info.system.name;
Expand All @@ -804,48 +814,54 @@
}
};
</script>
<style lang="postcss">
.iam-audit-wrapper {
.audit-search-select {
margin-left: 10px;
float: right;

<style lang="postcss" scoped>
.iam-audit-wrapper {
.audit-search-select {
margin-left: 10px;
float: right;
}
.audit-table {
margin-top: 16px;
border-right: none;
border-bottom: none;
.bk-table-expanded-cell {
padding: 0 30px 0 45px !important;
}
&.set-border {
border-right: 1px solid #dfe0e5;
border-bottom: 1px solid #dfe0e5;
}
.audit-detail-wrapper {
position: relative;
padding: 16px 50px 16px 165px;
min-height: 60px;
p {
line-height: 24px;
}
.empty-wrapper {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
img {
width: 60px;
}
.audit-table {
margin-top: 16px;
border-right: none;
border-bottom: none;
.bk-table-expanded-cell {
padding: 0 30px 0 45px !important;
}
&.set-border {
border-right: 1px solid #dfe0e5;
border-bottom: 1px solid #dfe0e5;
}
.audit-detail-wrapper {
position: relative;
padding: 16px 50px 16px 165px;
min-height: 60px;
p {
line-height: 24px;
}
.empty-wrapper {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
img {
width: 60px;
}
}
}
.audit-detail-table {
border: none;
.bk-table-row-last {
td {
border-bottom: 1px solid #dfe0e5 !important;
}
}
}
}
}
.audit-detail-table {
border: none;
.bk-table-row-last {
td {
border-bottom: 1px solid #dfe0e5 !important;
}
}
}
/deep/ .audit-renewal-notice-cell-cls {
.cell {
display: none;
}
}
}
}
</style>