|
|
|
@ -9,14 +9,13 @@
|
|
|
|
|
import './index.scss';
|
|
|
|
|
import React, { useEffect, useState } from 'react';
|
|
|
|
|
import SplitPane from 'react-split-pane';
|
|
|
|
|
import { Button, Modal,Drawer ,Pagination,Empty,Tooltip,Icon,message,Statistic} from 'antd';
|
|
|
|
|
import { Button, Modal,Drawer ,Pagination,Empty,Tooltip,Icon,message,Statistic,Spin} from 'antd';
|
|
|
|
|
import {
|
|
|
|
|
connect
|
|
|
|
|
} from 'react-redux';
|
|
|
|
|
import FloatButton from '../../page/component/FloatButton';
|
|
|
|
|
import UserInfo from '../../developer/components/userInfo';
|
|
|
|
|
import actions from '../../../redux/actions';
|
|
|
|
|
import LeftPane from './leftPane';
|
|
|
|
|
import RightPane from './rightPane';
|
|
|
|
|
|
|
|
|
|
import MyIcon from "../../../common/components/MyIcon";
|
|
|
|
@ -65,7 +64,9 @@ function JupyterTPI (props) {
|
|
|
|
|
drawervisible,
|
|
|
|
|
reset_with_tpi,
|
|
|
|
|
jupytertime,
|
|
|
|
|
active_with_tpi
|
|
|
|
|
active_with_tpi,
|
|
|
|
|
spinning,
|
|
|
|
|
updataspinning
|
|
|
|
|
} = props;
|
|
|
|
|
|
|
|
|
|
const emptyCtx = (
|
|
|
|
@ -140,6 +141,7 @@ function JupyterTPI (props) {
|
|
|
|
|
if (tpm_modified && updateTip && myshixun_identifier) {
|
|
|
|
|
|
|
|
|
|
setUpdateTip(false);
|
|
|
|
|
updataspinning(true)
|
|
|
|
|
Modal.confirm({
|
|
|
|
|
title: '更新通知',
|
|
|
|
|
content: (<div className="update_notice">
|
|
|
|
@ -153,6 +155,7 @@ function JupyterTPI (props) {
|
|
|
|
|
onOk () {
|
|
|
|
|
syncJupyterCode(myshixun_identifier, '同步成功');
|
|
|
|
|
},onCancel() {
|
|
|
|
|
updataspinning(false)
|
|
|
|
|
stopposttpip(2)
|
|
|
|
|
},
|
|
|
|
|
})
|
|
|
|
@ -189,6 +192,7 @@ function JupyterTPI (props) {
|
|
|
|
|
// 重置环境
|
|
|
|
|
const handleEnvironmentTpi = () => {
|
|
|
|
|
stopposttpip(1)
|
|
|
|
|
updataspinning(true)
|
|
|
|
|
Modal.confirm({
|
|
|
|
|
title: '重置环境',
|
|
|
|
|
content: (
|
|
|
|
@ -207,6 +211,7 @@ function JupyterTPI (props) {
|
|
|
|
|
reset_with_tpi(myIdentifier, '重置成功');
|
|
|
|
|
},
|
|
|
|
|
onCancel() {
|
|
|
|
|
updataspinning(false)
|
|
|
|
|
stopposttpip(2)
|
|
|
|
|
},
|
|
|
|
|
})
|
|
|
|
@ -309,6 +314,7 @@ function JupyterTPI (props) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<Spin tip="加载中..." spinning={spinning}>
|
|
|
|
|
<div className="jupyter_area">
|
|
|
|
|
<div className="jupyter_header">
|
|
|
|
|
<UserInfo userInfo={userInfo} />
|
|
|
|
@ -396,6 +402,7 @@ function JupyterTPI (props) {
|
|
|
|
|
</Drawer>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</Spin>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -409,7 +416,7 @@ const mapStateToProps = (state) => {
|
|
|
|
|
jupyter_pagination,
|
|
|
|
|
jupyter_identifier
|
|
|
|
|
} = state.jupyterReducer;
|
|
|
|
|
const { loading ,drawervisible,jupytertime} = state.commonReducer;
|
|
|
|
|
const { loading ,drawervisible,jupytertime,spinning} = state.commonReducer;
|
|
|
|
|
return {
|
|
|
|
|
loading,
|
|
|
|
|
jupyter_info,
|
|
|
|
@ -420,7 +427,8 @@ const mapStateToProps = (state) => {
|
|
|
|
|
pagination: jupyter_pagination,
|
|
|
|
|
jupyter_identifier,
|
|
|
|
|
drawervisible,
|
|
|
|
|
jupytertime
|
|
|
|
|
jupytertime,
|
|
|
|
|
spinning
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -442,6 +450,7 @@ const mapDispatchToProps = (dispatch) => ({
|
|
|
|
|
addjypertime: (type) => dispatch(actions.addjypertime(type)),
|
|
|
|
|
//延时
|
|
|
|
|
active_with_tpi:(identifier, msg) => dispatch(actions.active_with_tpi(identifier, msg)),
|
|
|
|
|
updataspinning:(identifier, msg) => dispatch(actions.updataspinning(identifier, msg)),
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
export default connect(
|
|
|
|
|