dev_aliyun2
harry 5 years ago
parent 18566d0b24
commit 0203b50471

@ -73,11 +73,4 @@ module.exports = override(
}), }),
addWebpackPlugin(new MonacoWebpackPlugin({})), addWebpackPlugin(new MonacoWebpackPlugin({})),
// addWebpackPlugin(instance), // addWebpackPlugin(instance),
(config) => {
config.resolve.plugins = config.resolve.plugins.filter(plugin => !(plugin instanceof ModuleScopePlugin));
if (process.env.NODE_ENV !== "development") {
config.output.publicPath = `/react/build/`;
}
return config
}
); );

@ -556,9 +556,6 @@ class App extends Component {
<Route path="/tasks/:stageId" component={IndexWrapperComponent} /> <Route path="/tasks/:stageId" component={IndexWrapperComponent} />
{/*<Route path="/shixuns/:shixunId" component={TPMIndexComponent}>*/}
{/*</Route>*/}
<Route path="/shixuns/:shixunId" <Route path="/shixuns/:shixunId"
render={ render={
(props) => (<TPMIndexComponent {...this.props} {...props} {...this.state}></TPMIndexComponent>) (props) => (<TPMIndexComponent {...this.props} {...props} {...this.state}></TPMIndexComponent>)

@ -28,11 +28,7 @@ class Header extends Component {
} }
goBack() { goBack() {
const { challenge, game, shixun } = this.props this.props.history.goBack()
// myshixuns/pw346iskxh/stages/rw4v6giml5no
// http://localhost:3000/shixuns/cz7yw3en/challenges
const url = `/shixuns/${shixun.identifier}/challenges`
window.location.href = url;
} }

@ -545,15 +545,6 @@ class MainContentContainer extends Component {
} }
// ---------------------- 以下是编程题处理 ---------------------- // ---------------------- 以下是编程题处理 ----------------------
console.log('onRunCodeTest onRunCodeTest')
// http://localhost:3000/myshixuns/so5w6iap97/stages/zl6kx8f7vfpo/file_update?path=src%2Fstep6%2FLinkedList.java
// var url = `${locationPath}/file_update?path=${encodeURIComponent(challenge.path)}`
// var timeOut = parseInt(<%= @myshixun.main_mirror.try(:time_limit) %>); // 超时参数
this.setEvaluateMiddleStatusText('') this.setEvaluateMiddleStatusText('')
this.setState({ this.setState({
@ -670,20 +661,6 @@ class MainContentContainer extends Component {
}, intervalDuring) }, intervalDuring)
window.gameStatusIntervalId = gameStatusIntervalId; window.gameStatusIntervalId = gameStatusIntervalId;
// } else if(ableToCreate === 0) { // 排队等待重新执行gameBuild
// const mintes = parseInt((waitNum * 120) / 60); // 等待时间 = 等待人数 * (15(秒)---3分钟的随机数);
// tipContent(ableToCreate, waitNum, mintes, waitNum * 180, first);
// setTimeout(()=>{
// this.gameBuild(fileUpdateResponse, first + 1)
// }, 10000)
// this.setGameBuildFalse()
// } else if(ableToCreate == -1) { // 排队人数过多,建议先玩下一关
// tipContent(ableToCreate, waitNum, 0, 0, first);
// this.setGameBuildFalse()
// } else {
// showSnackbar("实训云平台繁忙繁忙等级94请稍后刷新并重试")
// this.setGameBuildFalse()
// }
}).catch((gameBuildError) => { }).catch((gameBuildError) => {

@ -101,27 +101,14 @@ class ChooseRepositoryView extends Component {
item.challenge_question.map((optionItem, optionIndex) => { item.challenge_question.map((optionItem, optionIndex) => {
const isSelected = fVal[index] === optionValueArray[optionIndex] const isSelected = fVal[index] === optionValueArray[optionIndex]
// test optionItem.option_name = '<div>11</div><div>11</div>12' // '1\r\n2\r\n3\r\n'
const showText = this._toHtml(optionItem.option_name) const showText = this._toHtml(optionItem.option_name)
/*
<div style={ { display: 'inline-block'} }
dangerouslySetInnerHTML={{__html: optionItem.option_name}}>
</div>
<textarea value={optionItem.option_name}></textarea>
*/
ar.push( ar.push(
<Form.Item key={`${optionItem.option_name + optionIndex}`} value="male" control={ <Form.Item key={`${optionItem.option_name + optionIndex}`} value="male" control={
<Radio <Radio
// color="primary"
classes={{
root: this.props.classes.radio,
checked: this.props.classes.checked
}}
checked={isSelected} checked={isSelected}
value={`${optionValueArray[optionIndex]}`} value={`${optionValueArray[optionIndex]}`}
style={styles.radioButton}
/> />
} label={<div className="break-word" style={{ lineHeight: "24px" }}> } label={<div className="break-word" style={{ lineHeight: "24px" }}>
<div style={{ display: 'inline-block', "color": "#8B9399" }}> <div style={{ display: 'inline-block', "color": "#8B9399" }}>

@ -135,24 +135,6 @@ class TPMIndex extends Component {
let getnewTPMsettings = this.props.user && this.props.user.user_id + 'newTPMsettings'; let getnewTPMsettings = this.props.user && this.props.user.user_id + 'newTPMsettings';
let newTPMsettings = window.localStorage.getItem(getnewTPMsettings) let newTPMsettings = window.localStorage.getItem(getnewTPMsettings)
let id = this.props.match.params.shixunId; let id = this.props.match.params.shixunId;
// console.log('props', this.props);
// let collaborators = `/shixuns/` + id + `/propaedeutics.json`;
//
// axios.get(collaborators).then((response) => {
// if (response.status === 200) {
// if (response.data.status === 403||response.data.status === 401||response.data.status === 500) {
//
// }else{
// this.setState({
// PropaedeuticsList: response.data,
// shixunId: id
// });
// }
//
// }
// }).catch((error) => {
// console.log(error)
// });
let Url = `/shixuns/` + id + `.json`; let Url = `/shixuns/` + id + `.json`;
axios.get(Url).then((response) => { axios.get(Url).then((response) => {
if (response.status === 200) { if (response.status === 200) {
@ -385,21 +367,6 @@ 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> : ""}
{/*{this.state.identity >4||this.state.identity===undefined ? "":this.state.openknows===true?<span>*/}
{/* <Popover*/}
{/* content={*/}
{/* <pre className={"bannerpd201"}>*/}
{/* <div>更多设置在这里,点击“配置”看一看~</div>*/}
{/* <div className={"wechatcenter mt15"}><Button type="primary" onClick={this.openknow} >我知道了</Button></div>*/}
{/* </pre>*/}
{/* }*/}
{/* trigger="click"*/}
{/* placement="top"*/}
{/* visible={this.state.openknows}*/}
{/* >*/}
{/* </Popover>*/}
{/*</span>:""}*/}
{this.state.identity > 4 || this.state.identity === undefined ? "" : {this.state.identity > 4 || this.state.identity === undefined ? "" :
<Menu.Item key="9" className={"competitionmr50"}> <Menu.Item key="9" className={"competitionmr50"}>
<span className={"tpmbannernavstyler"}>配置</span> <span className={"tpmbannernavstyler"}>配置</span>
@ -417,14 +384,6 @@ class TPMIndex extends Component {
</div> </div>
</Row> </Row>
{/*筛选*/}
{/*{*/}
{/* tpmindexjupyterbool===false?*/}
{/* :""*/}
{/*}*/}
{/* */}
<Switch {...this.props}> <Switch {...this.props}>
<Route path="/shixuns/:shixunId/repository/:repoId/commits" render={ <Route path="/shixuns/:shixunId/repository/:repoId/commits" render={

Loading…
Cancel
Save