diff --git a/0003-add-Hot-patch-Filtering-function.patch b/0003-add-Hot-patch-Filtering-function.patch new file mode 100644 index 0000000..37fb7aa --- /dev/null +++ b/0003-add-Hot-patch-Filtering-function.patch @@ -0,0 +1,94 @@ +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 + diff --git a/aops-hermes.spec b/aops-hermes.spec index ebd9d32..832345e 100644 --- a/aops-hermes.spec +++ b/aops-hermes.spec @@ -2,7 +2,7 @@ Name: aops-hermes Version: v1.2.1 -Release: 3 +Release: 4 Summary: Web for an intelligent diagnose frame License: MulanPSL2 URL: https://gitee.com/openeuler/%{name} @@ -10,6 +10,7 @@ Source0: %{name}-%{version}.tar.gz Source1: node-modules.tar.gz Patch0001: 0001-Resolve-issues-such-as-abnormal-display.patch Patch0002: 0002-Host-management-field-changes-and-hot-patch-repair.patch +Patch0003: 0003-add-Hot-patch-Filtering-function.patch BuildRequires: nodejs node-gyp nodejs-yarn @@ -45,6 +46,9 @@ cp -r deploy/aops-hermes.service %{buildroot}/usr/lib/systemd/system/ %changelog +* Fri Jun 2 2023 wangkunlong<505997900@qq.com> - v1.2.1-4 +- Add Hot patch Filtering function + * Fri Jun 2 2023 wangkunlong<505997900@qq.com> - v1.2.1-3 - Add the 'accepted' parameter to the interface for creating cve repair tasks - Modify the cve list under the host and the hot patch support in the affected host list under cve to display two fields: hot patch repair and status