+
+
+- {{ countStar(form[formkey]) }}
++ {{ countStar() }}
+ {{ value || ' ' }}
+
+
+@@ -40,9 +40,27 @@ export default {
+ formkey: {
+ default: '',
+ type: String
++ },
++ record: {
++ default: null,
++ type: Object
+ }
+ },
+ data() {
++ const validatePassword = (rule, value, callback) => {
++ if (!this.record.ssh_pkey && (value.length === 0 || value.split(' ').join('').length === 0)) {
++ callback(new Error('password和ssh_pkey不能都为空!'));
++ } else {
++ callback();
++ }
++ };
++ const validateSshpkey = (rule, value, callback) => {
++ if (!this.record.password && (value.length === 0 || value.split(' ').join('').length === 0)) {
++ callback(new Error('password和ssh_pkey不能都为空!'));
++ } else {
++ callback();
++ }
++ };
+ const validateUser = (rule, value, callback) => {
+ if (value.length === 0 || value.split(' ').join('').length === 0) {
+ callback(new Error('ssh_user不能为空!'));
+@@ -90,14 +108,14 @@ export default {
+ cb();
+ };
+ return {
+- value: this.text,
++ value: this.text === 'undefined' ? '' : this.text,
+ editable: false,
+ rules: {
+ host_ip: [{ required: true, pattern: /^((2[0-4]\d|25[0-5]|[01]?\d\d?)\.){3}(2[0-4]\d|25[0-5]|[01]?\d\d?)$/, message: '请输入IP地址在 0.0.0.0~255.255.255.255 区间内', trigger: 'change' }],
+ ssh_port: [{required: true, message: '请输入端口'}, {validator: checkSSHPort}],
+ ssh_user: [{ validator: validateUser, trigger: 'change' }],
+- password: [{ required: true, message: 'password不能为空', trigger: 'change' }],
+- ssh_pkey: [{ required: true, message: 'ssh_pkey不能为空', trigger: 'change' }],
++ password: [{ validator: validatePassword, trigger: 'change' }],
++ ssh_pkey: [{ validator: validateSshpkey, trigger: 'change' }],
+ host_name: [{ validator: checkNameInput, trigger: 'change' }],
+ host_group_name: [{ required: true, message: 'host_group_name不能为空', trigger: 'change' }],
+ management: [{ validator: checkmanagement, trigger: 'change' }]
+@@ -106,11 +124,7 @@ export default {
+ },
+ methods: {
+ countStar(num) {
+- let str = ''
+- for (let i = 0; i < num.length; i++) {
+- str += '*'
+- }
+- return str
++ return '**********'
+ },
+ handleChange(e) {
+ const value = e.target.value;
+@@ -152,7 +166,7 @@ export default {
+ created() {
+ },
+ beforeDestroy() {
+- document.removeEventListener('mouseup', this.handleClickOutside)
++ document.removeEventListener('mouseup', this.handleClickOutside);
+ },
+ mounted() {
+ document.addEventListener('mouseup', this.handleClickOutside)
+diff --git a/src/views/assests/components/addMoreHost.vue b/src/views/assests/components/addMoreHost.vue
+index 818ffa6..efc930b 100644
+--- a/src/views/assests/components/addMoreHost.vue
++++ b/src/views/assests/components/addMoreHost.vue
+@@ -31,6 +31,7 @@
+
{
+ const arr = Object.keys(item)
+- if (!arr.includes('host_ip') || !arr.includes('ssh_port') || !arr.includes('ssh_user') || !arr.includes('password') || !arr.includes('ssh_pkey') || !arr.includes('host_name') || !arr.includes('host_group_name') || !arr.includes('management')) {
++ if (!arr.includes('host_ip') || !arr.includes('ssh_port') || !arr.includes('ssh_user') || (!arr.includes('password') && !arr.includes('ssh_pkey')) || !arr.includes('host_name') || !arr.includes('host_group_name') || !arr.includes('management')) {
+ this.removeFile(file);
+ this.dataAllow = false;
+ }
+diff --git a/vue.config.js b/vue.config.js
+index a93ea29..8740425 100644
+--- a/vue.config.js
++++ b/vue.config.js
+@@ -25,10 +25,7 @@ function getGitHash() {
+ }
+
+ const serverMap = {
+- serverIpBase: 'http://127.0.0.1',
+- serveiIp1: 'http://172.168.115.178',
+- serveiIp2: 'http://172.168.97.229',
+- serveiIp3: 'http://172.168.240.235'
++ serverIpBase: 'http://127.0.0.1'
+ }
+
+ // vue.config.js
+@@ -101,8 +98,7 @@ const vueConfig = {
+ // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
+ proxy: {
+ '/api/domain': {
+- // target: serverMap.serverIpBase + ':11114',
+- target: serverMap.serveiIp3 + ':11114',
++ target: serverMap.serverIpBase + ':11114',
+ ws: false,
+ changeOrigin: true,
+ pathRewrite: {
+@@ -110,8 +106,7 @@ const vueConfig = {
+ }
+ },
+ '/api/host': {
+- // target: serverMap.serverIpBase + ':11114',
+- target: serverMap.serveiIp3 + ':11114',
++ target: serverMap.serverIpBase + ':11114',
+ ws: false,
+ changeOrigin: true,
+ pathRewrite: {
+@@ -119,8 +114,7 @@ const vueConfig = {
+ }
+ },
+ '/api/confs': {
+- // target: serverMap.serverIpBase + ':11114',
+- target: serverMap.serveiIp3 + ':11114',
++ target: serverMap.serverIpBase + ':11114',
+ ws: false,
+ changeOrigin: true,
+ pathRewrite: {
+@@ -128,8 +122,7 @@ const vueConfig = {
+ }
+ },
+ '/api/management': {
+- // target: serverMap.serverIpBase + ':11114',
+- target: serverMap.serveiIp3 + ':11114',
++ target: serverMap.serverIpBase + ':11114',
+ ws: false,
+ changeOrigin: true,
+ pathRewrite: {
+@@ -137,8 +130,7 @@ const vueConfig = {
+ }
+ },
+ '/api/diag': {
+- // target: serverMap.serverIpBase + ':11113',
+- target: serverMap.serveiIp2 + ':11113',
++ target: serverMap.serverIpBase + ':11113',
+ ws: false,
+ changeOrigin: true,
+ pathRewrite: {
+@@ -146,8 +138,7 @@ const vueConfig = {
+ }
+ },
+ '/api/check': {
+- // target: serverMap.serverIpBase + ':11112',
+- target: serverMap.serveiIp2 + ':11112',
++ target: serverMap.serverIpBase + ':11112',
+ ws: false,
+ changeOrigin: true,
+ pathRewrite: {
+@@ -155,8 +146,7 @@ const vueConfig = {
+ }
+ },
+ '/api/vulnerability': {
+- // target: serverMap.serverIpBase + ':11116',
+- target: serverMap.serveiIp2 + ':11116',
++ target: serverMap.serverIpBase + ':11116',
+ ws: false,
+ changeOrigin: true,
+ pathRewrite: {
+@@ -164,8 +154,7 @@ const vueConfig = {
+ }
+ },
+ '/api/gala-spider': {
+- // target: serverMap.serverIpBase + ':11115',
+- target: serverMap.serveiIp2 + ':11115',
++ target: serverMap.serverIpBase + ':11115',
+ ws: false,
+ changeOrigin: true,
+ pathRewrite: {
+@@ -173,8 +162,7 @@ const vueConfig = {
+ }
+ },
+ '/api': {
+- // target: serverMap.serverIpBase + ':11111',
+- target: serverMap.serveiIp2 + ':11111',
++ target: serverMap.serverIpBase + ':11111',
+ ws: false,
+ changeOrigin: true,
+ pathRewrite: {
+--
+Gitee
+
diff --git a/0013-Fix-the-issue-of-incorrect-parameter.patch b/0013-Fix-the-issue-of-incorrect-parameter.patch
new file mode 100644
index 0000000..dd86672
--- /dev/null
+++ b/0013-Fix-the-issue-of-incorrect-parameter.patch
@@ -0,0 +1,29 @@
+From e342c417cf0c7676da5f6ba40625c7350d8cdcea Mon Sep 17 00:00:00 2001
+From: wkl505997900 <2313665567@qq.com>
+Date: Mon, 30 Oct 2023 17:15:24 +0800
+Subject: [PATCH] fix params error issue
+
+---
+ src/views/assests/components/addMoreHost.vue | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/src/views/assests/components/addMoreHost.vue b/src/views/assests/components/addMoreHost.vue
+index efc930b..5cad786 100644
+--- a/src/views/assests/components/addMoreHost.vue
++++ b/src/views/assests/components/addMoreHost.vue
+@@ -395,6 +395,12 @@ export default {
+ item.management = Boolean(item.management)
+ item.password = String(item.password)
+ item.ssh_pkey = String(item.ssh_pkey)
++ if (item.password === 'undefined') {
++ item.password = ''
++ }
++ if (item.ssh_pkey === 'undefined') {
++ item.ssh_pkey = ''
++ }
+ delete item.key;
+ delete item.editable;
+ delete item.result;
+--
+Gitee
+
diff --git a/aops-hermes.spec b/aops-hermes.spec
index 6c3ba6f..59957ed 100644
--- a/aops-hermes.spec
+++ b/aops-hermes.spec
@@ -2,7 +2,7 @@
Name: aops-hermes
Version: v1.3.3
-Release: 3
+Release: 11
Summary: Web for an intelligent diagnose frame
License: MulanPSL2
URL: https://gitee.com/openeuler/%{name}
@@ -10,6 +10,17 @@ Source0: %{name}-%{version}.tar.gz
Source1: node_modules.tar.gz
Patch0001: 0001-Resolve-upload-and-pagination-issues.patch
Patch0002: 0002-Change-params-under-rpms-host.patch
+Patch0003: 0003-Solving-the-query-problem-of-leaving-the-page-polling-interface.patch
+Patch0004: 0004-Solving-the-problem-of-cve-fix-params.patch
+Patch0005: 0005-Add-login-key-to-asset-management-module.patch
+Patch0006: 0006-Temporarily-hide-the-plugin-and-fingerprint-waveform-bar.patch
+Patch0007: 0007-Fix-five-issues.patch
+Patch0008: 0008-Fix-issues-with-polling-and-refreshing-displays.patch
+Patch0009: 0009-Correction-of-copyright-information.patch
+Patch0010: 0010-Optimize-host-scanning-polling-logic.patch
+Patch0011: 0011-Add-null-judgment-for-generating-cve-and-repo-tasks.patch
+Patch0012: 0012-Fix-Upload-host-logic.patch
+Patch0013: 0013-Fix-the-issue-of-incorrect-parameter.patch
BuildRequires: nodejs node-gyp nodejs-yarn
@@ -26,7 +37,6 @@ Web for an intelligent diagnose frame
%build
-export NODE_OPTIONS=--openssl-legacy-provider
yarn build
@@ -46,6 +56,32 @@ cp -r deploy/aops-hermes.service %{buildroot}/usr/lib/systemd/system/
%changelog
+* Mon Oct 30 2023 wangkunlong<505997900@qq.com> - v1.3.3-11
+- Fix the issue of incorrect parameter transmission for batch adding hosts
+
+* Thu Oct 26 2023 wangkunlong<505997900@qq.com> - v1.3.3-10
+- Add Upload host logic
+
+* Thu Oct 26 2023 wangkunlong<505997900@qq.com> - v1.3.3-9
+- Add null judgment for generating cve and repo tasks
+
+* Tue Oct 24 2023 wangkunlong<505997900@qq.com> - v1.3.3-8
+- Optimize host scanning polling logic
+
+* Mon Oct 23 2023 wangkunlong<505997900@qq.com> - v1.3.3-7
+- Resolve issues with polling interfaces that still exist in other interfaces
+- Resolve the issue of failed expansion of the rpm list after refreshing the task details interface
+- Correction of copyright information
+
+* Fri Oct 20 2023 wangkunlong<505997900@qq.com> - v1.3.3-6
+- Fix some issues
+
+* Wed Oct 18 2023 wangkunlong<505997900@qq.com> - v1.3.3-5
+- Temporarily hide the plugin and fingerprint waveform bar
+
+* Wed Oct 18 2023 wangkunlong<505997900@qq.com> - v1.3.3-4
+- Update 20.03 SP3 branch code to the latest version
+
* Wed Sep 20 2023 wangkunlong<505997900@qq.com> - v1.3.3-3
- Change params in rpms under host
- Change hotpatch rpms show way