|
|
|
@ -33,6 +33,7 @@ class Challengesjupyter extends Component {
|
|
|
|
|
iFrameHeight: '0px',
|
|
|
|
|
jupyter_port:0,
|
|
|
|
|
jupyter_url:null,
|
|
|
|
|
username:"",
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -60,9 +61,8 @@ class Challengesjupyter extends Component {
|
|
|
|
|
componentDidMount() {
|
|
|
|
|
setTimeout(this.ChallengesList(), 1000);
|
|
|
|
|
|
|
|
|
|
// console.log("componentDidMount");
|
|
|
|
|
// console.log("Challengesjupyter");
|
|
|
|
|
// console.log(this.props);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let id = this.props.match.params.shixunId;
|
|
|
|
|
let ChallengesURL = `/jupyters/get_info_with_tpm.json`;
|
|
|
|
|
let datas={
|
|
|
|
@ -70,12 +70,12 @@ class Challengesjupyter extends Component {
|
|
|
|
|
}
|
|
|
|
|
axios.get(ChallengesURL, {params: datas}).then((response) => {
|
|
|
|
|
debugger
|
|
|
|
|
if (response.data.status === 403||response.data.status === 401||response.data.status === 500) {
|
|
|
|
|
|
|
|
|
|
if (response.data.status === 403||response.data.status === 401||response.data.status === 500) {
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
// console.log("componentDidMountChallengesjupyter");
|
|
|
|
|
// console.log(response.data);
|
|
|
|
|
debugger
|
|
|
|
|
if(response.data.status===0){
|
|
|
|
|
this.setState({
|
|
|
|
|
jupyter_url:response.data.url,
|
|
|
|
@ -93,6 +93,7 @@ class Challengesjupyter extends Component {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
updatamakedown = (id) => {
|
|
|
|
@ -162,7 +163,7 @@ class Challengesjupyter extends Component {
|
|
|
|
|
identifier:id,
|
|
|
|
|
jupyter_port:jupyter_port,
|
|
|
|
|
}
|
|
|
|
|
axios.post(url, data)
|
|
|
|
|
axios.get(url, {params: data})
|
|
|
|
|
.then((result) => {
|
|
|
|
|
if (result.data.status === 0) {
|
|
|
|
|
this.props.showNotification(`应用成功`);
|
|
|
|
|