From f090d2ff01d335c20d5180382d2be89f22757b32 Mon Sep 17 00:00:00 2001 From: Hu gang <18768366022@163.com> Date: Wed, 27 Dec 2023 17:16:24 +0800 Subject: [PATCH] fix hot patch prompts are only executed ifexecuted (cherry picked from commit b94d7e2e764ec9920b93a1c53d73841d3a355c9f) --- ...rompts-are-only-executed-if-executed.patch | 158 ++++++++++++++++++ aops-hermes.spec | 7 +- 2 files changed, 164 insertions(+), 1 deletion(-) create mode 100644 009-fix-hot-patch-prompts-are-only-executed-if-executed.patch diff --git a/009-fix-hot-patch-prompts-are-only-executed-if-executed.patch b/009-fix-hot-patch-prompts-are-only-executed-if-executed.patch new file mode 100644 index 0000000..7d6632e --- /dev/null +++ b/009-fix-hot-patch-prompts-are-only-executed-if-executed.patch @@ -0,0 +1,158 @@ +From a554b248224e1d4ab8030cb3c353eb835ed654ce Mon Sep 17 00:00:00 2001 +From: Hu gang <18768366022@163.com> +Date: Tue, 26 Dec 2023 16:54:57 +0800 +Subject: [PATCH] fix: hot patch prompts are only executed if executed + immediately + +--- + .../assests/components/HostChartInfo.vue | 2 +- + src/views/leaks/LeakTaskDetail.vue | 44 +++++++++++++++++-- + .../components/CreateRepairTaskDrawer.vue | 7 ++- + 3 files changed, 47 insertions(+), 6 deletions(-) + +diff --git a/src/views/assests/components/HostChartInfo.vue b/src/views/assests/components/HostChartInfo.vue +index d9e8fe7..8a144d8 100644 +--- a/src/views/assests/components/HostChartInfo.vue ++++ b/src/views/assests/components/HostChartInfo.vue +@@ -124,7 +124,7 @@ export default { + getHostMetrics({ + query_ip: this.queryIp + }).then((res) => { +- if (res) { ++ if (res.data) { + this.metrics = res.data.results; + if (this.selectedMetrics.length < 1) { + this.selectedMetrics = res.data.results.slice(0, 4); +diff --git a/src/views/leaks/LeakTaskDetail.vue b/src/views/leaks/LeakTaskDetail.vue +index 134a0cb..38bc4f2 100644 +--- a/src/views/leaks/LeakTaskDetail.vue ++++ b/src/views/leaks/LeakTaskDetail.vue +@@ -170,7 +170,12 @@ + + +
{{ cves }}
++ ++ {{ cves }} ++只执行热补丁任务,冷补丁任务需手动执行
++++ {{ isExcuteASAP ? '已自动执行热补丁任务,冷补丁任务需手动执行' : '请优先执行热补丁任务' }} ++
+{{ countDown }}秒后回到原页面
+ + +@@ -307,6 +309,8 @@ export default { + }, + data() { + return { ++ // 是否立即执行 ++ isExcuteASAP: false, + hostListparams: [], + fixParams: {}, + // 修复任务入参 +@@ -788,6 +792,7 @@ export default { + } + }, + handleSubmit(excuteASAP = false) { ++ this.isExcuteASAP = excuteASAP; + const _this = this; + this.form.validateFields((err, values) => { + if (!err) { +-- +2.33.0 + diff --git a/aops-hermes.spec b/aops-hermes.spec index 1ec102e..3d9b805 100644 --- a/aops-hermes.spec +++ b/aops-hermes.spec @@ -2,7 +2,7 @@ Name: aops-hermes Version: v1.4.0 -Release: 5 +Release: 6 Summary: Web for an intelligent diagnose frame License: MulanPSL2 URL: https://gitee.com/openeuler/%{name} @@ -16,6 +16,8 @@ Patch005: 005-add-input-text-limit.patch Patch006: 006-host-status-adaption.patch Patch007: 007-host-info-and-generate-task.patch Patch008: 008-fix-diagnosis.patch +Patch009: 009-fix-hot-patch-prompts-are-only-executed-if-executed.patch + BuildRequires: nodejs node-gyp nodejs-yarn Requires: nginx @@ -50,6 +52,9 @@ cp -r deploy/aops-hermes.service %{buildroot}/usr/lib/systemd/system/ %changelog +* Wed Dec 27 2023 Hu gang<18768366022@163.com> - v1.4.0-6 +- Fix hot patch prompts are only executed ifexecuted + * Fri Dec 22 2023 Hu gang<18768366022@163.com> - v1.4.0-5 - Fix diagnosis