!97 更新版本到v1.3.4
From: @wkl505997900 Reviewed-by: @zhu-yuncheng Signed-off-by: @zhu-yuncheng
This commit is contained in:
commit
483d5a2067
@ -1,211 +0,0 @@
|
|||||||
From 6b94960459129e5774af83335597d8144f6ee57d Mon Sep 17 00:00:00 2001
|
|
||||||
From: wkl505997900 <2313665567@qq.com>
|
|
||||||
Date: Tue, 30 May 2023 17:17:45 +0800
|
|
||||||
Subject: [PATCH] Resolve issues such as abnormal display
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
---
|
|
||||||
src/views/leaks/LeakTaskDetail.vue | 14 ++--
|
|
||||||
src/views/leaks/LeakTaskList.vue | 10 ++-
|
|
||||||
.../components/CreateRepairTaskDrawer.vue | 6 ++
|
|
||||||
src/views/leaks/components/CvesTable.vue | 4 +-
|
|
||||||
.../components/HostStatusInTaskDrawer.vue | 22 +++++--
|
|
||||||
src/views/leaks/components/HostTable.vue | 4 +-
|
|
||||||
6 files changed, 45 insertions(+), 15 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/views/leaks/LeakTaskDetail.vue b/src/views/leaks/LeakTaskDetail.vue
|
|
||||||
index ca3debd..5a3a6cf 100644
|
|
||||||
--- a/src/views/leaks/LeakTaskDetail.vue
|
|
||||||
+++ b/src/views/leaks/LeakTaskDetail.vue
|
|
||||||
@@ -156,8 +156,9 @@
|
|
||||||
</a-table>
|
|
||||||
</a-card>
|
|
||||||
<host-status-in-task-drawer
|
|
||||||
- :visible="hostListUnderCveVisible"
|
|
||||||
- @close="closeHostListUnderCve"
|
|
||||||
+ :visible="hostListUnderCveVisible"
|
|
||||||
+ :taskType="taskType"
|
|
||||||
+ @close="closeHostListUnderCve"
|
|
||||||
:taskId="taskId"
|
|
||||||
:cveId="hostListOfCveId" />
|
|
||||||
</page-header-wrapper>
|
|
||||||
@@ -339,11 +340,16 @@ export default {
|
|
||||||
width: 140,
|
|
||||||
scopedSlots: {customRender: 'status'},
|
|
||||||
filteredValue: filters.status || null,
|
|
||||||
- filters: [
|
|
||||||
+ filters: this.taskType === 'cve fix' ? [
|
|
||||||
{text: '修复成功', value: 'succeed'},
|
|
||||||
{text: '待修复', value: 'fail'},
|
|
||||||
{text: '运行中', value: 'running'},
|
|
||||||
{text: '未知', value: 'unknown'}
|
|
||||||
+ ] : [
|
|
||||||
+ {text: '回滚成功', value: 'succeed'},
|
|
||||||
+ {text: '待回滚', value: 'fail'},
|
|
||||||
+ {text: '运行中', value: 'running'},
|
|
||||||
+ {text: '未知', value: 'unknown'}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
];
|
|
||||||
@@ -705,7 +711,7 @@ export default {
|
|
||||||
if (!this.filters) {
|
|
||||||
this.filters = {};
|
|
||||||
}
|
|
||||||
- if (this.taskType === 'cve fix') {
|
|
||||||
+ if (this.taskType === 'cve fix' || this.taskType === 'cve rollback') {
|
|
||||||
if (text !== '') {
|
|
||||||
this.filters.cveId = text;
|
|
||||||
} else {
|
|
||||||
diff --git a/src/views/leaks/LeakTaskList.vue b/src/views/leaks/LeakTaskList.vue
|
|
||||||
index 9cf3d34..d40d8d8 100644
|
|
||||||
--- a/src/views/leaks/LeakTaskList.vue
|
|
||||||
+++ b/src/views/leaks/LeakTaskList.vue
|
|
||||||
@@ -30,9 +30,9 @@
|
|
||||||
</a-row>
|
|
||||||
</a-row>
|
|
||||||
<a-table
|
|
||||||
- rowKey="task_id"
|
|
||||||
- :columns="columns"
|
|
||||||
- :data-source="tableData"
|
|
||||||
+ rowKey="task_id"
|
|
||||||
+ :columns="columns"
|
|
||||||
+ :data-source="tableData"
|
|
||||||
:pagination="pagination"
|
|
||||||
:row-selection="rowSelection"
|
|
||||||
@change="handleTableChange"
|
|
||||||
@@ -204,6 +204,10 @@ export default {
|
|
||||||
{
|
|
||||||
text: 'repo set',
|
|
||||||
value: 'repo set'
|
|
||||||
+ },
|
|
||||||
+ {
|
|
||||||
+ text: 'cve rollback',
|
|
||||||
+ value: 'cve rollback'
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
diff --git a/src/views/leaks/components/CreateRepairTaskDrawer.vue b/src/views/leaks/components/CreateRepairTaskDrawer.vue
|
|
||||||
index e25cd89..79d4920 100644
|
|
||||||
--- a/src/views/leaks/components/CreateRepairTaskDrawer.vue
|
|
||||||
+++ b/src/views/leaks/components/CreateRepairTaskDrawer.vue
|
|
||||||
@@ -40,6 +40,12 @@
|
|
||||||
<a-icon slot="unCheckedChildren" type="close" />
|
|
||||||
</a-switch>
|
|
||||||
</a-form-item> -->
|
|
||||||
+ <a-form-item label="是否accept" v-if="taskType === 'cve fix'">
|
|
||||||
+ <a-switch :checked="isResetChecked" @click="handleResetChanage">
|
|
||||||
+ <a-icon slot="checkedChildren" type="check" />
|
|
||||||
+ <a-icon slot="unCheckedChildren" type="close" />
|
|
||||||
+ </a-switch>
|
|
||||||
+ </a-form-item>
|
|
||||||
<a-form-item label="选择REPO" v-if="taskType === 'repo set'">
|
|
||||||
<a-select
|
|
||||||
v-decorator="['repo', {rules: [{required: true, message: '请选择REPO'}]}]"
|
|
||||||
diff --git a/src/views/leaks/components/CvesTable.vue b/src/views/leaks/components/CvesTable.vue
|
|
||||||
index 2922fe7..bca7fcd 100644
|
|
||||||
--- a/src/views/leaks/components/CvesTable.vue
|
|
||||||
+++ b/src/views/leaks/components/CvesTable.vue
|
|
||||||
@@ -392,7 +392,7 @@ export default {
|
|
||||||
}
|
|
||||||
this.selectedRowKeys = []
|
|
||||||
this.getCvesAll()
|
|
||||||
- this.getCves();
|
|
||||||
+ this.handleReset();
|
|
||||||
} else {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
@@ -404,7 +404,7 @@ export default {
|
|
||||||
}
|
|
||||||
this.selectedRowKeys = []
|
|
||||||
this.getCvesAll()
|
|
||||||
- this.getCves();
|
|
||||||
+ this.handleReset();
|
|
||||||
},
|
|
||||||
handleTableChange(pagination, filters, sorter) {
|
|
||||||
// 存储翻页状态
|
|
||||||
diff --git a/src/views/leaks/components/HostStatusInTaskDrawer.vue b/src/views/leaks/components/HostStatusInTaskDrawer.vue
|
|
||||||
index b31435b..68f04b5 100644
|
|
||||||
--- a/src/views/leaks/components/HostStatusInTaskDrawer.vue
|
|
||||||
+++ b/src/views/leaks/components/HostStatusInTaskDrawer.vue
|
|
||||||
@@ -4,7 +4,10 @@
|
|
||||||
<a-table rowKey="host_id" :columns="columns" :data-source="tableData" :pagination="false"
|
|
||||||
:loading="tableIsLoading" bordered>
|
|
||||||
<div slot="status" slot-scope="status">
|
|
||||||
- <span><a-badge :status="statusValueMap[status]" />{{ statusTextMap[status] }}</span>
|
|
||||||
+ <span>
|
|
||||||
+ <a-badge :status="statusValueMap[status]" />
|
|
||||||
+ {{ taskType === 'cve fix' ? fixStatusTextMap[status] : rollbackStatusTextMap[status] }}
|
|
||||||
+ </span>
|
|
||||||
</div>
|
|
||||||
</a-table>
|
|
||||||
</a-drawer>
|
|
||||||
@@ -17,13 +20,20 @@
|
|
||||||
|
|
||||||
import {getHostOfCveInCveTask} from '@/api/leaks';
|
|
||||||
|
|
||||||
-const statusTextMap = {
|
|
||||||
+const fixStatusTextMap = {
|
|
||||||
succeed: '已修复',
|
|
||||||
fail: '未修复',
|
|
||||||
running: '运行中',
|
|
||||||
unknown: '未知'
|
|
||||||
};
|
|
||||||
|
|
||||||
+const rollbackStatusTextMap = {
|
|
||||||
+ succeed: '已回滚',
|
|
||||||
+ fail: '待回滚',
|
|
||||||
+ running: '运行中',
|
|
||||||
+ unknown: '未知'
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
const statusValueMap = {
|
|
||||||
succeed: 'success',
|
|
||||||
fail: 'error',
|
|
||||||
@@ -45,14 +55,18 @@ export default {
|
|
||||||
cveId: {
|
|
||||||
type: String,
|
|
||||||
default: null
|
|
||||||
+ },
|
|
||||||
+ taskType: {
|
|
||||||
+ type: String,
|
|
||||||
+ default: 'cve fix'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
tableData: [],
|
|
||||||
tableIsLoading: false,
|
|
||||||
-
|
|
||||||
- statusTextMap,
|
|
||||||
+ rollbackStatusTextMap,
|
|
||||||
+ fixStatusTextMap,
|
|
||||||
statusValueMap
|
|
||||||
};
|
|
||||||
},
|
|
||||||
diff --git a/src/views/leaks/components/HostTable.vue b/src/views/leaks/components/HostTable.vue
|
|
||||||
index 5011b21..079f786 100644
|
|
||||||
--- a/src/views/leaks/components/HostTable.vue
|
|
||||||
+++ b/src/views/leaks/components/HostTable.vue
|
|
||||||
@@ -281,7 +281,7 @@ export default {
|
|
||||||
{
|
|
||||||
dataIndex: 'hotpatch',
|
|
||||||
key: 'hotpatch',
|
|
||||||
- title: '热补丁支持',
|
|
||||||
+ title: '热补丁修复/状态',
|
|
||||||
scopedSlots: {customRender: 'hotpatch'}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
@@ -376,7 +376,7 @@ export default {
|
|
||||||
}
|
|
||||||
this.selectedRowKeys = []
|
|
||||||
// 切换修复状态后重新请求受影响主机列表
|
|
||||||
- this.getHostList();
|
|
||||||
+ this.handleReset();
|
|
||||||
},
|
|
||||||
handleExport() {
|
|
||||||
if (this.selectedRowKeys.length !== 0) {
|
|
||||||
--
|
|
||||||
2.33.0
|
|
||||||
|
|
||||||
@ -1,216 +0,0 @@
|
|||||||
From 38dd735f4b41983a942b9c5f17476cb7f8b60fad Mon Sep 17 00:00:00 2001
|
|
||||||
From: wkl505997900 <2313665567@qq.com>
|
|
||||||
Date: Fri, 2 Jun 2023 16:04:04 +0800
|
|
||||||
Subject: [PATCH] hotpatch update
|
|
||||||
|
|
||||||
---
|
|
||||||
src/api/leaks.js | 1 +
|
|
||||||
src/views/assests/HostManagement.vue | 4 ++--
|
|
||||||
src/views/leaks/CVEsDetail.vue | 4 ++++
|
|
||||||
src/views/leaks/HostLeakDetail.vue | 4 ++++
|
|
||||||
.../components/CreateRepairTaskDrawer.vue | 8 ++++++-
|
|
||||||
src/views/leaks/components/CvesTable.vue | 21 ++++++++++++-------
|
|
||||||
src/views/leaks/components/HostTable.vue | 8 +++----
|
|
||||||
7 files changed, 35 insertions(+), 15 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/api/leaks.js b/src/api/leaks.js
|
|
||||||
index 477dae1..a6a0d63 100644
|
|
||||||
--- a/src/api/leaks.js
|
|
||||||
+++ b/src/api/leaks.js
|
|
||||||
@@ -297,6 +297,7 @@ export function generateTask(parameters) {
|
|
||||||
task_name: parameters.task_name,
|
|
||||||
description: parameters.task_desc,
|
|
||||||
auto_reboot: parameters.auto_reboot,
|
|
||||||
+ accepted: parameters.accepted,
|
|
||||||
info: parameters.info || []
|
|
||||||
}
|
|
||||||
});
|
|
||||||
diff --git a/src/views/assests/HostManagement.vue b/src/views/assests/HostManagement.vue
|
|
||||||
index 080c145..5e7d1f9 100644
|
|
||||||
--- a/src/views/assests/HostManagement.vue
|
|
||||||
+++ b/src/views/assests/HostManagement.vue
|
|
||||||
@@ -95,8 +95,8 @@ const hostStatusMap = {
|
|
||||||
'0': '在线',
|
|
||||||
'1': '离线',
|
|
||||||
'2': '未确认',
|
|
||||||
- '3': '扫描中',
|
|
||||||
- '4': '已完成',
|
|
||||||
+ '3': '在线',
|
|
||||||
+ '4': '在线',
|
|
||||||
'5': '未知'
|
|
||||||
};
|
|
||||||
|
|
||||||
diff --git a/src/views/leaks/CVEsDetail.vue b/src/views/leaks/CVEsDetail.vue
|
|
||||||
index b853cd0..6dd318e 100644
|
|
||||||
--- a/src/views/leaks/CVEsDetail.vue
|
|
||||||
+++ b/src/views/leaks/CVEsDetail.vue
|
|
||||||
@@ -181,6 +181,10 @@ export default {
|
|
||||||
})
|
|
||||||
.then(function (res) {
|
|
||||||
_this.hostList = res.data.result || [];
|
|
||||||
+ _this.hostList.forEach((item) => {
|
|
||||||
+ item.hp_status = item.hp_status ? item.hp_status : '——'
|
|
||||||
+ item.fixStatus = item.hotpatch ? `是(${item.hp_status})` : '否'
|
|
||||||
+ })
|
|
||||||
_this.paginationTotal = res.data.total_count || (res.data.total_count === 0 ? 0 : undefined);
|
|
||||||
})
|
|
||||||
.catch(function (err) {
|
|
||||||
diff --git a/src/views/leaks/HostLeakDetail.vue b/src/views/leaks/HostLeakDetail.vue
|
|
||||||
index 39d4c25..043b1d8 100644
|
|
||||||
--- a/src/views/leaks/HostLeakDetail.vue
|
|
||||||
+++ b/src/views/leaks/HostLeakDetail.vue
|
|
||||||
@@ -167,6 +167,10 @@ export default {
|
|
||||||
})
|
|
||||||
.then(function (res) {
|
|
||||||
_this.cveList = res.data.result;
|
|
||||||
+ _this.cveList.forEach((item) => {
|
|
||||||
+ item.hp_status = item.hp_status ? item.hp_status : '——'
|
|
||||||
+ item.fixStatus = item.hotpatch ? `是(${item.hp_status})` : '否'
|
|
||||||
+ })
|
|
||||||
_this.paginationTotal = res.data.total_count || (res.data.total_count === 0 ? 0 : undefined);
|
|
||||||
})
|
|
||||||
.catch(function (err) {
|
|
||||||
diff --git a/src/views/leaks/components/CreateRepairTaskDrawer.vue b/src/views/leaks/components/CreateRepairTaskDrawer.vue
|
|
||||||
index 79d4920..84e8bac 100644
|
|
||||||
--- a/src/views/leaks/components/CreateRepairTaskDrawer.vue
|
|
||||||
+++ b/src/views/leaks/components/CreateRepairTaskDrawer.vue
|
|
||||||
@@ -41,7 +41,7 @@
|
|
||||||
</a-switch>
|
|
||||||
</a-form-item> -->
|
|
||||||
<a-form-item label="是否accept" v-if="taskType === 'cve fix'">
|
|
||||||
- <a-switch :checked="isResetChecked" @click="handleResetChanage">
|
|
||||||
+ <a-switch :checked="accepted" @click="handleAcceptedChanage">
|
|
||||||
<a-icon slot="checkedChildren" type="check" />
|
|
||||||
<a-icon slot="unCheckedChildren" type="close" />
|
|
||||||
</a-switch>
|
|
||||||
@@ -274,6 +274,7 @@ export default {
|
|
||||||
submitAndExecuteLoading: false,
|
|
||||||
// 是否重启按钮数据
|
|
||||||
isResetChecked: false,
|
|
||||||
+ accepted: false,
|
|
||||||
// 自动生成的任务名称和描述,初始化为空
|
|
||||||
taskNameDefault: '',
|
|
||||||
taskDescDefault: '',
|
|
||||||
@@ -433,6 +434,7 @@ export default {
|
|
||||||
this.visible = true;
|
|
||||||
this.cveList = this.cveListProps;
|
|
||||||
this.isResetChecked = false;
|
|
||||||
+ this.accepted = false;
|
|
||||||
this.selectedRowKeyMaps = {};
|
|
||||||
this.selectedRowsAllMaps = {};
|
|
||||||
this.setDefaultInfo();
|
|
||||||
@@ -551,6 +553,7 @@ export default {
|
|
||||||
const params = {
|
|
||||||
...values,
|
|
||||||
auto_reboot: this.isResetChecked,
|
|
||||||
+ accepted: this.accepted,
|
|
||||||
info: this.cveList
|
|
||||||
.map((cveInfo) => {
|
|
||||||
return {
|
|
||||||
@@ -719,6 +722,9 @@ export default {
|
|
||||||
handleResetChanage(checked) {
|
|
||||||
this.isResetChecked = checked;
|
|
||||||
},
|
|
||||||
+ handleAcceptedChanage(checked) {
|
|
||||||
+ this.accepted = checked;
|
|
||||||
+ },
|
|
||||||
onSelectChange(selectedRowKeys, selectedRows, cid) {
|
|
||||||
this.selectedRowKeyMaps[cid] = selectedRowKeys;
|
|
||||||
this.selectedRowsAllMaps[cid] = selectedRows;
|
|
||||||
diff --git a/src/views/leaks/components/CvesTable.vue b/src/views/leaks/components/CvesTable.vue
|
|
||||||
index bca7fcd..97c4326 100644
|
|
||||||
--- a/src/views/leaks/components/CvesTable.vue
|
|
||||||
+++ b/src/views/leaks/components/CvesTable.vue
|
|
||||||
@@ -116,7 +116,7 @@
|
|
||||||
<p>Description:</p>
|
|
||||||
<p>{{ record.description }}</p>
|
|
||||||
</div>
|
|
||||||
- <div slot="hotpatch" slot-scope="hotpatch" style="margin: 0">
|
|
||||||
+ <div v-if="!fixed" slot="hotpatch" slot-scope="hotpatch" style="margin: 0">
|
|
||||||
<p>{{ hotpatch ? '是' : '否' }}</p>
|
|
||||||
</div>
|
|
||||||
</a-table>
|
|
||||||
@@ -308,11 +308,11 @@ export default {
|
|
||||||
sorter: true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
- dataIndex: 'hotpatch',
|
|
||||||
- key: 'hotpatch',
|
|
||||||
- title: '热补丁支持',
|
|
||||||
- filteredValue: filters.hotpatch || null,
|
|
||||||
- filters: [
|
|
||||||
+ dataIndex: this.hotpatchContent === '热补丁支持' ? 'hotpatch' : 'fixStatus',
|
|
||||||
+ key: this.hotpatchContent === '热补丁支持' ? 'hotpatch' : 'fixStatus',
|
|
||||||
+ title: this.hotpatchContent,
|
|
||||||
+ filteredValue: this.hotpatchContent === '热补丁支持' ? filters.hotpatch || null : filters.fixStatus || null,
|
|
||||||
+ filters: this.hotpatchContent === '热补丁支持' ? [
|
|
||||||
{
|
|
||||||
text: '是',
|
|
||||||
value: 1
|
|
||||||
@@ -321,8 +321,8 @@ export default {
|
|
||||||
text: '否',
|
|
||||||
value: 0
|
|
||||||
}
|
|
||||||
- ],
|
|
||||||
- scopedSlots: {customRender: 'hotpatch'}
|
|
||||||
+ ] : null,
|
|
||||||
+ scopedSlots: {customRender: this.hotpatchContent === '热补丁支持' ? 'hotpatch' : 'fixStatus'}
|
|
||||||
}
|
|
||||||
];
|
|
||||||
},
|
|
||||||
@@ -340,6 +340,7 @@ export default {
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
+ hotpatchContent: '热补丁支持',
|
|
||||||
cveSearch: '',
|
|
||||||
scanloading: false,
|
|
||||||
size: 'small',
|
|
||||||
@@ -378,14 +379,17 @@ export default {
|
|
||||||
handleAffectChange(e) {
|
|
||||||
if (!this.standalone) {
|
|
||||||
if (e.target.value === 'a') {
|
|
||||||
+ this.hotpatchContent = '热补丁支持'
|
|
||||||
this.fixed = undefined
|
|
||||||
this.affected = true;
|
|
||||||
this.rollback = false;
|
|
||||||
} else if (e.target.value === 'b') {
|
|
||||||
+ this.hotpatchContent = '热补丁支持'
|
|
||||||
this.fixed = undefined
|
|
||||||
this.affected = false;
|
|
||||||
this.rollback = false;
|
|
||||||
} else {
|
|
||||||
+ this.hotpatchContent = '热补丁修复'
|
|
||||||
this.fixed = true;
|
|
||||||
this.affected = true;
|
|
||||||
this.rollback = true;
|
|
||||||
@@ -578,6 +582,7 @@ export default {
|
|
||||||
}
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
+ console.log(this.inputList)
|
|
||||||
setTimeout(() => {
|
|
||||||
this.getCvesAll();
|
|
||||||
}, 500);
|
|
||||||
diff --git a/src/views/leaks/components/HostTable.vue b/src/views/leaks/components/HostTable.vue
|
|
||||||
index 079f786..225c701 100644
|
|
||||||
--- a/src/views/leaks/components/HostTable.vue
|
|
||||||
+++ b/src/views/leaks/components/HostTable.vue
|
|
||||||
@@ -279,10 +279,10 @@ export default {
|
|
||||||
scopedSlots: {customRender: 'repo'}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
- dataIndex: 'hotpatch',
|
|
||||||
- key: 'hotpatch',
|
|
||||||
- title: '热补丁修复/状态',
|
|
||||||
- scopedSlots: {customRender: 'hotpatch'}
|
|
||||||
+ dataIndex: 'fixStatus',
|
|
||||||
+ key: 'fixStatus',
|
|
||||||
+ title: '热补丁修复',
|
|
||||||
+ scopedSlots: {customRender: 'fixStatus'}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
dataIndex: 'last_scan',
|
|
||||||
--
|
|
||||||
Gitee
|
|
||||||
|
|
||||||
@ -1,94 +0,0 @@
|
|||||||
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
|
|
||||||
|
|
||||||
@ -1,89 +0,0 @@
|
|||||||
From 05a989789e7e024a6f6342c43791194deb7886ce Mon Sep 17 00:00:00 2001
|
|
||||||
From: wkl505997900 <2313665567@qq.com>
|
|
||||||
Date: Fri, 2 Jun 2023 19:46:25 +0800
|
|
||||||
Subject: [PATCH] wanshan
|
|
||||||
|
|
||||||
---
|
|
||||||
src/api/leaks.js | 4 ++-
|
|
||||||
src/views/leaks/components/HostTable.vue | 39 ++++++++++++++++++++++++
|
|
||||||
2 files changed, 42 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/src/api/leaks.js b/src/api/leaks.js
|
|
||||||
index b98cb49..770a3bc 100644
|
|
||||||
--- a/src/api/leaks.js
|
|
||||||
+++ b/src/api/leaks.js
|
|
||||||
@@ -152,7 +152,9 @@ export function getHostUnderCVE({ tableInfo, ...parameter }) {
|
|
||||||
host_name: tableInfo.filters.host_name === null ? undefined : tableInfo.filters.host_name,
|
|
||||||
host_group: tableInfo.filters.host_group === null ? undefined : tableInfo.filters.host_group,
|
|
||||||
repo: tableInfo.filters.repo === null ? undefined : tableInfo.filters.repo,
|
|
||||||
- last_scan: tableInfo.filters.last_scan
|
|
||||||
+ last_scan: tableInfo.filters.last_scan,
|
|
||||||
+ 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/HostTable.vue b/src/views/leaks/components/HostTable.vue
|
|
||||||
index 225c701..96a7737 100644
|
|
||||||
--- a/src/views/leaks/components/HostTable.vue
|
|
||||||
+++ b/src/views/leaks/components/HostTable.vue
|
|
||||||
@@ -282,6 +282,21 @@ export default {
|
|
||||||
dataIndex: 'fixStatus',
|
|
||||||
key: 'fixStatus',
|
|
||||||
title: '热补丁修复',
|
|
||||||
+ filteredValue: filters.fixStatus || null,
|
|
||||||
+ filters: [
|
|
||||||
+ {
|
|
||||||
+ text: '是(ACCEPTED)',
|
|
||||||
+ value: 1
|
|
||||||
+ },
|
|
||||||
+ {
|
|
||||||
+ text: '是(ACTIVED)',
|
|
||||||
+ value: 2
|
|
||||||
+ },
|
|
||||||
+ {
|
|
||||||
+ text: '否',
|
|
||||||
+ value: 0
|
|
||||||
+ }
|
|
||||||
+ ],
|
|
||||||
scopedSlots: {customRender: 'fixStatus'}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
@@ -396,10 +411,34 @@ export default {
|
|
||||||
this.$message.info('请至少选择一组主机!');
|
|
||||||
}
|
|
||||||
},
|
|
||||||
+ 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.getHostList();
|
|
||||||
--
|
|
||||||
Gitee
|
|
||||||
|
|
||||||
@ -1,157 +0,0 @@
|
|||||||
From 6d60ace02d2a80c5ecc200e847963780cbc861cc Mon Sep 17 00:00:00 2001
|
|
||||||
From: wkl505997900 <2313665567@qq.com>
|
|
||||||
Date: Fri, 9 Jun 2023 17:50:01 +0800
|
|
||||||
Subject: [PATCH] fix tokenissue
|
|
||||||
|
|
||||||
---
|
|
||||||
src/vendor/ant-design-pro/utils/request.js | 64 +++++++++++++++++-----
|
|
||||||
src/vendor/ant-design-pro/utils/util.js | 16 ++++++
|
|
||||||
src/views/leaks/LeakTaskList.vue | 3 +-
|
|
||||||
src/views/leaks/components/HostTable.vue | 3 +-
|
|
||||||
4 files changed, 69 insertions(+), 17 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/vendor/ant-design-pro/utils/request.js b/src/vendor/ant-design-pro/utils/request.js
|
|
||||||
index 53d4f3b..bccd36c 100644
|
|
||||||
--- a/src/vendor/ant-design-pro/utils/request.js
|
|
||||||
+++ b/src/vendor/ant-design-pro/utils/request.js
|
|
||||||
@@ -7,6 +7,24 @@ import store from '@/store';
|
|
||||||
import notification from 'ant-design-vue/es/notification';
|
|
||||||
import { VueAxios } from './axios';
|
|
||||||
|
|
||||||
+// 全局声明缓存变量
|
|
||||||
+var timestamp1;
|
|
||||||
+var isRefreshing = false;
|
|
||||||
+
|
|
||||||
+let subscribers = []
|
|
||||||
+// 刷新 token 后, 将缓存的接口重新请求一次
|
|
||||||
+function onAccessTokenFetched(newToken) {
|
|
||||||
+ subscribers.forEach((callback) => {
|
|
||||||
+ callback(newToken)
|
|
||||||
+ })
|
|
||||||
+ // 清空缓存接口
|
|
||||||
+ subscribers = []
|
|
||||||
+}
|
|
||||||
+// 添加缓存接口
|
|
||||||
+function addSubscriber(callback) {
|
|
||||||
+ subscribers.push(callback)
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
const errorMsgs = {
|
|
||||||
noResponse: 'request failed, no response'
|
|
||||||
};
|
|
||||||
@@ -77,25 +95,41 @@ request.interceptors.response.use(response => {
|
|
||||||
let err = null;
|
|
||||||
switch (code) {
|
|
||||||
case '1201':
|
|
||||||
- notification.error({
|
|
||||||
- message: '用户校验失败',
|
|
||||||
- description: response.data.message
|
|
||||||
- });
|
|
||||||
- store.dispatch('Logout').then(() => {
|
|
||||||
+ if (!timestamp1 || timestamp1 + 1632252465 < new Date().getTime()) {
|
|
||||||
+ timestamp1 = new Date().getTime();
|
|
||||||
+ notification.error({
|
|
||||||
+ message: '用户校验失败',
|
|
||||||
+ description: response.data.message
|
|
||||||
+ });
|
|
||||||
setTimeout(() => {
|
|
||||||
- window.location.reload();
|
|
||||||
- }, 1500);
|
|
||||||
- })
|
|
||||||
+ store.dispatch('Logout').then(() => {
|
|
||||||
+ window.location.reload();
|
|
||||||
+ }).catch((err) => {
|
|
||||||
+ this.$message.error(err.response.message)
|
|
||||||
+ })
|
|
||||||
+ }, 1000)
|
|
||||||
+ }
|
|
||||||
break;
|
|
||||||
case '1207':
|
|
||||||
- // token过期后,调接口,刷新token
|
|
||||||
- store.dispatch('RefreshToken').then(() => {
|
|
||||||
- // 再发请求
|
|
||||||
- return request(response.config);
|
|
||||||
- }).catch((err) => {
|
|
||||||
- this.$message.error(err.response.message)
|
|
||||||
+ if (!isRefreshing) {
|
|
||||||
+ isRefreshing = true
|
|
||||||
+ store.dispatch('RefreshToken').then(() => {
|
|
||||||
+ // 再发请求
|
|
||||||
+ isRefreshing = false
|
|
||||||
+ onAccessTokenFetched(localStorage.getItem('Access-Token'))
|
|
||||||
+ }).catch(() => {
|
|
||||||
+ isRefreshing = false;
|
|
||||||
+ window.location.reload();
|
|
||||||
+ })
|
|
||||||
+ }
|
|
||||||
+ const retryRequest = new Promise((resolve) => {
|
|
||||||
+ addSubscriber((newToken) => {
|
|
||||||
+ response.config.headers['Access-Token'] = newToken;
|
|
||||||
+ response.config.url = response.config.url.replace(response.config.baseURL, '')
|
|
||||||
+ resolve(request(response.config))
|
|
||||||
+ })
|
|
||||||
})
|
|
||||||
- break;
|
|
||||||
+ return retryRequest
|
|
||||||
default:
|
|
||||||
err = new Error(response.data.message);
|
|
||||||
err.data = response.data.data;
|
|
||||||
diff --git a/src/vendor/ant-design-pro/utils/util.js b/src/vendor/ant-design-pro/utils/util.js
|
|
||||||
index 979e320..dd73f3e 100644
|
|
||||||
--- a/src/vendor/ant-design-pro/utils/util.js
|
|
||||||
+++ b/src/vendor/ant-design-pro/utils/util.js
|
|
||||||
@@ -2,6 +2,22 @@
|
|
||||||
* @file: antd vue框架的通用工具文件
|
|
||||||
*/
|
|
||||||
|
|
||||||
+// 节流函数
|
|
||||||
+export function throttle(func, wait) {
|
|
||||||
+ let timeout;
|
|
||||||
+ return () => {
|
|
||||||
+ const context = this
|
|
||||||
+ const args = arguments
|
|
||||||
+ if (!timeout) {
|
|
||||||
+ func.apply(context, args);
|
|
||||||
+ timeout = setTimeout(function () {
|
|
||||||
+ timeout = null
|
|
||||||
+ }, wait)
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+}
|
|
||||||
+export default throttle
|
|
||||||
+
|
|
||||||
export function timeFix() {
|
|
||||||
const time = new Date();
|
|
||||||
const hour = time.getHours();
|
|
||||||
diff --git a/src/views/leaks/LeakTaskList.vue b/src/views/leaks/LeakTaskList.vue
|
|
||||||
index d40d8d8..ca4b697 100644
|
|
||||||
--- a/src/views/leaks/LeakTaskList.vue
|
|
||||||
+++ b/src/views/leaks/LeakTaskList.vue
|
|
||||||
@@ -251,7 +251,8 @@ export default {
|
|
||||||
handleTableChange(pagination, filters, sorter) {
|
|
||||||
// 存储翻页状态
|
|
||||||
this.pagination = pagination;
|
|
||||||
- this.filters = filters;
|
|
||||||
+ // this.filters = filters;
|
|
||||||
+ this.filters = Object.assign({}, this.filters, filters);
|
|
||||||
this.sorter = sorter;
|
|
||||||
// 出发排序、筛选、分页时,重新请求主机列表
|
|
||||||
this.getTaskList();
|
|
||||||
diff --git a/src/views/leaks/components/HostTable.vue b/src/views/leaks/components/HostTable.vue
|
|
||||||
index 96a7737..4f9e431 100644
|
|
||||||
--- a/src/views/leaks/components/HostTable.vue
|
|
||||||
+++ b/src/views/leaks/components/HostTable.vue
|
|
||||||
@@ -20,8 +20,9 @@
|
|
||||||
已修复
|
|
||||||
</a-radio-button>
|
|
||||||
</a-radio-group>
|
|
||||||
+ <a-input-search placeholder="按主机名搜索" v-model="hostSearch" @change="searchChange" style="width: 200px;margin-left: 10px;" @search="onSearch" />
|
|
||||||
</a-col>
|
|
||||||
- <a-col>
|
|
||||||
+ <a-col v-else>
|
|
||||||
<a-input-search placeholder="按主机名搜索" v-model="hostSearch" @change="searchChange" style="width: 200px" @search="onSearch" />
|
|
||||||
</a-col>
|
|
||||||
<a-col>
|
|
||||||
--
|
|
||||||
Gitee
|
|
||||||
|
|
||||||
@ -1,209 +0,0 @@
|
|||||||
From 41d1c1b28482e6ad4c0153c06cba620ce49bd1d8 Mon Sep 17 00:00:00 2001
|
|
||||||
From: wkl505997900 <2313665567@qq.com>
|
|
||||||
Date: Tue, 13 Jun 2023 17:37:11 +0800
|
|
||||||
Subject: [PATCH] update leaks code
|
|
||||||
|
|
||||||
---
|
|
||||||
.../components/CreateRepairTaskDrawer.vue | 21 +++++++++---
|
|
||||||
src/views/leaks/components/CvesTable.vue | 16 +++++-----
|
|
||||||
src/views/leaks/components/HostTable.vue | 32 +++++++++++++------
|
|
||||||
3 files changed, 47 insertions(+), 22 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/views/leaks/components/CreateRepairTaskDrawer.vue b/src/views/leaks/components/CreateRepairTaskDrawer.vue
|
|
||||||
index 84e8bac..b723f14 100644
|
|
||||||
--- a/src/views/leaks/components/CreateRepairTaskDrawer.vue
|
|
||||||
+++ b/src/views/leaks/components/CreateRepairTaskDrawer.vue
|
|
||||||
@@ -41,6 +41,9 @@
|
|
||||||
</a-switch>
|
|
||||||
</a-form-item> -->
|
|
||||||
<a-form-item label="是否accept" v-if="taskType === 'cve fix'">
|
|
||||||
+ <description-tips v-if="taskType === 'cve fix'" style="margin-right: 6px;">
|
|
||||||
+ 如使用热补丁修复,accept后会在重启时自动应用热补丁,不勾选则重启时失效
|
|
||||||
+ </description-tips>
|
|
||||||
<a-switch :checked="accepted" @click="handleAcceptedChanage">
|
|
||||||
<a-icon slot="checkedChildren" type="check" />
|
|
||||||
<a-icon slot="unCheckedChildren" type="close" />
|
|
||||||
@@ -62,6 +65,12 @@
|
|
||||||
:columns="tableColumns"
|
|
||||||
:data-source="cveList"
|
|
||||||
:pagination="false">
|
|
||||||
+ <span slot="customTitle">{{ taskType === 'cve rollback' ? '热补丁修复' : '支持热补丁' }}
|
|
||||||
+ <description-tips v-if="taskType === 'cve fix'">
|
|
||||||
+ 若支持热补丁,默认使用热补丁修复;
|
|
||||||
+ 注意:由于一个软件包只能应用一个热补丁,热补丁修复时可能导致部分已修复cve重新生成
|
|
||||||
+ </description-tips>
|
|
||||||
+ </span>
|
|
||||||
<div slot="hostsList" slot-scope="hostsList">
|
|
||||||
<a-spin v-if="hostUnderCveLoading" />
|
|
||||||
<span v-else>
|
|
||||||
@@ -192,6 +201,7 @@ import {
|
|
||||||
generateRepoTask,
|
|
||||||
generateRollbackTask
|
|
||||||
} from '@/api/leaks';
|
|
||||||
+import DescriptionTips from '@/components/DescriptionTips';
|
|
||||||
|
|
||||||
const taskTypes = ['cve fix', 'repo set', 'cve rollback'];
|
|
||||||
const dataTypes = ['selected', 'all'];
|
|
||||||
@@ -213,6 +223,9 @@ const hostListTypes = ['byLoading', 'bySelection', 'byOneHost'];
|
|
||||||
|
|
||||||
export default {
|
|
||||||
name: 'CreateRepairTaskDrawer',
|
|
||||||
+ components: {
|
|
||||||
+ DescriptionTips
|
|
||||||
+ },
|
|
||||||
props: {
|
|
||||||
// 基本控制信息
|
|
||||||
fixed: {
|
|
||||||
@@ -300,20 +313,20 @@ export default {
|
|
||||||
key: 'cve_id',
|
|
||||||
title: 'CVE_ID',
|
|
||||||
scopedSlots: {customRender: 'cve_id'},
|
|
||||||
- width: 180
|
|
||||||
+ width: 150
|
|
||||||
},
|
|
||||||
{
|
|
||||||
dataIndex: 'hostsList',
|
|
||||||
key: 'hostsList',
|
|
||||||
title: '主机',
|
|
||||||
- width: 60,
|
|
||||||
+ width: 100,
|
|
||||||
scopedSlots: {customRender: 'hostsList'}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
dataIndex: 'package',
|
|
||||||
key: 'package',
|
|
||||||
title: '修复软件包',
|
|
||||||
- width: 100,
|
|
||||||
+ width: 140,
|
|
||||||
scopedSlots: {customRender: 'packages'}
|
|
||||||
},
|
|
||||||
// {
|
|
||||||
@@ -326,7 +339,7 @@ export default {
|
|
||||||
{
|
|
||||||
dataIndex: 'hotpatch',
|
|
||||||
key: 'hotpatch',
|
|
||||||
- title: this.taskType === 'cve rollback' ? '热补丁修复' : '支持热补丁',
|
|
||||||
+ slots: { title: 'customTitle' },
|
|
||||||
scopedSlots: {customRender: 'hotpatch'}
|
|
||||||
}
|
|
||||||
];
|
|
||||||
diff --git a/src/views/leaks/components/CvesTable.vue b/src/views/leaks/components/CvesTable.vue
|
|
||||||
index 42c9a70..b29b03f 100644
|
|
||||||
--- a/src/views/leaks/components/CvesTable.vue
|
|
||||||
+++ b/src/views/leaks/components/CvesTable.vue
|
|
||||||
@@ -308,11 +308,11 @@ export default {
|
|
||||||
sorter: true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
- dataIndex: this.hotpatchContent === '热补丁支持' ? 'hotpatch' : 'fixStatus',
|
|
||||||
- key: this.hotpatchContent === '热补丁支持' ? 'hotpatch' : 'fixStatus',
|
|
||||||
+ dataIndex: this.hotpatchContent === '支持热补丁' ? 'hotpatch' : 'fixStatus',
|
|
||||||
+ key: this.hotpatchContent === '支持热补丁' ? 'hotpatch' : 'fixStatus',
|
|
||||||
title: this.hotpatchContent,
|
|
||||||
- filteredValue: this.hotpatchContent === '热补丁支持' ? filters.hotpatch || null : filters.fixStatus || null,
|
|
||||||
- filters: this.hotpatchContent === '热补丁支持' ? [
|
|
||||||
+ filteredValue: this.hotpatchContent === '支持热补丁' ? filters.hotpatch || null : filters.fixStatus || null,
|
|
||||||
+ filters: this.hotpatchContent === '支持热补丁' ? [
|
|
||||||
{
|
|
||||||
text: '是',
|
|
||||||
value: 1
|
|
||||||
@@ -335,7 +335,7 @@ export default {
|
|
||||||
value: 0
|
|
||||||
}
|
|
||||||
],
|
|
||||||
- scopedSlots: {customRender: this.hotpatchContent === '热补丁支持' ? 'hotpatch' : 'fixStatus'}
|
|
||||||
+ scopedSlots: {customRender: this.hotpatchContent === '支持热补丁' ? 'hotpatch' : 'fixStatus'}
|
|
||||||
}
|
|
||||||
];
|
|
||||||
},
|
|
||||||
@@ -353,7 +353,7 @@ export default {
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
- hotpatchContent: '热补丁支持',
|
|
||||||
+ hotpatchContent: '支持热补丁',
|
|
||||||
cveSearch: '',
|
|
||||||
scanloading: false,
|
|
||||||
size: 'small',
|
|
||||||
@@ -392,12 +392,12 @@ export default {
|
|
||||||
handleAffectChange(e) {
|
|
||||||
if (!this.standalone) {
|
|
||||||
if (e.target.value === 'a') {
|
|
||||||
- this.hotpatchContent = '热补丁支持'
|
|
||||||
+ this.hotpatchContent = '支持热补丁'
|
|
||||||
this.fixed = undefined
|
|
||||||
this.affected = true;
|
|
||||||
this.rollback = false;
|
|
||||||
} else if (e.target.value === 'b') {
|
|
||||||
- this.hotpatchContent = '热补丁支持'
|
|
||||||
+ this.hotpatchContent = '支持热补丁'
|
|
||||||
this.fixed = undefined
|
|
||||||
this.affected = false;
|
|
||||||
this.rollback = false;
|
|
||||||
diff --git a/src/views/leaks/components/HostTable.vue b/src/views/leaks/components/HostTable.vue
|
|
||||||
index 4f9e431..0a2b875 100644
|
|
||||||
--- a/src/views/leaks/components/HostTable.vue
|
|
||||||
+++ b/src/views/leaks/components/HostTable.vue
|
|
||||||
@@ -280,11 +280,20 @@ export default {
|
|
||||||
scopedSlots: {customRender: 'repo'}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
- dataIndex: 'fixStatus',
|
|
||||||
- key: 'fixStatus',
|
|
||||||
- title: '热补丁修复',
|
|
||||||
- filteredValue: filters.fixStatus || null,
|
|
||||||
- filters: [
|
|
||||||
+ dataIndex: this.hotpatchContent === '支持热补丁' ? 'hotpatch' : 'fixStatus',
|
|
||||||
+ key: this.hotpatchContent === '支持热补丁' ? 'hotpatch' : 'fixStatus',
|
|
||||||
+ title: this.hotpatchContent,
|
|
||||||
+ filteredValue: this.hotpatchContent === '支持热补丁' ? filters.hotpatch || null : filters.fixStatus || null,
|
|
||||||
+ filters: this.hotpatchContent === '支持热补丁' ? [
|
|
||||||
+ {
|
|
||||||
+ text: '是',
|
|
||||||
+ value: 1
|
|
||||||
+ },
|
|
||||||
+ {
|
|
||||||
+ text: '否',
|
|
||||||
+ value: 0
|
|
||||||
+ }
|
|
||||||
+ ] : [
|
|
||||||
{
|
|
||||||
text: '是(ACCEPTED)',
|
|
||||||
value: 1
|
|
||||||
@@ -298,7 +307,7 @@ export default {
|
|
||||||
value: 0
|
|
||||||
}
|
|
||||||
],
|
|
||||||
- scopedSlots: {customRender: 'fixStatus'}
|
|
||||||
+ scopedSlots: {customRender: this.hotpatchContent === '支持热补丁' ? 'hotpatch' : 'fixStatus'}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
dataIndex: 'last_scan',
|
|
||||||
@@ -337,6 +346,7 @@ export default {
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
+ hotpatchContent: '支持热补丁',
|
|
||||||
hostSearch: '',
|
|
||||||
hostTableData: [],
|
|
||||||
hostTableIsLoading: false,
|
|
||||||
@@ -386,10 +396,12 @@ export default {
|
|
||||||
},
|
|
||||||
handleFixChange(e) {
|
|
||||||
if (e.target.value === 'a') {
|
|
||||||
- this.fixed = false;
|
|
||||||
- } else {
|
|
||||||
- this.fixed = true;
|
|
||||||
- }
|
|
||||||
+ this.hotpatchContent = '支持热补丁'
|
|
||||||
+ this.fixed = false;
|
|
||||||
+ } else {
|
|
||||||
+ this.hotpatchContent = '热补丁修复'
|
|
||||||
+ this.fixed = true;
|
|
||||||
+ }
|
|
||||||
this.selectedRowKeys = []
|
|
||||||
// 切换修复状态后重新请求受影响主机列表
|
|
||||||
this.handleReset();
|
|
||||||
--
|
|
||||||
Gitee
|
|
||||||
|
|
||||||
Binary file not shown.
BIN
aops-hermes-v1.3.4.tar.gz
Normal file
BIN
aops-hermes-v1.3.4.tar.gz
Normal file
Binary file not shown.
@ -1,19 +1,13 @@
|
|||||||
%define debug_package %{nil}
|
%define debug_package %{nil}
|
||||||
|
|
||||||
Name: aops-hermes
|
Name: aops-hermes
|
||||||
Version: v1.2.1
|
Version: v1.3.4
|
||||||
Release: 7
|
Release: 1
|
||||||
Summary: Web for an intelligent diagnose frame
|
Summary: Web for an intelligent diagnose frame
|
||||||
License: MulanPSL2
|
License: MulanPSL2
|
||||||
URL: https://gitee.com/openeuler/%{name}
|
URL: https://gitee.com/openeuler/%{name}
|
||||||
Source0: %{name}-%{version}.tar.gz
|
Source0: %{name}-%{version}.tar.gz
|
||||||
Source1: node-modules.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
|
|
||||||
Patch0004: 0004-add-host-under-cve-hotpatch-Filtering-function.patch
|
|
||||||
Patch0005: 0005-fix-token-refresh-issue.patch
|
|
||||||
Patch0006: 0006-Change-of-vulnerability-management-page-application-issues.patch
|
|
||||||
|
|
||||||
|
|
||||||
BuildRequires: nodejs node-gyp nodejs-yarn
|
BuildRequires: nodejs node-gyp nodejs-yarn
|
||||||
@ -25,7 +19,7 @@ Web for an intelligent diagnose frame
|
|||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n %{name}-%{version} -p1
|
%autosetup -n %{name}-%{version}
|
||||||
%setup -T -D -a 1
|
%setup -T -D -a 1
|
||||||
|
|
||||||
|
|
||||||
@ -49,6 +43,9 @@ cp -r deploy/aops-hermes.service %{buildroot}/usr/lib/systemd/system/
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Nov 14 2023 wangkunlong<505997900@qq.com> - v1.3.4-1
|
||||||
|
- update 22.03 LTS NEXT branch code to 1.3.4
|
||||||
|
|
||||||
* Wed Jun 14 2023 wangkunlong<505997900@qq.com> - v1.2.1-7
|
* Wed Jun 14 2023 wangkunlong<505997900@qq.com> - v1.2.1-7
|
||||||
- The host list under cve has been fixed and the hot patch repair column has been changed to support hot patches
|
- The host list under cve has been fixed and the hot patch repair column has been changed to support hot patches
|
||||||
- The CVE list under the host list has-not been fixed and the hot patch support has been changed-to support hot patches
|
- The CVE list under the host list has-not been fixed and the hot patch support has been changed-to support hot patches
|
||||||
|
|||||||
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user