-
-
-
this.setConfigsInputs(e,key,1)}
- className="panel-box-sizing task-form-100 task-height-40" placeholder="请输入类别名称" />
+ return(
+
+
+
+ {item.name}
+ {/*this.Deselectlittle(item.mirror_repository_id)}>*/}
-
-
-
-
-
-
this.setConfigsInputs(e,key,2)}
- className="panel-box-sizing task-form-100 task-height-40" placeholder="请输入类别名称" />
+
+
+
+ this.setConfigsInputs(e,key,1)}
+ className="panel-box-sizing task-form-100 task-height-40" placeholder="请输入类别名称" />
+
+
-
-
-
-
-
-
this.setConfigsInputs(e,key,3)}
- className="panel-box-sizing task-form-100 task-height-40" placeholder="请输入类别名称" />
+
+
+
+ this.setConfigsInputs(e,key,2)}
+ className="panel-box-sizing task-form-100 task-height-40" placeholder="请输入类别名称" />
+
+
-
-
-
-
-
-
this.setConfigsInputs(e,key,4)}
- className="panel-box-sizing task-form-100 task-height-40" placeholder="请输入类别名称" />
+
+
+
+ this.setConfigsInputs(e,key,3)}
+ className="panel-box-sizing task-form-100 task-height-40" placeholder="请输入类别名称" />
+
+
+
+
+
+
+ this.setConfigsInputs(e,key,4)}
+ className="panel-box-sizing task-form-100 task-height-40" placeholder="请输入类别名称" />
+
+
+
-
-
-
- )
+ )
- })}
-
:""}
+ })}
+
:""}
- {postapplyvisible === true ? : ""}
-
-
-
-
-
-
-
-
{this.state.languagewritetype === true ? "请填写该镜像语言" : ""}
-
-
-
-
-
{this.state.systemenvironmenttype === true ? "请填写该镜像语言系统环境" : ""}
-
-
-
-
-
-
{this.state.testcoderunmodetype === true ? "请填写该镜像测试代码运行方式" : ""}
-
-
-
-
-
- 上传附件
- (单个文件50M以内)
-
-
-
+ }
+ : ""}
+
+
+
+
+
+
+
+
{this.state.languagewritetype === true ? "请填写该镜像语言" : ""}
+
+
+
+
+
{this.state.systemenvironmenttype === true ? "请填写该镜像语言系统环境" : ""}
+
+
+
+
+
+
{this.state.testcoderunmodetype === true ? "请填写该镜像测试代码运行方式" : ""}
+
+
+
+
+
+ 上传附件
+ (单个文件50M以内)
+
+
+
-
-
- {this.state.attachmentidstype === true ? "请上传附件" : ""}
-
-
- this.sendhideModaly()}
- >取消
-
-
-
-
- {/**/}
-
-
-
-
-
-
新建申请已提交,请等待管理员的审核
-
我们将在1-2个工作日内与您联系
+
+ {this.state.attachmentidstype === true ? "请上传附件" : ""}
+
+
+ this.sendhideModaly()}
+ >取消
+
+
+
-
-
-
-
+ {/**/}
+
+
+
+
);
}
}
diff --git a/public/react/src/modules/tpm/TPMsettings/TPMsettings.js b/public/react/src/modules/tpm/TPMsettings/TPMsettings.js
index 4540b5e60..c405e3e9f 100644
--- a/public/react/src/modules/tpm/TPMsettings/TPMsettings.js
+++ b/public/react/src/modules/tpm/TPMsettings/TPMsettings.js
@@ -11,17 +11,10 @@ import Configuration from './Configuration';
import LearningSettings from './LearningSettings';
-import Bottomsubmit from "../../modals/Bottomsubmit";
-
-import moment from 'moment';
-
import axios from 'axios';
import './css/TPMsettings.css';
-import {getImageUrl, toPath, getUrl, appendFileSizeToUploadFileAll, getUploadActionUrl} from 'educoder';
-
-
const {TabPane} = Tabs;
// 处理整点 半点
@@ -90,9 +83,21 @@ export default class TPMsettings extends Component {
render() {
return (
-
-
+
+
-
-
-
);
}
}
diff --git a/public/react/src/modules/tpm/component/TPMNav.js b/public/react/src/modules/tpm/component/TPMNav.js
index 025b26223..1d03d12da 100644
--- a/public/react/src/modules/tpm/component/TPMNav.js
+++ b/public/react/src/modules/tpm/component/TPMNav.js
@@ -5,7 +5,7 @@ import { BrowserRouter as Router, Route, Link } from "react-router-dom";
class TPMNav extends Component {
render() {
- const { user, match, shixun, secret_repository } = this.props;
+ const { user, match, shixun, secret_repository,is_jupyter} = this.props;
let isAdminOrCreator = false;
if (user) {
isAdminOrCreator = user.admin || user.manager
@@ -15,6 +15,8 @@ class TPMNav extends Component {
// console.log(this.props.propaedeutics)
const challengesPath = `/shixuns/${shixunId}/challenges`;
// console.log(match.path)
+ console.log("TPMNavTPMNavTPMNav");
+ console.log(is_jupyter);
return (
背景知识
}
- { this.props.identity >4||this.props.identity===undefined ?"":
版本库}
+ { this.props.identity >4||this.props.identity===undefined ?"":
+ (this.props.is_jupyter===false?
+
版本库
+ :"")
+ }
+
+
+
{this.props.identity >4||this.props.identity===undefined ?"": secret_repository &&
私密版本库}
@@ -37,8 +46,13 @@ class TPMNav extends Component {
className={`${match.url.indexOf('collaborators') != -1 ? 'active' : ''} fl mr40`}>合作者
{/*jupyter*/}
-
数据集
+ {
+ this.props.is_jupyter===true?
+
数据集
+ :""
+ }
+
评论
diff --git a/public/react/src/modules/tpm/newshixuns/Newshixuns.js b/public/react/src/modules/tpm/newshixuns/Newshixuns.js
index 6d5e3fd4f..8a1be807b 100644
--- a/public/react/src/modules/tpm/newshixuns/Newshixuns.js
+++ b/public/react/src/modules/tpm/newshixuns/Newshixuns.js
@@ -265,7 +265,7 @@ class Newshixuns extends Component {
{
message: '提示',
description:
- '提交成功!',
+ '新建申请已提交,请等待管理员审核。',
}
)
@@ -589,10 +589,12 @@ class Newshixuns extends Component {
)}
- {this.state.mainvalues === undefined && this.state.subvalues === undefined ? "" :
+ {this.state.mainvalues === undefined && this.state.subvalues === undefined||this.state.mainvalues === "" && this.state.subvalues === "" ? "" :
- {`已安装软件:${this.state.mainvalues===undefined?"":this.state.mainvalues}${this.state.subvalues===undefined?"":this.state.subvalues}`}
- {` 说明:添加了${this.state.mainvalues===undefined?"":this.state.mainvalues}${this.state.subvalues===undefined?"":this.state.subvalues}`}
+ {`${this.state.mainvalues===undefined||this.state.mainvalues=== ""?"":`已安装软件:`+this.state.mainvalues}`}
+ {`${this.state.subvalues===undefined||this.state.subvalues=== ""?"":this.state.mainvalues===undefined||this.state.mainvalues=== ""?`已安装软件:`+this.state.subvalues:this.state.subvalues}`}
+ {`${this.state.mainvalues===undefined||this.state.mainvalues=== ""?"":`说明:添加了`+this.state.mainvalues}${this.state.subvalues===undefined||this.state.subvalues=== ""?"":
+ this.state.mainvalues===undefined||this.state.mainvalues=== ""?`说明:添加了`+this.state.subvalues:this.state.subvalues}`}
}
@@ -697,27 +699,6 @@ class Newshixuns extends Component {
{/**/}
-
-
-
-
新建申请已提交,请等待管理员的审核
-
我们将在1-2个工作日内与您联系
-
-
-
-
-
diff --git a/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js b/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js
index dc70ee1ca..86e7f2c04 100644
--- a/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js
+++ b/public/react/src/modules/tpm/shixunchild/Challenges/Challengesjupyter.js
@@ -60,11 +60,26 @@ 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={
+ identifier:id,
+ }
+ axios.get(ChallengesURL, {params: datas}).then((response) => {
+ if (response.status === 200) {
+ if (response.data.status === 403||response.data.status === 401||response.data.status === 500) {
- console.log("componentDidMount");
- console.log("Challengesjupyter");
- console.log(this.props);
-
+ }else{
+ console.log("componentDidMountChallengesjupyter");
+ console.log(response.data);
+ }
+ }
+ }).catch((error) => {
+ console.log(error)
+ });
@@ -125,15 +140,21 @@ class Challengesjupyter extends Component {
console.log("propsysl");
console.log(propsysl);
let id=this.props.match.params.shixunId;
+ var jupyter_port="";
+ try{
+ jupyter_port= parseInt(propsysl.shixunsDetails.jupyter_port);
+ }catch (e) {
+ jupyter_port=propsysl.shixunsDetails.jupyter_port;
+ }
const url=`/shixuns/${id}/update_jupyter.json`;
const data={
identifier:id,
- jupyter_port:propsysl.shixunsDetails.jupyter_port
+ jupyter_port:jupyter_port,
}
axios.post(url, data)
.then((result) => {
- if (result.data.status == 0) {
+ if (result.data.status === 0) {
this.props.showNotification(`应用成功`);
}
}).catch((error) => {
diff --git a/public/react/src/modules/tpm/shixunchild/Collaborators/Collaborators.css b/public/react/src/modules/tpm/shixunchild/Collaborators/Collaborators.css
index 4c45f581d..112f381ee 100644
--- a/public/react/src/modules/tpm/shixunchild/Collaborators/Collaborators.css
+++ b/public/react/src/modules/tpm/shixunchild/Collaborators/Collaborators.css
@@ -3,6 +3,11 @@
line-height: 30px;
}
+.height28 {
+ height: 30px;
+ line-height:28px;
+}
+
.line27{
line-height: 27px;
vertical-align: 1px;
diff --git a/public/react/src/modules/tpm/shixunchild/Collaborators/Collaborators.js b/public/react/src/modules/tpm/shixunchild/Collaborators/Collaborators.js
index 8e4f0f24d..747a1cbe6 100644
--- a/public/react/src/modules/tpm/shixunchild/Collaborators/Collaborators.js
+++ b/public/react/src/modules/tpm/shixunchild/Collaborators/Collaborators.js
@@ -457,7 +457,7 @@ class Collaborators extends Component {
style={{display:this.props.identity<5?"flex":"none"}}
>
-
共12人
+
共{collaboratorList&&collaboratorList.length}人
diff --git a/public/react/src/modules/tpm/shixunchild/Repository/TPMRepositoryCommits.js b/public/react/src/modules/tpm/shixunchild/Repository/TPMRepositoryCommits.js
index 663c5fcf3..37a4217a6 100644
--- a/public/react/src/modules/tpm/shixunchild/Repository/TPMRepositoryCommits.js
+++ b/public/react/src/modules/tpm/shixunchild/Repository/TPMRepositoryCommits.js
@@ -1,145 +1,146 @@
-import React, { Component } from 'react';
-
-import { Redirect } from 'react-router';
-
-import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom";
-
-import PropTypes from 'prop-types';
-
-import classNames from 'classnames';
-
-import axios from 'axios';
-
-import TPMNav from '../../component/TPMNav'
-import TPMRightSection from '../../component/TPMRightSection'
-import { CircularProgress } from 'material-ui/Progress';
-
-import { trace_collapse } from 'educoder'
-const $ = window.$;
-
-// 点击按钮复制功能
-function jsCopy(){
- var e = document.getElementById("copy_rep_content");
- e.select();
- document.execCommand("Copy");
-}
-class TPMRepositoryCommits extends Component {
- constructor(props) {
- super(props)
- this.state = {
- RepositoryList: undefined,
- }
- }
- componentDidMount() {
- let id = this.props.match.params.shixunId;
-
- let collaborators=`/shixuns/`+id+`/commits.json`;
- axios.post(collaborators, {
- secret_repository: this.props.secret_repository_tab
- }).then((response)=> {
-
- if(response.status===200){
- this.setState({
- RepositoryList: response.data
- });
- }
- trace_collapse('repo commits res', response.data)
-
- }).catch((error)=>{
- console.log(error)
- });
-
- }
- render() {
- const { loadingContent, creator, shixun, myshixun, recommend_shixuns, current_user, watched,
- aboutFocus, user, match
- } = this.props;
- let { RepositoryList } = this.state;
- return (
-
-
-
- {/* 可能会影响到其他页面的样式,需要测试、协商 */}
-
-
- { loadingContent ?
-
- :
-
-
-
-
- 提交记录
-
- {/* 35 */}
-
- 返回
-
-
-
-
-
-
- { RepositoryList === undefined ? "" : RepositoryList.commits.map( (item, key)=>{
- return (
- -
- {item.email}
-
- {item.title}
-
- {item.time}
-
-
- )
- })
- }
-
-
-
- }
-
-
-
-
-
-
-
-
-
-
- );
- }
-}
-
-/**
- { RepositoryList === undefined ? "" : RepositoryList.commits.map( (item, key)=>{
- // {"email":"李暾","title":"2\n","id":"80cb6fc55a14bdd64a9c99913f416966238ed3de","time":"49年前"}
- return (
-
-
{item.email}
-
{item.title}
-
{item.id}
-
{item.time}
-
- )
- })
- */
-export default TPMRepositoryCommits;
+import React, { Component } from 'react';
+
+import { Redirect } from 'react-router';
+
+import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom";
+
+import PropTypes from 'prop-types';
+
+import classNames from 'classnames';
+
+import axios from 'axios';
+
+import TPMNav from '../../component/TPMNav'
+import TPMRightSection from '../../component/TPMRightSection'
+import { CircularProgress } from 'material-ui/Progress';
+
+import { trace_collapse } from 'educoder'
+const $ = window.$;
+
+// 点击按钮复制功能
+function jsCopy(){
+ var e = document.getElementById("copy_rep_content");
+ e.select();
+ document.execCommand("Copy");
+}
+class TPMRepositoryCommits extends Component {
+ constructor(props) {
+ super(props)
+ this.state = {
+ RepositoryList: undefined,
+ }
+ }
+ componentDidMount() {
+ let id = this.props.match.params.shixunId;
+
+ let collaborators=`/shixuns/`+id+`/commits.json`;
+ axios.post(collaborators, {
+ secret_repository: this.props.secret_repository_tab
+ }).then((response)=> {
+
+ if(response.status===200){
+ this.setState({
+ RepositoryList: response.data
+ });
+ }
+ trace_collapse('repo commits res', response.data)
+
+ }).catch((error)=>{
+ console.log(error)
+ });
+
+ }
+ render() {
+ const { loadingContent, creator, shixun, myshixun, recommend_shixuns, current_user, watched,
+ aboutFocus, user, match
+ } = this.props;
+ let { RepositoryList } = this.state;
+ return (
+
+
+
+ {/* 可能会影响到其他页面的样式,需要测试、协商 */}
+
+
+ { loadingContent ?
+
+ :
+
+
+
+
+ 提交记录
+
+ {/* 35 */}
+
+ 返回
+
+
+
+
+
+
+ { RepositoryList === undefined ? "" : RepositoryList.commits.map( (item, key)=>{
+ return (
+ -
+ {item.email}
+
+ {item.title}
+
+ {item.time}
+
+
+ )
+ })
+ }
+
+
+
+ }
+
+
+
+
+
+
+
+
+
+
+ );
+ }
+}
+
+/**
+ { RepositoryList === undefined ? "" : RepositoryList.commits.map( (item, key)=>{
+ // {"email":"李暾","title":"2\n","id":"80cb6fc55a14bdd64a9c99913f416966238ed3de","time":"49年前"}
+ return (
+
+
{item.email}
+
{item.title}
+
{item.id}
+
{item.time}
+
+ )
+ })
+ */
+export default TPMRepositoryCommits;