!175 [sync] PR-171: 修改了一些bug

From: @openeuler-sync-bot 
Reviewed-by: @zhu-yuncheng 
Signed-off-by: @zhu-yuncheng
This commit is contained in:
openeuler-ci-bot 2024-02-18 06:43:46 +00:00 committed by Gitee
commit 2d75d383cf
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 130 additions and 1 deletions

View File

@ -0,0 +1,124 @@
From 33ba64d3fe7b96ad2a8d15d053e64f50401059f9 Mon Sep 17 00:00:00 2001
From: Hu gang <18768366022@163.com>
Date: Wed, 17 Jan 2024 14:49:13 +0800
Subject: [PATCH] Modify the task description copy of the create hot patch removal task
---
.../components/CreateRepairTaskDrawer.vue | 7 +++--
src/views/leaks/components/HostTable.vue | 31 ++++++++++---------
2 files changed, 21 insertions(+), 17 deletions(-)
diff --git a/src/views/leaks/components/CreateRepairTaskDrawer.vue b/src/views/leaks/components/CreateRepairTaskDrawer.vue
index b7e4424..a9023da 100644
--- a/src/views/leaks/components/CreateRepairTaskDrawer.vue
+++ b/src/views/leaks/components/CreateRepairTaskDrawer.vue
@@ -241,7 +241,7 @@ const taskTypsbutton = {
'cve fix': '生成修复任务',
'repo set': '设置REPO',
'cve rollback': '生成回滚任务',
- 'hotpatch remove': '热补丁移除任务'
+ 'hotpatch remove': '热补丁移除'
};
const taskTypsEnum = {
'cve fix': 'cve修复',
@@ -486,7 +486,7 @@ export default {
if (this.taskType === 'cve fix') {
this.$message.info('至少需要选择一个CVE才能进行修复!');
} else {
- this.$message.info('至少需要选择一个CVE才能进行回滚!');
+ this.$message.info('至少需要选择一个CVE才能进行移除!');
}
this.hostUnderCveLoading = false;
return true;
@@ -515,6 +515,7 @@ export default {
// 每次展开抽屉时触发替代mounted
handleOpen() {
+ console.log(111);
// inital defualt data
this.visible = true;
this.cveList = this.cveListProps;
@@ -1060,7 +1061,7 @@ export default {
switch (this.taskType) {
case 'hotpatch remove':
this.taskNameDefault = '热补丁移除任务';
- this.taskDescDefault = `移除以下${this.cveList.length}个CVE${this.cveList
+ this.taskDescDefault = `移除以下${this.cveList.length}个CVE对应的热补丁${this.cveList
.map((cve) => cve.cve_id)
.join('、')}`;
break;
diff --git a/src/views/leaks/components/HostTable.vue b/src/views/leaks/components/HostTable.vue
index 1546260..557c71e 100644
--- a/src/views/leaks/components/HostTable.vue
+++ b/src/views/leaks/components/HostTable.vue
@@ -79,43 +79,43 @@
<a-col v-if="standalone">
<a-button @click="handleExport" type="primary">导出</a-button>
</a-col>
- <a-col v-if="!standalone && !fixed && selectedRowKeys.length === 0">
+ <a-col v-if="isStandFixedSelected(standalone, !fixed, selectedRowKeys.length === 0)">
<create-repair-task-drawer
text="生成修复任务"
taskType="cve fix"
:fixed="fixed"
- :cveListProps="cveList"
+ :cveListProps="propData.length !== 0 ? cveList : []"
hostListType="byLoading"
@createSuccess="handleTaskCreateSuccess"
/>
</a-col>
- <a-col v-if="!standalone && !fixed && selectedRowKeys.length !== 0">
+ <a-col v-if="isStandFixedSelected(standalone, !fixed, selectedRowKeys.length !== 0)">
<create-repair-task-drawer
taskType="cve fix"
:fixed="fixed"
- :cveListProps="cveList"
+ :cveListProps="propData.length !== 0 ? cveList : []"
hostListType="bySelection"
:hostList="selectedRowsAll"
@createSuccess="handleTaskCreateSuccess"
/>
</a-col>
- <a-col v-if="!standalone && fixed && selectedRowKeys.length === 0">
+ <a-col v-if="isStandFixedSelected(standalone, fixed, selectedRowKeys.length !== 0)">
<create-repair-task-drawer
- text="生成回滚任务"
- taskType="cve rollback"
+ taskType="hotpatch remove"
:fixed="fixed"
- :cveListProps="cveList"
- hostListType="byLoading"
+ :cveListProps="propData.length !== 0 ? cveList : []"
+ hostListType="bySelection"
+ :hostList="selectedRowsAll"
@createSuccess="handleTaskCreateSuccess"
/>
</a-col>
- <a-col v-if="!standalone && fixed && selectedRowKeys.length !== 0">
+ <a-col v-if="isStandFixedSelected(standalone, fixed, selectedRowKeys.length === 0)">
<create-repair-task-drawer
- taskType="cve rollback"
+ text="热补丁移除"
+ taskType="hotpatch remove"
:fixed="fixed"
- :cveListProps="cveList"
- hostListType="bySelection"
- :hostList="selectedRowsAll"
+ :cveListProps="propData.length !== 0 ? cveList : []"
+ hostListType="byLoading"
@createSuccess="handleTaskCreateSuccess"
/>
</a-col>
@@ -259,6 +259,9 @@ export default {
}
},
computed: {
+ isStandFixedSelected() {
+ return (standalone, fixed, selected) => !standalone && fixed && selected;
+ },
hostTableColumnsStandalone() {
let {filters} = this;
filters = filters || {};
--
2.33.0

View File

@ -2,7 +2,7 @@
Name: aops-hermes
Version: v1.4.0
Release: 6
Release: 7
Summary: Web for an intelligent diagnose frame
License: MulanPSL2
URL: https://gitee.com/openeuler/%{name}
@ -17,6 +17,7 @@ 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
Patch010: 010-modify-the-task-description-copy-of-the-create-hot-patch-removal-task.patch
BuildRequires: nodejs node-gyp nodejs-yarn
@ -52,6 +53,10 @@ cp -r deploy/aops-hermes.service %{buildroot}/usr/lib/systemd/system/
%changelog
* Wed Jan 17 2024 Hu gang<18768366022@163.com> - v1.4.0-7
- Modify the task description copy of the create hot patch removal task
- remove create rollback button in cve detail,add hotpatch button in cve detail
* Wed Dec 27 2023 Hu gang<18768366022@163.com> - v1.4.0-6
- Fix hot patch prompts are only executed ifexecuted