reslove repo and rpm set issues
(cherry picked from commit de30d8a9b543fc2af900c3b40c31cca91923dd07)
This commit is contained in:
parent
8217fa4a19
commit
f03e4ff34d
135
0001-Fix-the-issues-under-rpms.patch
Normal file
135
0001-Fix-the-issues-under-rpms.patch
Normal file
@ -0,0 +1,135 @@
|
|||||||
|
From 75b27ec87339cb2b7d91a1d28fff8a1600825bf2 Mon Sep 17 00:00:00 2001
|
||||||
|
From: wkl505997900 <2313665567@qq.com>
|
||||||
|
Date: Tue, 19 Sep 2023 16:37:48 +0800
|
||||||
|
Subject: [PATCH] fix issue
|
||||||
|
|
||||||
|
---
|
||||||
|
src/views/leaks/components/CvesTable.vue | 78 ++++++++++++++----------
|
||||||
|
1 file changed, 47 insertions(+), 31 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/views/leaks/components/CvesTable.vue b/src/views/leaks/components/CvesTable.vue
|
||||||
|
index d48c2fb..581ddd2 100644
|
||||||
|
--- a/src/views/leaks/components/CvesTable.vue
|
||||||
|
+++ b/src/views/leaks/components/CvesTable.vue
|
||||||
|
@@ -525,7 +525,9 @@ export default {
|
||||||
|
// 控制获取的cve是否被修复的变量,默认为未修复
|
||||||
|
affected: true,
|
||||||
|
// 控制获取的cve是否受影响的变量,默认为受影响
|
||||||
|
- rollback: false
|
||||||
|
+ rollback: false,
|
||||||
|
+ // 判断rpm二级列表是否有空值的变量
|
||||||
|
+ nullkey: 0
|
||||||
|
};
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
@@ -727,6 +729,7 @@ export default {
|
||||||
|
} else {
|
||||||
|
this.selectedRowKeys = [];
|
||||||
|
this.innerselectedRowKeys = [];
|
||||||
|
+ this.innerCveList = [];
|
||||||
|
}
|
||||||
|
function setVal(list, arr) {
|
||||||
|
list.forEach(v => {
|
||||||
|
@@ -740,35 +743,46 @@ export default {
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getChildCheck(id, val) {
|
||||||
|
- this.innerselectedRowKeys.push(this.fixed ? id + val.installed_rpm : id + val.available_rpm + val.installed_rpm)
|
||||||
|
- if (this.innerCveList.length !== 0) {
|
||||||
|
- const result = this.innerCveList.some(item => item.cve_id === id)
|
||||||
|
- if (result) {
|
||||||
|
- const target = this.innerCveList.find(item => item.cve_id === id)
|
||||||
|
- target.rpms.push({
|
||||||
|
- installed_rpm: val.installed_rpm,
|
||||||
|
- available_rpm: val.available_rpm,
|
||||||
|
- fix_way: val.support_way
|
||||||
|
- })
|
||||||
|
- } else {
|
||||||
|
- this.innerCveList.push({
|
||||||
|
- cve_id: id,
|
||||||
|
- rpms: [{
|
||||||
|
- installed_rpm: val.installed_rpm,
|
||||||
|
- available_rpm: val.available_rpm,
|
||||||
|
- fix_way: val.support_way
|
||||||
|
- }]
|
||||||
|
- })
|
||||||
|
- }
|
||||||
|
- } else {
|
||||||
|
- this.innerCveList.push({
|
||||||
|
- cve_id: id,
|
||||||
|
- rpms: [{
|
||||||
|
- installed_rpm: val.installed_rpm,
|
||||||
|
- available_rpm: val.available_rpm,
|
||||||
|
- fix_way: val.support_way
|
||||||
|
- }]
|
||||||
|
- })
|
||||||
|
+ // 重置nullkey
|
||||||
|
+ this.nullkey = 0
|
||||||
|
+ const _this = this
|
||||||
|
+ Object.keys(val).forEach(function(key) {
|
||||||
|
+ if (!val[key]) {
|
||||||
|
+ _this.nullkey++
|
||||||
|
+ }
|
||||||
|
+ });
|
||||||
|
+ if (this.nullkey === 0) {
|
||||||
|
+ // 若该行所有属性都不为null,再执行添加勾选及判断操作
|
||||||
|
+ this.innerselectedRowKeys.push(this.fixed ? id + val.installed_rpm : id + val.available_rpm + val.installed_rpm)
|
||||||
|
+ if (this.innerCveList.length !== 0) {
|
||||||
|
+ const result = this.innerCveList.some(item => item.cve_id === id)
|
||||||
|
+ if (result) {
|
||||||
|
+ const target = this.innerCveList.find(item => item.cve_id === id)
|
||||||
|
+ target.rpms.push({
|
||||||
|
+ installed_rpm: val.installed_rpm,
|
||||||
|
+ available_rpm: val.available_rpm,
|
||||||
|
+ fix_way: val.support_way
|
||||||
|
+ })
|
||||||
|
+ } else {
|
||||||
|
+ this.innerCveList.push({
|
||||||
|
+ cve_id: id,
|
||||||
|
+ rpms: [{
|
||||||
|
+ installed_rpm: val.installed_rpm,
|
||||||
|
+ available_rpm: val.available_rpm,
|
||||||
|
+ fix_way: val.support_way
|
||||||
|
+ }]
|
||||||
|
+ })
|
||||||
|
+ }
|
||||||
|
+ } else {
|
||||||
|
+ this.innerCveList.push({
|
||||||
|
+ cve_id: id,
|
||||||
|
+ rpms: [{
|
||||||
|
+ installed_rpm: val.installed_rpm,
|
||||||
|
+ available_rpm: val.available_rpm,
|
||||||
|
+ fix_way: val.support_way
|
||||||
|
+ }]
|
||||||
|
+ })
|
||||||
|
+ }
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getUncheck(id, val) {
|
||||||
|
@@ -990,12 +1004,14 @@ export default {
|
||||||
|
this.selectedRowsAll = [];
|
||||||
|
this.innerselectedRowKeys = [];
|
||||||
|
this.expandedRowKeys = [];
|
||||||
|
+ this.innerCveList = []
|
||||||
|
},
|
||||||
|
handleRefresh() {
|
||||||
|
this.selectedRowKeys = [];
|
||||||
|
this.selectedRowsAll = [];
|
||||||
|
this.innerselectedRowKeys = [];
|
||||||
|
this.expandedRowKeys = [];
|
||||||
|
+ this.innerCveList = []
|
||||||
|
// 重新请求界面, 收起展开状态
|
||||||
|
// this.innerCveList = [];
|
||||||
|
this.getCves();
|
||||||
|
@@ -1114,7 +1130,7 @@ export default {
|
||||||
|
}
|
||||||
|
this.getCves();
|
||||||
|
// 重新请求数据后重置列表
|
||||||
|
- this.expandedRowKeys = []
|
||||||
|
+ this.resetSelection()
|
||||||
|
},
|
||||||
|
handleTaskCreateSuccess() {
|
||||||
|
this.handleRefresh();
|
||||||
|
--
|
||||||
|
Gitee
|
||||||
|
|
||||||
13061
0002-Fix-the-issues-under-set-Repo.patch
Normal file
13061
0002-Fix-the-issues-under-set-Repo.patch
Normal file
File diff suppressed because it is too large
Load Diff
@ -2,12 +2,14 @@
|
|||||||
|
|
||||||
Name: aops-hermes
|
Name: aops-hermes
|
||||||
Version: v1.3.2
|
Version: v1.3.2
|
||||||
Release: 1
|
Release: 2
|
||||||
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-Fix-the-issues-under-rpms.patch
|
||||||
|
Patch0002: 0002-Fix-the-issues-under-set-Repo.patch
|
||||||
|
|
||||||
|
|
||||||
BuildRequires: nodejs node-gyp nodejs-yarn
|
BuildRequires: nodejs node-gyp nodejs-yarn
|
||||||
@ -19,7 +21,7 @@ Web for an intelligent diagnose frame
|
|||||||
|
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n %{name}-%{version}
|
%autosetup -n %{name}-%{version} -p1
|
||||||
%setup -T -D -a 1
|
%setup -T -D -a 1
|
||||||
|
|
||||||
|
|
||||||
@ -44,6 +46,10 @@ cp -r deploy/aops-hermes.service %{buildroot}/usr/lib/systemd/system/
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Sep 19 2023 wangkunlong<505997900@qq.com> - v1.3.2-2
|
||||||
|
- Fix parameter passing when expanding a secondary list of unselectable items in the CVE list
|
||||||
|
- Fix the issue of abnormal repo settings during deployment and adjust the parameters for rollback tasks
|
||||||
|
|
||||||
* Tue Sep 19 2023 wangkunlong<505997900@qq.com> - v1.3.2-1
|
* Tue Sep 19 2023 wangkunlong<505997900@qq.com> - v1.3.2-1
|
||||||
- Resolve the issue of abnormal data deletion on the host management page
|
- Resolve the issue of abnormal data deletion on the host management page
|
||||||
- Resolve the issue of undefined related fields in the host details interface during CVE scanning
|
- Resolve the issue of undefined related fields in the host details interface during CVE scanning
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user