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

@ -1,23 +1,13 @@
import React, { Component } from 'react';
import { Link } from "react-router-dom";
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 'antd/lib/pagination/style/index.css';
import '../shixunchildCss/Challenges.css';
import axios from 'axios';
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 {
constructor(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 = () => {
let id=this.props.match.params.shixunId;
let that=this;
Modal.confirm({
title: '重置实训',
content: (
@ -340,7 +352,7 @@ class Challengesjupyter extends Component {
okText: '确定',
cancelText: '取消',
onOk () {
console.log(handleClickResetTpisync_code(id))
that.handleClickResetTpisync_code(id)
},
onCancel() {

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

Loading…
Cancel
Save