|
|
|
@ -105,21 +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=()=>{
|
|
|
|
|
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){
|
|
|
|
|
this.handleClickResetTpi()
|
|
|
|
|
this.handleClickResetTpi()
|
|
|
|
|
}else{
|
|
|
|
|
let useSeconds=response.data.useSeconds;
|
|
|
|
|
let summain=3600 * 1000;
|
|
|
|
@ -129,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`;
|
|
|
|
|
|
|
|
|
@ -150,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,
|
|
|
|
|