Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

chromesetting
daiao 5 years ago
commit 5841481a59

@ -423,9 +423,7 @@ class TPMIndex extends Component {
{ this.state.is_jupyter===false? <Menu.Item key="8" className={"competitionmr50"}> { this.state.is_jupyter===false? <Menu.Item key="8" className={"competitionmr50"}>
<span className={"tpmbannernavstyler"}>排行榜</span> <span className={"tpmbannernavstyler"}>排行榜</span>
</Menu.Item>:""} </Menu.Item>:""}
<span>
{this.state.identity >4||this.state.identity===undefined ? "":
<Menu.Item key="9" className={"competitionmr50"}>
<Popover <Popover
content={ content={
<pre className={"bannerpd201"}> <pre className={"bannerpd201"}>
@ -437,8 +435,12 @@ class TPMIndex extends Component {
placement="top" placement="top"
visible={this.state.openknows} visible={this.state.openknows}
> >
<span className={"tpmbannernavstyler"}>配置</span>
</Popover> </Popover>
</span>
{this.state.identity >4||this.state.identity===undefined ? "":
<Menu.Item key="9" className={"competitionmr50"}>
<span className={"tpmbannernavstyler"}>配置</span>
</Menu.Item> </Menu.Item>
} }

@ -1,23 +1,13 @@
import React, { Component } from 'react'; import React, { Component } from 'react';
import { Link } from "react-router-dom"; import { Link } from "react-router-dom";
import { markdownToHTML, configShareForCustom,getImageUrl,getUploadActionUrlthree,appendFileSizeToUploadFileAll} from 'educoder' import { markdownToHTML, configShareForCustom,getImageUrl,getUploadActionUrlthree,appendFileSizeToUploadFileAll} from 'educoder'
import { Divider, Tooltip,Upload,Modal} from 'antd'; import { Divider, Tooltip,Upload,Modal,Spin} from 'antd';
import LoadingSpin from '../../../../common/LoadingSpin'; import LoadingSpin from '../../../../common/LoadingSpin';
import 'antd/lib/pagination/style/index.css'; import 'antd/lib/pagination/style/index.css';
import '../shixunchildCss/Challenges.css'; import '../shixunchildCss/Challenges.css';
import axios from 'axios'; import axios from 'axios';
const $ = window.$; const $ = window.$;
function handleClickResetTpisync_code(id){
const url = `/jupyters/reset_with_tpm.json`;
axios.post(url,{
identifier:id
}).then((response) => {
if(response.data.status===0){
return response
}
})
}
class Challengesjupyter extends Component { class Challengesjupyter extends Component {
constructor(props) { constructor(props) {
super(props) super(props)
@ -326,9 +316,31 @@ class Challengesjupyter extends Component {
} }
} }
handleClickResetTpisync_code=(id)=>{
this.setState({
jupyter_url : null,
booljupyterurls:false,
})
const url = `/jupyters/reset_with_tpm.json`;
axios.get(url,{params:{
identifier:id
}}).then((response) => {
if(response.data.status===0){
setTimeout(()=>{
this.setState({
jupyter_url :response.data.url,
booljupyterurls:true,
})
},1000);
this.props.showNotification('重置实训成功!');
}
});
}
// 重置实训 // 重置实训
handleClickResetTpi = () => { handleClickResetTpi = () => {
let id=this.props.match.params.shixunId; let id=this.props.match.params.shixunId;
let that=this;
Modal.confirm({ Modal.confirm({
title: '重置实训', title: '重置实训',
content: ( content: (
@ -340,7 +352,7 @@ class Challengesjupyter extends Component {
okText: '确定', okText: '确定',
cancelText: '取消', cancelText: '取消',
onOk () { onOk () {
console.log(handleClickResetTpisync_code(id)) that.handleClickResetTpisync_code(id)
}, },
onCancel() { onCancel() {

@ -525,9 +525,9 @@ class Collaborators extends Component {
<div className="clearfix mb15 edu-bg-light-blue edu-max-h200"> <div className="clearfix mb15 edu-bg-light-blue edu-max-h200">
<ul className=""> <ul className="">
<li className={Collaboratorslist&&Collaboratorslist.length===0?"centertop20 clearfix":"clearfix"}> <li className={Collaboratorslist&&Collaboratorslist.length===0?"centertop20 clearfix":"clearfix"}>
<span> {Collaboratorslist&&Collaboratorslist.length===0?<span>
请先将新的管理员通过 <a className={"color-blue"} onClick={() => this.showCollaboratorsvisible("cooperation")}>"添加合作者"</a> 请先将新的管理员通过 <a className={"color-blue"} onClick={() => this.showCollaboratorsvisible("cooperation")}>"添加合作者"</a>
</span> </span>:""}
<RadioGroup onChange={this.onChange} value={this.state.value}> <RadioGroup onChange={this.onChange} value={this.state.value}>
{ {
Collaboratorslist.length === 0 ? "" : Collaboratorslist.map((item, key) => { Collaboratorslist.length === 0 ? "" : Collaboratorslist.map((item, key) => {

Loading…
Cancel
Save