|  |  |  | @ -73,8 +73,18 @@ class Challengesjupyter extends Component { | 
			
		
	
		
			
				
					|  |  |  |  | 				if (response.data.status === 403||response.data.status === 401||response.data.status === 500) { | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 				}else{ | 
			
		
	
		
			
				
					|  |  |  |  | 					console.log("componentDidMountChallengesjupyter"); | 
			
		
	
		
			
				
					|  |  |  |  | 				  console.log(response.data); | 
			
		
	
		
			
				
					|  |  |  |  | 					// console.log("componentDidMountChallengesjupyter");
 | 
			
		
	
		
			
				
					|  |  |  |  | 				  // console.log(response.data);
 | 
			
		
	
		
			
				
					|  |  |  |  | 				  if(response.data.status===0){ | 
			
		
	
		
			
				
					|  |  |  |  | 				  	this.setState({ | 
			
		
	
		
			
				
					|  |  |  |  | 							jupyter_url:response.data.url, | 
			
		
	
		
			
				
					|  |  |  |  | 							jupyter_port:response.data.port, | 
			
		
	
		
			
				
					|  |  |  |  | 						}) | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 					}else{ | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 					} | 
			
		
	
		
			
				
					|  |  |  |  | 				} | 
			
		
	
		
			
				
					|  |  |  |  | 			} | 
			
		
	
		
			
				
					|  |  |  |  | 		}).catch((error) => { | 
			
		
	
	
		
			
				
					|  |  |  | @ -137,17 +147,17 @@ class Challengesjupyter extends Component { | 
			
		
	
		
			
				
					|  |  |  |  | 	}; | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 	modifyjupyter=(propsysl)=>{ | 
			
		
	
		
			
				
					|  |  |  |  | 		console.log("propsysl"); | 
			
		
	
		
			
				
					|  |  |  |  | 		console.log(propsysl); | 
			
		
	
		
			
				
					|  |  |  |  | 		// console.log("propsysl");
 | 
			
		
	
		
			
				
					|  |  |  |  | 		// console.log(propsysl);
 | 
			
		
	
		
			
				
					|  |  |  |  | 		let id=this.props.match.params.shixunId; | 
			
		
	
		
			
				
					|  |  |  |  |      var jupyter_port=""; | 
			
		
	
		
			
				
					|  |  |  |  | 			 try{ | 
			
		
	
		
			
				
					|  |  |  |  | 				 jupyter_port= parseInt(propsysl.shixunsDetails.jupyter_port); | 
			
		
	
		
			
				
					|  |  |  |  | 				 jupyter_port= parseInt(this.state.jupyter_port); | 
			
		
	
		
			
				
					|  |  |  |  | 			 }catch (e) { | 
			
		
	
		
			
				
					|  |  |  |  | 				 jupyter_port=propsysl.shixunsDetails.jupyter_port; | 
			
		
	
		
			
				
					|  |  |  |  | 				 jupyter_port=this.state.jupyter_port; | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 			 } | 
			
		
	
		
			
				
					|  |  |  |  | 		const url=`/shixuns/${id}/update_jupyter.json`; | 
			
		
	
		
			
				
					|  |  |  |  | 		const url=`/jupyters/save_with_tpm.json`; | 
			
		
	
		
			
				
					|  |  |  |  | 		const data={ | 
			
		
	
		
			
				
					|  |  |  |  | 			identifier:id, | 
			
		
	
		
			
				
					|  |  |  |  | 			jupyter_port:jupyter_port, | 
			
		
	
	
		
			
				
					|  |  |  | @ -242,13 +252,22 @@ class Challengesjupyter extends Component { | 
			
		
	
		
			
				
					|  |  |  |  | 								` | 
			
		
	
		
			
				
					|  |  |  |  | 							} | 
			
		
	
		
			
				
					|  |  |  |  | 						</style> | 
			
		
	
		
			
				
					|  |  |  |  | 						{ | 
			
		
	
		
			
				
					|  |  |  |  | 							this.props.jupyter_url === null || this.props.jupyter_url === undefined ? | 
			
		
	
		
			
				
					|  |  |  |  | 								"" | 
			
		
	
		
			
				
					|  |  |  |  | 								: | 
			
		
	
		
			
				
					|  |  |  |  | 								<div className="sortinxdirection mt60"> | 
			
		
	
		
			
				
					|  |  |  |  | 									<div className="renwuxiangssi sortinxdirection"> | 
			
		
	
		
			
				
					|  |  |  |  | 										<div><p className="renwuxiangqdiv">任务详情</p></div> | 
			
		
	
		
			
				
					|  |  |  |  | 										<div><p className="renwuxiangqdivtest ml24">示例</p></div> | 
			
		
	
		
			
				
					|  |  |  |  | 									</div> | 
			
		
	
		
			
				
					|  |  |  |  | 									<div className="renwuxiangssit xaxisreverseorder"> | 
			
		
	
		
			
				
					|  |  |  |  | 										<div className="challenbaocun" onClick={() => this.modifyjupyter(this.props)}><p | 
			
		
	
		
			
				
					|  |  |  |  | 											className="challenbaocuntest">应用到实训</p></div> | 
			
		
	
		
			
				
					|  |  |  |  | 									</div> | 
			
		
	
		
			
				
					|  |  |  |  | 								</div> | 
			
		
	
		
			
				
					|  |  |  |  | 						} | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 						<div className="sortinxdirection mt60"> | 
			
		
	
		
			
				
					|  |  |  |  | 							<div className="renwuxiangssi sortinxdirection"> | 
			
		
	
		
			
				
					|  |  |  |  | 								<div><p className="renwuxiangqdiv">任务详情</p></div> <div><p className="renwuxiangqdivtest ml24">示例</p></div> | 
			
		
	
		
			
				
					|  |  |  |  | 							</div> | 
			
		
	
		
			
				
					|  |  |  |  | 							<div  className="renwuxiangssit xaxisreverseorder"><div className="challenbaocun"  onClick={()=>this.modifyjupyter(this.props)}><p className="challenbaocuntest">应用到实训</p></div></div> | 
			
		
	
		
			
				
					|  |  |  |  | 						</div> | 
			
		
	
		
			
				
					|  |  |  |  | 						<style> | 
			
		
	
		
			
				
					|  |  |  |  | 							{ | 
			
		
	
		
			
				
					|  |  |  |  | 								` | 
			
		
	
	
		
			
				
					|  |  |  | @ -275,18 +294,13 @@ class Challengesjupyter extends Component { | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 							<div className="pb47"> | 
			
		
	
		
			
				
					|  |  |  |  | 								{ | 
			
		
	
		
			
				
					|  |  |  |  | 									this.props.shixunsDetails===null || this.props.shixunsDetails===undefined||JSON.stringify(this.props.shixunsDetails)==="{}"? | 
			
		
	
		
			
				
					|  |  |  |  | 									this.props.jupyter_url===null || this.props.jupyter_url===undefined? | 
			
		
	
		
			
				
					|  |  |  |  | 										"" | 
			
		
	
		
			
				
					|  |  |  |  | 										: | 
			
		
	
		
			
				
					|  |  |  |  | 										( | 
			
		
	
		
			
				
					|  |  |  |  | 											this.props&&this.props.shixunsDetails&&this.props.shixunsDetails.jupyter_url? | 
			
		
	
		
			
				
					|  |  |  |  | 												<iframe src={this.props.shixunsDetails.jupyter_url} | 
			
		
	
		
			
				
					|  |  |  |  | 												<iframe src={this.props.jupyter_url} | 
			
		
	
		
			
				
					|  |  |  |  | 																sandbox="allow-same-origin allow-scripts allow-top-navigation " scrolling="no" id="frame" | 
			
		
	
		
			
				
					|  |  |  |  | 																name="framename" width="100%" height="700" frameBorder="0" | 
			
		
	
		
			
				
					|  |  |  |  | 												></iframe> | 
			
		
	
		
			
				
					|  |  |  |  | 												:"" | 
			
		
	
		
			
				
					|  |  |  |  | 										) | 
			
		
	
		
			
				
					|  |  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |  | 								} | 
			
		
	
		
			
				
					|  |  |  |  | 							</div> | 
			
		
	
		
			
				
					|  |  |  |  | 						</div> | 
			
		
	
	
		
			
				
					|  |  |  | 
 |