Projects
Eulaceura:Mainline:GA
aops-hermes
_service:obs_scm:007-host-info-and-generate-tas...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:obs_scm:007-host-info-and-generate-task.patch of Package aops-hermes
From aaeef74c72b47edd85c79fceddd99e0b6f333f64 Mon Sep 17 00:00:00 2001 From: Hu gang <18768366022@163.com> Date: Fri, 22 Dec 2023 09:44:17 +0800 Subject: [PATCH] feat: host info add reboot --- src/vendor/ant-design-pro/utils/request.js | 14 +++++------- src/views/assests/components/addMoreHost.vue | 3 ++- src/views/leaks/HostLeakDetail.vue | 3 +++ .../components/CreateRepairTaskDrawer.vue | 22 +++++++++++++++++++ vue.config.js | 4 ++-- 5 files changed, 35 insertions(+), 11 deletions(-) diff --git a/src/vendor/ant-design-pro/utils/request.js b/src/vendor/ant-design-pro/utils/request.js index 36615ad..d1c8d43 100644 --- a/src/vendor/ant-design-pro/utils/request.js +++ b/src/vendor/ant-design-pro/utils/request.js @@ -101,7 +101,7 @@ request.interceptors.response.use((response) => { const code = response.data.code || response.status; // 不处理所有2xx的状态码 if (!code.toString().match(/^2[0-9]{2,2}$/)) { - // let err = null; + let err = null; switch (code) { case '1201': if (!timestamp1 || timestamp1 + 1632252465 < new Date().getTime()) { @@ -171,18 +171,16 @@ request.interceptors.response.use((response) => { description: response.data.message }); break; + case '1000': + err = new Error(response.data.message); + err.data = response.data.data; + err.response = response.data; + throw err; default: notification.error({ message: response.data.label, description: response.data.message }); - return new Promise((resolve) => { - resolve(null); - }); - // err = new Error(response.data.message); - // err.data = response.data.data; - // err.response = response.data; - // throw err; } } if (response.headers['content-type'] === 'application/octet-stream') { diff --git a/src/views/assests/components/addMoreHost.vue b/src/views/assests/components/addMoreHost.vue index 0b05ffd..1a6c62f 100644 --- a/src/views/assests/components/addMoreHost.vue +++ b/src/views/assests/components/addMoreHost.vue @@ -316,6 +316,8 @@ export default { }, showModal() { this.visible = true; + this.tableVis = false; + this.fileDataList = []; }, closeModal() { this.visible = false; @@ -468,7 +470,6 @@ export default { } }); // 当部分成功移除成功的主机 - this.$message.success('部分主机添加成功!'); this.$emit('addSuccess'); } diff --git a/src/views/leaks/HostLeakDetail.vue b/src/views/leaks/HostLeakDetail.vue index ef1295d..27ed786 100644 --- a/src/views/leaks/HostLeakDetail.vue +++ b/src/views/leaks/HostLeakDetail.vue @@ -36,6 +36,9 @@ <a-col span="8"> <p>{{ `不受影响的CVE数量: ${detail.unaffected_cve_num}` }}</p> </a-col> + <a-col span="8"> + <p>{{ `重启后内核变更: ${detail.reboot ? '是' : '否'}` }}</p> + </a-col> </a-row> </div> </a-spin> diff --git a/src/views/leaks/components/CreateRepairTaskDrawer.vue b/src/views/leaks/components/CreateRepairTaskDrawer.vue index b302439..30efbe5 100644 --- a/src/views/leaks/components/CreateRepairTaskDrawer.vue +++ b/src/views/leaks/components/CreateRepairTaskDrawer.vue @@ -55,6 +55,17 @@ <a-icon slot="unCheckedChildren" type="close" /> </a-switch> </a-form-item> + <div class="notice" v-if="taskType === 'cve fix'"> + <a-popover placement="topLeft"> + <template slot="content"> + <p>1. 冷、热补丁将拆分成2个任务分别执行</p> + <p>2. 同一主机,热补丁任务需在冷补丁修复任务前执行</p> + <p>3. 冷补丁任务执行完毕后,需重启才能生效</p> + </template> + <span slot="title">注意事项:</span> + <span class="notice-container">注意事项 <a-icon type="question-circle" /></span> + </a-popover> + </div> <a-form-item label="选择REPO" v-if="taskType === 'repo set'"> <a-select v-decorator="['repo', {rules: [{required: true, message: '请选择REPO'}]}]" @@ -196,6 +207,7 @@ >点击跳转到{{ item.fix_way }}{{ taskType === 'cve fix' ? '修复' : '移除' }}任务页面</a > </p> + <p v-if="jumpTaskId.length > 1">只执行热补丁任务,冷补丁任务需手动执行</p> <p>{{ countDown }}秒后回到原页面</p> </a-col> </a-row> @@ -1076,3 +1088,13 @@ export default { } }; </script> + +<style scoped lang="less"> +.notice { + padding: 0 0 10px 40px; + cursor: pointer; + &-container { + font-size: 14px; + } +} +</style> diff --git a/vue.config.js b/vue.config.js index 402e69c..61c5a37 100644 --- a/vue.config.js +++ b/vue.config.js @@ -26,8 +26,8 @@ function getGitHash() { const serverMap = { // serverIpBase: 'http://127.0.0.1' - // serverIpBase: 'http://172.168.61.81' - serverIpBase: 'http://172.168.235.132' + // serverIpBase: 'http://172.168.235.132' + serverIpBase: 'http://172.168.97.229' }; // vue.config.js -- Gitee
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2