From d1d1cf858dc1b27eced2a6be04c2e6bf041356e0 Mon Sep 17 00:00:00 2001 From: wkl505997900 <2313665567@qq.com> Date: Wed, 18 Oct 2023 17:00:48 +0800 Subject: [PATCH] update 20.03 SP4 code --- ...f-leaving-the-page-polling-interface.patch | 155 +++++++ ...olving-the-problem-of-cve-fix-params.patch | 25 + ...login-key-to-asset-management-module.patch | 427 ++++++++++++++++++ ...-plugin-and-fingerprint-waveform-bar.patch | 34 ++ 0007-Fix-five-issues.patch | 99 ++++ ...with-polling-and-refreshing-displays.patch | 98 ++++ ...-Correction-of-copyright-information.patch | 28 ++ ...Optimize-host-scanning-polling-logic.patch | 42 ++ ...nt-for-generating-cve-and-repo-tasks.patch | 74 +++ 0012-Fix-Upload-host-logic.patch | 278 ++++++++++++ ...Fix-the-issue-of-incorrect-parameter.patch | 29 ++ aops-hermes.spec | 40 +- 12 files changed, 1327 insertions(+), 2 deletions(-) create mode 100644 0003-Solving-the-query-problem-of-leaving-the-page-polling-interface.patch create mode 100644 0004-Solving-the-problem-of-cve-fix-params.patch create mode 100644 0005-Add-login-key-to-asset-management-module.patch create mode 100644 0006-Temporarily-hide-the-plugin-and-fingerprint-waveform-bar.patch create mode 100644 0007-Fix-five-issues.patch create mode 100644 0008-Fix-issues-with-polling-and-refreshing-displays.patch create mode 100644 0009-Correction-of-copyright-information.patch create mode 100644 0010-Optimize-host-scanning-polling-logic.patch create mode 100644 0011-Add-null-judgment-for-generating-cve-and-repo-tasks.patch create mode 100644 0012-Fix-Upload-host-logic.patch create mode 100644 0013-Fix-the-issue-of-incorrect-parameter.patch diff --git a/0003-Solving-the-query-problem-of-leaving-the-page-polling-interface.patch b/0003-Solving-the-query-problem-of-leaving-the-page-polling-interface.patch new file mode 100644 index 0000000..5b5c41a --- /dev/null +++ b/0003-Solving-the-query-problem-of-leaving-the-page-polling-interface.patch @@ -0,0 +1,155 @@ +From c8f6d03755791bea887cc915099344df1c16d19b Mon Sep 17 00:00:00 2001 +From: wkl505997900 <2313665567@qq.com> +Date: Thu, 21 Sep 2023 14:33:45 +0800 +Subject: [PATCH] fix an polling issue + +--- + src/views/leaks/HostLeakDetail.vue | 7 +++++++ + src/views/leaks/LeakTaskDetail.vue | 21 +++++++++++++-------- + src/views/leaks/LeakTaskList.vue | 7 +++++++ + src/views/leaks/components/CvesTable.vue | 6 ------ + src/views/leaks/components/HostTable.vue | 5 ++--- + 5 files changed, 29 insertions(+), 17 deletions(-) + +diff --git a/src/views/leaks/HostLeakDetail.vue b/src/views/leaks/HostLeakDetail.vue +index 477df57..3327f80 100644 +--- a/src/views/leaks/HostLeakDetail.vue ++++ b/src/views/leaks/HostLeakDetail.vue +@@ -257,6 +257,13 @@ export default { + mounted: function () { + this.getDetail(); + this.getScanStatue(); ++ }, ++ beforeDestroy() { ++ // 离开页面前,若当前存在轮询,清除轮询 ++ if (this.getScanStatusTimeout) { ++ clearInterval(this.getScanStatusTimeout); ++ this.getScanStatusTimeout = null; ++ } + } + }; + +diff --git a/src/views/leaks/LeakTaskDetail.vue b/src/views/leaks/LeakTaskDetail.vue +index 28b7272..f4c84c6 100644 +--- a/src/views/leaks/LeakTaskDetail.vue ++++ b/src/views/leaks/LeakTaskDetail.vue +@@ -285,6 +285,8 @@ export default { + expandedRowKeys: [], + rpmrecord: {}, + propType: '', ++ // 轮询计时器 ++ CveScanStatueTimeout: null, + progressUpdateCaller: null, + reportvisible: false, + runningCveIds: [], +@@ -544,6 +546,7 @@ export default { + updateProgress(taskList) { + const _this = this; + this.progressLoading = true; ++ clearTimeout(this.progressUpdateCaller); + getTaskProgress({taskList}) + .then(function (res) { + _this.detail.statuses = res.data.result && res.data.result[_this.taskId]; +@@ -628,6 +631,7 @@ export default { + updateCveProgress(taskId, cveList) { + const _this = this; + this.cveProgressIsLoading = true; ++ clearTimeout(this.CveScanStatueTimeout); + getCveProgressUnderCveTask({ + taskId, + cveList +@@ -637,7 +641,7 @@ export default { + _this.runningCveIds = _this.getRunningCve(res.data.result); + _this.reportvisible = _this.getReportVisible(res.data.result); + if (_this.runningCveIds.length > 0) { +- setTimeout(function () { ++ _this.CveScanStatueTimeout = setTimeout(function () { + _this.updateCveProgress(taskId, cveList); + }, configs.taskProgressUpdateInterval); + } else { +@@ -860,16 +864,17 @@ export default { + }); + } + }, +- beforeRouteLeave(to, from, next) { +- // 路由跳转前,清除轮询 +- if (this.progressUpdateCaller) { ++ mounted: function () { ++ this.getInitalData(); ++ }, ++ beforeDestroy() { ++ // 离开页面前,若当前存在轮询,清除轮询 ++ if (this.progressUpdateCaller || this.CveScanStatueTimeout) { + clearInterval(this.progressUpdateCaller); ++ clearInterval(this.CveScanStatueTimeout); + this.progressUpdateCaller = null; ++ this.CveScanStatueTimeout = null; + } +- next(); +- }, +- mounted: function () { +- this.getInitalData(); + } + }; + +diff --git a/src/views/leaks/LeakTaskList.vue b/src/views/leaks/LeakTaskList.vue +index 262fa42..df8869a 100644 +--- a/src/views/leaks/LeakTaskList.vue ++++ b/src/views/leaks/LeakTaskList.vue +@@ -419,6 +419,13 @@ export default { + }, + mounted: function () { + this.getTaskList(); ++ }, ++ beforeDestroy() { ++ // 离开页面前,若当前存在轮询,清除轮询 ++ if (this.progressUpdateCaller) { ++ clearInterval(this.progressUpdateCaller); ++ this.progressUpdateCaller = null; ++ } + } + }; + +diff --git a/src/views/leaks/components/CvesTable.vue b/src/views/leaks/components/CvesTable.vue +index 47eed62..84e23fb 100644 +--- a/src/views/leaks/components/CvesTable.vue ++++ b/src/views/leaks/components/CvesTable.vue +@@ -146,7 +146,6 @@ + :row-key="innerrecord => fixed ? record.cve_id + innerrecord.installed_rpm : record.cve_id + innerrecord.available_rpm + innerrecord.installed_rpm" + :columns="fixed ? (standalone ? ainnerColumns : binnerColumns) : (standalone ? aloneinnerColumns : innerColumns)" + :data-source="record.rpms || []" +- :locale="tablenodata" + :rowSelection="innerRowSelection" + :pagination="false"> +