dev_tpm_ui
杨树明 5 years ago
parent 7086d250b9
commit 09aecef7b3

@ -105,21 +105,16 @@ class Challengesjupyter extends Component {
} }
} }
componentDidMount() {
let that=this; gettimeinfo_with_tpm=()=>{
setTimeout(this.ChallengesList(), 1000); let timeinfo_with_tpm=`/jupyters/timeinfo_with_tpm.json`
let id = this.props.match.params.shixunId; axios.get(timeinfo_with_tpm, {params: datas}).then((response) => {
let datas={ if (response.data.status === 403||response.data.status === 401||response.data.status === 500) {
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) {
}else{ }else{
if(response.data.status===0){ if(response.data.status===0){
if(response.data.useSeconds===null){ if(response.data.useSeconds===null){
this.handleClickResetTpi() this.handleClickResetTpi()
}else{ }else{
let useSeconds=response.data.useSeconds; let useSeconds=response.data.useSeconds;
let summain=3600 * 1000; let summain=3600 * 1000;
@ -129,15 +124,24 @@ class Challengesjupyter extends Component {
this.setState({ this.setState({
jupytertime:Date.now() +sum jupytertime:Date.now() +sum
}) })
},500); },500);
} }
}else{ }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`; let ChallengesURL = `/jupyters/get_info_with_tpm.json`;
@ -150,6 +154,7 @@ class Challengesjupyter extends Component {
}, 600) }, 600)
}else{ }else{
if(response.data.status===0){ if(response.data.status===0){
this.gettimeinfo_with_tpm(datas)
setTimeout(() => { setTimeout(() => {
this.setState({ this.setState({
jupyter_url:response.data.url, jupyter_url:response.data.url,

Loading…
Cancel
Save