95 lines
3.0 KiB
Diff
95 lines
3.0 KiB
Diff
From 46a4586b79ccf57c7f4ca7ee9826ac48cb31f687 Mon Sep 17 00:00:00 2001
|
|
From: wkl505997900 <2313665567@qq.com>
|
|
Date: Fri, 2 Jun 2023 18:20:05 +0800
|
|
Subject: [PATCH] update hotpatch
|
|
|
|
---
|
|
src/api/leaks.js | 3 +-
|
|
src/views/leaks/components/CvesTable.vue | 41 +++++++++++++++++++++++-
|
|
2 files changed, 42 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/src/api/leaks.js b/src/api/leaks.js
|
|
index a6a0d63..b98cb49 100644
|
|
--- a/src/api/leaks.js
|
|
+++ b/src/api/leaks.js
|
|
@@ -250,7 +250,8 @@ export function getCveUnderHost({ tableInfo, ...parameter }) {
|
|
affected: tableInfo.affected,
|
|
fixed: tableInfo.fixed,
|
|
severity: tableInfo.filters.severity || [],
|
|
- hotpatch: tableInfo.filters.hotpatch || []
|
|
+ hotpatch: tableInfo.filters.hotpatch || [],
|
|
+ hp_status: tableInfo.filters.hp_status || []
|
|
},
|
|
page: tableInfo.pagination.current,
|
|
per_page: tableInfo.pagination.pageSize
|
|
diff --git a/src/views/leaks/components/CvesTable.vue b/src/views/leaks/components/CvesTable.vue
|
|
index 97c4326..42c9a70 100644
|
|
--- a/src/views/leaks/components/CvesTable.vue
|
|
+++ b/src/views/leaks/components/CvesTable.vue
|
|
@@ -321,7 +321,20 @@ export default {
|
|
text: '否',
|
|
value: 0
|
|
}
|
|
- ] : null,
|
|
+ ] : [
|
|
+ {
|
|
+ text: '是(ACCEPTED)',
|
|
+ value: 1
|
|
+ },
|
|
+ {
|
|
+ text: '是(ACTIVED)',
|
|
+ value: 2
|
|
+ },
|
|
+ {
|
|
+ text: '否',
|
|
+ value: 0
|
|
+ }
|
|
+ ],
|
|
scopedSlots: {customRender: this.hotpatchContent === '热补丁支持' ? 'hotpatch' : 'fixStatus'}
|
|
}
|
|
];
|
|
@@ -410,14 +423,40 @@ export default {
|
|
this.getCvesAll()
|
|
this.handleReset();
|
|
},
|
|
+ assignFiltersFixStatus(fixStatus) {
|
|
+ this.filters.hotpatch = []
|
|
+ this.filters.hp_status = []
|
|
+ fixStatus.forEach(value => {
|
|
+ if (value === 1) {
|
|
+ if (!this.filters.hotpatch.includes(1)) {
|
|
+ this.filters.hotpatch.push(1)
|
|
+ }
|
|
+ this.filters.hp_status.push('ACCEPTED')
|
|
+ }
|
|
+ if (value === 2) {
|
|
+ if (!this.filters.hotpatch.includes(1)) {
|
|
+ this.filters.hotpatch.push(1)
|
|
+ }
|
|
+ this.filters.hp_status.push('ACTIVED')
|
|
+ }
|
|
+ if (value === 0) {
|
|
+ this.filters.hotpatch.push(0)
|
|
+ }
|
|
+ })
|
|
+ },
|
|
handleTableChange(pagination, filters, sorter) {
|
|
// 存储翻页状态
|
|
this.pagination = pagination;
|
|
+
|
|
this.filters = Object.assign({}, this.filters, filters);
|
|
+ if (this.filters['fixStatus'] != null) {
|
|
+ this.assignFiltersFixStatus(this.filters['fixStatus'])
|
|
+ }
|
|
this.sorter = sorter;
|
|
// 出发排序、筛选、分页时,重新请求主机列表
|
|
this.getCves();
|
|
},
|
|
+
|
|
onSelectChange(selectedRowKeys, selectedRows) {
|
|
const tableData = this.standalone ? this.tableData : this.inputList;
|
|
this.selectedRowKeys = selectedRowKeys;
|
|
--
|
|
Gitee
|
|
|