feat(web): 审计页支持按结果筛选错误日志
- AuditListParams 增加 result 参数并透传 - 审计页筛选工具栏增加'结果'下拉(成功/失败),选中即筛出对应事件 - 管理员选'失败'即可集中查看错误事件(如重名申请冲突)
This commit is contained in:
@@ -157,6 +157,7 @@ export interface AuditListParams {
|
|||||||
action?: string
|
action?: string
|
||||||
resource_type?: string
|
resource_type?: string
|
||||||
resource_id?: string
|
resource_id?: string
|
||||||
|
result?: string
|
||||||
since?: string
|
since?: string
|
||||||
until?: string
|
until?: string
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ const filter = reactive({
|
|||||||
actor: '',
|
actor: '',
|
||||||
action: '',
|
action: '',
|
||||||
resource_type: '',
|
resource_type: '',
|
||||||
|
result: '',
|
||||||
since: '',
|
since: '',
|
||||||
until: '',
|
until: '',
|
||||||
})
|
})
|
||||||
@@ -29,6 +30,7 @@ async function load() {
|
|||||||
actor: filter.actor || undefined,
|
actor: filter.actor || undefined,
|
||||||
action: filter.action || undefined,
|
action: filter.action || undefined,
|
||||||
resource_type: filter.resource_type || undefined,
|
resource_type: filter.resource_type || undefined,
|
||||||
|
result: filter.result || undefined,
|
||||||
since: filter.since ? new Date(filter.since).toISOString() : undefined,
|
since: filter.since ? new Date(filter.since).toISOString() : undefined,
|
||||||
until: filter.until ? new Date(filter.until).toISOString() : undefined,
|
until: filter.until ? new Date(filter.until).toISOString() : undefined,
|
||||||
})
|
})
|
||||||
@@ -71,6 +73,10 @@ onMounted(load)
|
|||||||
<el-option label="密钥" value="ssh_key" />
|
<el-option label="密钥" value="ssh_key" />
|
||||||
<el-option label="申请" value="approval" />
|
<el-option label="申请" value="approval" />
|
||||||
</el-select>
|
</el-select>
|
||||||
|
<el-select v-model="filter.result" placeholder="结果" clearable style="width: 110px" @change="onSearch">
|
||||||
|
<el-option label="成功" value="success" />
|
||||||
|
<el-option label="失败" value="failed" />
|
||||||
|
</el-select>
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="filter.since"
|
v-model="filter.since"
|
||||||
type="datetime"
|
type="datetime"
|
||||||
|
|||||||
Reference in New Issue
Block a user