From dbcf0bb1b96644ed28bbf5aca92d9d98efe7737d Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Thu, 26 May 2022 14:51:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E6=96=B0=E5=BB=BA=E6=88=90?= =?UTF-8?q?=E5=8A=9F=E6=8F=90=E7=A4=BA=E8=AF=AD+=E6=BF=80=20=E6=B4=BBdevop?= =?UTF-8?q?s=E5=90=8E=E6=9C=AA=E8=B7=B3=E8=BD=AC=E5=88=B0=E5=BC=95?= =?UTF-8?q?=E6=93=8E=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/launch.json | 15 +++++++++++++++ src/AppConfig.js | 2 +- src/forge/DevOps/About.jsx | 7 +++++-- src/forge/DevOps/Index.jsx | 2 +- src/forge/Server/data.jsx | 2 +- 5 files changed, 23 insertions(+), 5 deletions(-) create mode 100644 .vscode/launch.json diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 000000000..6c8115e61 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,15 @@ +{ + // 使用 IntelliSense 了解相关属性。 + // 悬停以查看现有属性的描述。 + // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "pwa-chrome", + "request": "launch", + "name": "Launch Chrome against localhost", + "url": "http://localhost:8080", + "webRoot": "${workspaceFolder}" + } + ] +} \ No newline at end of file diff --git a/src/AppConfig.js b/src/AppConfig.js index b4107e460..cd3aca3d4 100644 --- a/src/AppConfig.js +++ b/src/AppConfig.js @@ -25,7 +25,7 @@ if (isDev) { } debugType = window.location.search.indexOf('debug=t') !== -1 ? 'teacher' : window.location.search.indexOf('debug=s') !== -1 ? 'student' : - window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || 'admin' + window.location.search.indexOf('debug=a') !== -1 ? 'admin' : parsed.debug || 'student' } window._debugType = debugType; export function initAxiosInterceptors(props) { diff --git a/src/forge/DevOps/About.jsx b/src/forge/DevOps/About.jsx index 4831f73bc..20c4d4386 100644 --- a/src/forge/DevOps/About.jsx +++ b/src/forge/DevOps/About.jsx @@ -136,7 +136,7 @@ function About(props, ref) { params:{password:authorityVal} }).then(result=>{ setIsSpining(false); - if(result){ + if(result && result.data.status === 0){ setStep(result.data.step); } }).catch(error=>{setIsSpining(false)}); @@ -149,7 +149,10 @@ function About(props, ref) { axios.post(url).then(result=>{ setIsSpining(false); if(result && result.data.status === 0){ - props.history.push(`/${owner}/${projectsId}/devops`); + props.history.push({ + pathname: `/${owner}/${projectsId}/devops`, + state:{open_devops:true} + }); // 需要将顶部的open_devops修改 let { changeOpenDevops } = props; changeOpenDevops && changeOpenDevops(true); diff --git a/src/forge/DevOps/Index.jsx b/src/forge/DevOps/Index.jsx index 0bad039e6..424a23c43 100644 --- a/src/forge/DevOps/Index.jsx +++ b/src/forge/DevOps/Index.jsx @@ -1,4 +1,4 @@ -import React , { useEffect } from 'react'; +import React from 'react'; import { WhiteBack } from '../Component/layout'; import './ops.scss'; diff --git a/src/forge/Server/data.jsx b/src/forge/Server/data.jsx index 5bf540cdd..cb4ec4978 100644 --- a/src/forge/Server/data.jsx +++ b/src/forge/Server/data.jsx @@ -20,7 +20,7 @@ function Data(props){ function onDetectionOk(){ - props.showNotification("扫描成功!"); + props.showNotification("新建分析成功,可在“检测状态”处查看扫描检测进度"); setDetectionVisible(false); setSpining(true); Init();