125 lines
5.1 KiB
Diff
125 lines
5.1 KiB
Diff
|
|
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
|
|||
|
|
|