|
|
|
@ -105,24 +105,16 @@ class Challengesjupyter extends Component {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
componentDidMount() {
|
|
|
|
|
let that=this;
|
|
|
|
|
setTimeout(this.ChallengesList(), 1000);
|
|
|
|
|
let id = this.props.match.params.shixunId;
|
|
|
|
|
let datas={
|
|
|
|
|
identifier:id,
|
|
|
|
|
}
|
|
|
|
|
let timeinfo_with_tpm=`/jupyters/timeinfo_with_tpm.json`
|
|
|
|
|
axios.get(timeinfo_with_tpm, {params: datas}).then((response) => {
|
|
|
|
|
if (response.data.status === 403||response.data.status === 401||response.data.status === 500) {
|
|
|
|
|
|
|
|
|
|
gettimeinfo_with_tpm=(datas)=>{
|
|
|
|
|
let timeinfo_with_tpm=`/jupyters/timeinfo_with_tpm.json`
|
|
|
|
|
axios.get(timeinfo_with_tpm, {params: datas}).then((response) => {
|
|
|
|
|
if (response.data.status === 403||response.data.status === 401||response.data.status === 500) {
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
if(response.data.status===0){
|
|
|
|
|
if(response.data.useSeconds===null){
|
|
|
|
|
Modal.warning({
|
|
|
|
|
title: '提示',
|
|
|
|
|
content: '因为这个实训pod不在了,请联系系统管理人员',
|
|
|
|
|
});
|
|
|
|
|
this.handleClickResetTpi()
|
|
|
|
|
}else{
|
|
|
|
|
let useSeconds=response.data.useSeconds;
|
|
|
|
|
let summain=3600 * 1000;
|
|
|
|
@ -132,15 +124,24 @@ class Challengesjupyter extends Component {
|
|
|
|
|
this.setState({
|
|
|
|
|
jupytertime:Date.now() +sum
|
|
|
|
|
})
|
|
|
|
|
},500);
|
|
|
|
|
},500);
|
|
|
|
|
}
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
componentDidMount() {
|
|
|
|
|
let that=this;
|
|
|
|
|
setTimeout(this.ChallengesList(), 1000);
|
|
|
|
|
let id = this.props.match.params.shixunId;
|
|
|
|
|
let datas={
|
|
|
|
|
identifier:id,
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
let ChallengesURL = `/jupyters/get_info_with_tpm.json`;
|
|
|
|
|
|
|
|
|
@ -153,6 +154,7 @@ class Challengesjupyter extends Component {
|
|
|
|
|
}, 600)
|
|
|
|
|
}else{
|
|
|
|
|
if(response.data.status===0){
|
|
|
|
|
this.gettimeinfo_with_tpm(datas)
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
this.setState({
|
|
|
|
|
jupyter_url:response.data.url,
|
|
|
|
@ -503,6 +505,7 @@ class Challengesjupyter extends Component {
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
<span className={"Countdowntypes"}>
|
|
|
|
|
{/*this.state.jupytertime*/}
|
|
|
|
|
<Countdown value={this.state.jupytertime} format="HH:mm:ss" onFinish={this.onFinish}/>
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|