aops-hermes/0003-fix-bugs-that-are-found.patch
2022-12-19 10:36:48 +08:00

218 lines
6.9 KiB
Diff
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

From d9b57b55a80c9a411e13839205ed425834ae06b3 Mon Sep 17 00:00:00 2001
From: wkl505997900 <505997900@qq.com>
Date: Wed, 14 Dec 2022 20:05:48 +0800
Subject: [PATCH] =?UTF-8?q?=E5=89=8D=E7=AB=AF=E7=AC=AC=E4=BA=94=E6=AC=A1?=
=?UTF-8?q?=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../ant-design-pro/layouts/UserLayout.vue | 4 +--
src/views/leaks/CVEsManagement.vue | 8 ++++--
src/views/leaks/LeakTaskList.vue | 2 +-
src/views/leaks/components/AddRepoModal.vue | 2 +-
.../components/CreateRepairTaskDrawer.vue | 3 +++
src/views/leaks/components/CvesTable.vue | 3 ---
src/views/leaks/components/HostTable.vue | 25 ++++++++++++++++---
src/views/user/Login.vue | 4 +--
8 files changed, 36 insertions(+), 15 deletions(-)
diff --git a/src/vendor/ant-design-pro/layouts/UserLayout.vue b/src/vendor/ant-design-pro/layouts/UserLayout.vue
index 8a83eca..1166136 100644
--- a/src/vendor/ant-design-pro/layouts/UserLayout.vue
+++ b/src/vendor/ant-design-pro/layouts/UserLayout.vue
@@ -18,7 +18,7 @@
</div>
</div>
<router-view />
- <div class="footer">
+ <!-- <div class="footer">
<div class="links">
<a href="_self">帮助</a>
<a href="_self">隐私</a>
@@ -27,7 +27,7 @@
<div class="copyright">
Copyright &copy;
</div>
- </div>
+ </div> -->
</a-col>
</a-row>
</div>
diff --git a/src/views/leaks/CVEsManagement.vue b/src/views/leaks/CVEsManagement.vue
index 4692a4a..46ea0e9 100644
--- a/src/views/leaks/CVEsManagement.vue
+++ b/src/views/leaks/CVEsManagement.vue
@@ -1,7 +1,7 @@
<template>
<page-header-wrapper :breadcrumb="breadcrumb">
<a-card :bordered="false" class="aops-theme">
- <div>
+ <div class="cvebox">
<cves-table standalone />
</div>
</a-card>
@@ -51,4 +51,8 @@ export default {
};
</script>
-<style lang="less" scoped></style>
+<style lang="less" scoped>
+.cvebox{
+ overflow: auto;
+}
+</style>
diff --git a/src/views/leaks/LeakTaskList.vue b/src/views/leaks/LeakTaskList.vue
index cc755aa..168ea83 100644
--- a/src/views/leaks/LeakTaskList.vue
+++ b/src/views/leaks/LeakTaskList.vue
@@ -422,7 +422,7 @@ export default {
<style lang="less" scoped>
.leakbox {
- overflow: hidden;
+ overflow: auto;
}
.status-icon {
margin: 0 2px;
diff --git a/src/views/leaks/components/AddRepoModal.vue b/src/views/leaks/components/AddRepoModal.vue
index f0ade94..f76a569 100644
--- a/src/views/leaks/components/AddRepoModal.vue
+++ b/src/views/leaks/components/AddRepoModal.vue
@@ -22,7 +22,7 @@
<a-form-item label="REPO内容">
<div>
<a-textarea
- :style="`${visible ? '' : 'height: 346px;'}`"
+ style="resize: none;"
v-decorator="['repoData', {rules: [{ required: true, message: '请输入REPO描述' }]}]"
:rows="16"
:maxLength="512"
diff --git a/src/views/leaks/components/CreateRepairTaskDrawer.vue b/src/views/leaks/components/CreateRepairTaskDrawer.vue
index 49633f7..3a9d7e2 100644
--- a/src/views/leaks/components/CreateRepairTaskDrawer.vue
+++ b/src/views/leaks/components/CreateRepairTaskDrawer.vue
@@ -357,6 +357,9 @@ export default {
// 每次展开抽屉时触发替代mounted
handleOpen() {
// inital defualt data
+ if (this.taskType === 'repo set') {
+ this.$emit('getAllHost')
+ }
this.visible = true;
this.cveList = this.cveListProps;
this.isResetChecked = true;
diff --git a/src/views/leaks/components/CvesTable.vue b/src/views/leaks/components/CvesTable.vue
index 44deb18..c48712c 100644
--- a/src/views/leaks/components/CvesTable.vue
+++ b/src/views/leaks/components/CvesTable.vue
@@ -500,7 +500,4 @@ export default {
</script>
<style lang="less" scoped>
- .ant-table-wrapper {
- overflow: hidden;
- }
</style>
diff --git a/src/views/leaks/components/HostTable.vue b/src/views/leaks/components/HostTable.vue
index 4387d91..ad4768b 100644
--- a/src/views/leaks/components/HostTable.vue
+++ b/src/views/leaks/components/HostTable.vue
@@ -1,5 +1,5 @@
<template>
- <div>
+ <div class="hostbox">
<div class="mesinfo">
<a-row
v-if="standalone && scanningHostIds.length > 0 && scanStatusloading"
@@ -40,6 +40,7 @@
:hostList="selectedRowsAll"
:repoList="repoListProps"
@createSuccess="handleTaskCreateSuccess"
+ @getAllHost="getAllHost"
/>
</a-col>
<a-col v-if="standalone && selectedRowKeys.length === 0">
@@ -50,6 +51,7 @@
:hostList="hostListAll"
:repoList="repoListProps"
@createSuccess="handleTaskCreateSuccess"
+ @getAllHost="getAllHost"
/>
</a-col>
<a-col v-if="standalone && selectedRowKeys.length !== 0">
@@ -206,7 +208,7 @@ export default {
{
dataIndex: 'cve_num',
key: 'cve_num',
- title: 'CVE 个数',
+ title: '受影响CVE个数',
sorter: true
},
{
@@ -311,6 +313,18 @@ export default {
};
},
methods: {
+ getAllHost() {
+ this.getHostList();
+ this.getHostGroup();
+ if (this.standalone) {
+ // 主机列表页面中要自行获取全量主机和扫描状态
+ this.getScanStatusAll([]);
+ this.getHostListAll();
+ } else {
+ // 主机详情页面中要自行获取repo列表
+ this.getRepoList();
+ }
+ },
handleExport() {
if (this.selectedRowKeys.length !== 0) {
console.log(this.selectedRowKeys);
@@ -504,6 +518,9 @@ export default {
this.selectedRowKeys = [];
this.selectedRows = [];
this.getHostList();
+ if (this.standalone) {
+ this.getHostListAll();
+ }
},
handleReset() {
this.pagination = defaultPagination;
@@ -682,7 +699,7 @@ export default {
font-size: 16px;
margin: 0 6px;
}
-.ant-table-wrapper {
- overflow: hidden;
+.hostbox{
+ overflow: auto;
}
</style>
diff --git a/src/views/user/Login.vue b/src/views/user/Login.vue
index 92d16cd..388e7e0 100644
--- a/src/views/user/Login.vue
+++ b/src/views/user/Login.vue
@@ -45,7 +45,7 @@
</a-form-item>
</a-tab-pane>
- <a-tab-pane key="tab2" :tab="$t('user.login.gitee-login-credentials')">
+ <!-- <a-tab-pane key="tab2" :tab="$t('user.login.gitee-login-credentials')">
<a-alert
v-if="isLoginError"
type="error"
@@ -82,7 +82,7 @@
<a-icon slot="prefix" type="lock" :style="{color: 'rgba(0,0,0,.25)'}" />
</a-input-password>
</a-form-item>
- </a-tab-pane>
+ </a-tab-pane> -->
</a-tabs>
<a-form-item style="margin-top:24px">
--
Gitee