|
|
|
@ -18,7 +18,7 @@ import UserInfo from '../../developer/components/userInfo';
|
|
|
|
|
import actions from '../../../redux/actions';
|
|
|
|
|
import LeftPane from './leftPane';
|
|
|
|
|
import RightPane from './rightPane';
|
|
|
|
|
const { Countdown } = Statistic;
|
|
|
|
|
|
|
|
|
|
import MyIcon from "../../../common/components/MyIcon";
|
|
|
|
|
function jsCopy(s) {
|
|
|
|
|
var copyEle = document.getElementById(s);
|
|
|
|
@ -64,6 +64,8 @@ function JupyterTPI (props) {
|
|
|
|
|
changeshowDrawer,
|
|
|
|
|
drawervisible,
|
|
|
|
|
reset_with_tpi,
|
|
|
|
|
jupytertime,
|
|
|
|
|
active_with_tpi
|
|
|
|
|
} = props;
|
|
|
|
|
|
|
|
|
|
const emptyCtx = (
|
|
|
|
@ -71,6 +73,7 @@ function JupyterTPI (props) {
|
|
|
|
|
<Empty />
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
const { Countdown } = Statistic;
|
|
|
|
|
const {identifier} = params;
|
|
|
|
|
const [userInfo, setUserInfo] = useState({});
|
|
|
|
|
const [jupyterInfo, setJupyterInfo] = useState({});
|
|
|
|
@ -198,9 +201,10 @@ function JupyterTPI (props) {
|
|
|
|
|
cancelText: '取消',
|
|
|
|
|
onOk () {
|
|
|
|
|
console.log('调用重置代码....', myIdentifier);
|
|
|
|
|
if (myIdentifier) {
|
|
|
|
|
reset_with_tpi(myIdentifier, '重置成功');
|
|
|
|
|
}
|
|
|
|
|
// if (myIdentifier) {
|
|
|
|
|
//
|
|
|
|
|
// }
|
|
|
|
|
reset_with_tpi(myIdentifier, '重置成功');
|
|
|
|
|
},
|
|
|
|
|
onCancel() {
|
|
|
|
|
stopposttpip(2)
|
|
|
|
@ -249,7 +253,7 @@ function JupyterTPI (props) {
|
|
|
|
|
|
|
|
|
|
// 分页处理
|
|
|
|
|
const handleChangePage = (page) => {
|
|
|
|
|
// console.log(page, pageSize);
|
|
|
|
|
|
|
|
|
|
handlePageChange(page);
|
|
|
|
|
}
|
|
|
|
|
// const listCtx = ;
|
|
|
|
@ -288,7 +292,21 @@ function JupyterTPI (props) {
|
|
|
|
|
}
|
|
|
|
|
}, [props]);
|
|
|
|
|
|
|
|
|
|
const deadline = Date.now() + 7200 * 1000; // Moment is also OK
|
|
|
|
|
const onFinish= () =>{
|
|
|
|
|
Modal.confirm({
|
|
|
|
|
title: '倒计时截止',
|
|
|
|
|
content: (
|
|
|
|
|
<p style={{ lineHeight: '24px' }}>
|
|
|
|
|
Jupyter将中断服务,是否需要延长使用时间?
|
|
|
|
|
</p>
|
|
|
|
|
),
|
|
|
|
|
okText: '确定',
|
|
|
|
|
cancelText: '取消',
|
|
|
|
|
onOk () {
|
|
|
|
|
active_with_tpi(myIdentifier, '重置成功');
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<div className="jupyter_area">
|
|
|
|
@ -297,7 +315,7 @@ function JupyterTPI (props) {
|
|
|
|
|
<p className="jupyter_title">
|
|
|
|
|
<span className="title_desc" style={{ marginTop: '10px' }}>{jupyterInfo.name}</span>
|
|
|
|
|
<span className="title_time jupytertitle_time">
|
|
|
|
|
<Countdown value={deadline} format="HH:mm:ss" />
|
|
|
|
|
<Countdown value={jupytertime} format="HH:mm:ss" onFinish={onFinish}/>
|
|
|
|
|
</span>
|
|
|
|
|
</p>
|
|
|
|
|
<p className="jupyter_btn">
|
|
|
|
@ -391,7 +409,7 @@ const mapStateToProps = (state) => {
|
|
|
|
|
jupyter_pagination,
|
|
|
|
|
jupyter_identifier
|
|
|
|
|
} = state.jupyterReducer;
|
|
|
|
|
const { loading ,drawervisible} = state.commonReducer;
|
|
|
|
|
const { loading ,drawervisible,jupytertime} = state.commonReducer;
|
|
|
|
|
return {
|
|
|
|
|
loading,
|
|
|
|
|
jupyter_info,
|
|
|
|
@ -402,6 +420,7 @@ const mapStateToProps = (state) => {
|
|
|
|
|
pagination: jupyter_pagination,
|
|
|
|
|
jupyter_identifier,
|
|
|
|
|
drawervisible,
|
|
|
|
|
jupytertime
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -418,7 +437,11 @@ const mapDispatchToProps = (dispatch) => ({
|
|
|
|
|
changeLoadingState: (flag) => dispatch(actions.changeLoadingState(flag)),
|
|
|
|
|
changeCurrentPage: (current) => dispatch(actions.changeCurrentPage(current)),
|
|
|
|
|
//展开Drawer
|
|
|
|
|
changeshowDrawer: (type) => dispatch(actions.changeshowDrawer(type))
|
|
|
|
|
changeshowDrawer: (type) => dispatch(actions.changeshowDrawer(type)),
|
|
|
|
|
//倒计时增加
|
|
|
|
|
addjypertime: (type) => dispatch(actions.addjypertime(type)),
|
|
|
|
|
//延时
|
|
|
|
|
active_with_tpi:(identifier, msg) => dispatch(actions.active_with_tpi(identifier, msg)),
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
export default connect(
|
|
|
|
|