From 60a7f39c1642d861114ddcee52c4a90f1935e03e Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Fri, 9 Apr 2021 11:45:04 +0800 Subject: [PATCH] =?UTF-8?q?forge=E9=A1=B9=E7=9B=AE=E6=9A=82=E6=97=B6?= =?UTF-8?q?=E4=B8=8D=E6=98=BE=E7=A4=BA=E5=91=BD=E4=BB=A4=E8=A1=8C=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/forge/DevOps/OpsDetailRightpanel.jsx | 7 ++++--- src/forge/DevOps/ssh/Index.jsx | 26 ++++++++++++++++-------- 2 files changed, 22 insertions(+), 11 deletions(-) diff --git a/src/forge/DevOps/OpsDetailRightpanel.jsx b/src/forge/DevOps/OpsDetailRightpanel.jsx index ce38e6184..93bf370cb 100644 --- a/src/forge/DevOps/OpsDetailRightpanel.jsx +++ b/src/forge/DevOps/OpsDetailRightpanel.jsx @@ -38,6 +38,7 @@ export default ({ : p[0]; setStep(sub); + setNav("0"); if (sub && sub.status !== "skipped") { getStep(pre.number, sub.number); } @@ -69,10 +70,10 @@ export default ({ } return ( - {setNav(e.key)}} selectedKeys={[nav]} mode="horizontal"> - 文件 + {/* {setNav(e.key)}} selectedKeys={[nav]} mode="horizontal"> + 开发流水线 命令行 - + */} { nav === "0" && diff --git a/src/forge/DevOps/ssh/Index.jsx b/src/forge/DevOps/ssh/Index.jsx index 09e1805e2..9a896a837 100644 --- a/src/forge/DevOps/ssh/Index.jsx +++ b/src/forge/DevOps/ssh/Index.jsx @@ -1,7 +1,16 @@ import React, { useState, useEffect } from "react"; import XmlPanel from "./XmlPanel"; import mediator from "./mediator"; +import axios from "axios"; +// const defaulturl = `http://47.111.130.18:48088`; +const defaultValue = { + host: "106.75.231.63", + port: "2021", + ws_url: "wss://pre-webssh.educoder.net/ws", + username: "root", + secret: "Dron_123123", +}; function Index() { const [sshConfigData, setSshConfigData] = useState(undefined); @@ -15,16 +24,17 @@ function Index() { }, [sshConfigData]); // 获取服务器连接信息 - function init() {} + function init() { + const url = `/api/ci/pipelines/ssh_server.json`; + axios.get(url).then(result=>{ + if(result && result.data){ + setSshConfigData({...result.data}) + } + }).catch(error=>{}) + } return ( );