|
|
@ -190,7 +190,7 @@ export default class TPMsettings extends Component {
|
|
|
|
evaluate_script:undefined,
|
|
|
|
evaluate_script:undefined,
|
|
|
|
standard_scripts: undefined,
|
|
|
|
standard_scripts: undefined,
|
|
|
|
choice_main_type: "",
|
|
|
|
choice_main_type: "",
|
|
|
|
choice_small_type: [""],
|
|
|
|
choice_small_type: [],
|
|
|
|
choice_standard_scripts:undefined,
|
|
|
|
choice_standard_scripts:undefined,
|
|
|
|
editordescriptios: undefined,
|
|
|
|
editordescriptios: undefined,
|
|
|
|
editorevaluate_scripts: undefined,
|
|
|
|
editorevaluate_scripts: undefined,
|
|
|
@ -222,7 +222,8 @@ export default class TPMsettings extends Component {
|
|
|
|
scope_partmenttype:false,
|
|
|
|
scope_partmenttype:false,
|
|
|
|
newuse_scope:undefined,
|
|
|
|
newuse_scope:undefined,
|
|
|
|
scope_partments:0,
|
|
|
|
scope_partments:0,
|
|
|
|
|
|
|
|
shixun_service_configs:undefined,
|
|
|
|
|
|
|
|
shixun_service_configlist:undefined,
|
|
|
|
pod_exist_time: undefined,
|
|
|
|
pod_exist_time: undefined,
|
|
|
|
pod_exist_timetype: false,
|
|
|
|
pod_exist_timetype: false,
|
|
|
|
shixunmemoMDvalue:"",
|
|
|
|
shixunmemoMDvalue:"",
|
|
|
@ -325,6 +326,8 @@ export default class TPMsettings extends Component {
|
|
|
|
newuse_scope:response.data.shixun.use_scope,
|
|
|
|
newuse_scope:response.data.shixun.use_scope,
|
|
|
|
scope_partments: response.data.shixun.scope_partment.length,
|
|
|
|
scope_partments: response.data.shixun.scope_partment.length,
|
|
|
|
shixunmemoMDvalue:response.data.shixun.evaluate_script,
|
|
|
|
shixunmemoMDvalue:response.data.shixun.evaluate_script,
|
|
|
|
|
|
|
|
shixun_service_configs:response.data.shixun.shixun_service_configs,
|
|
|
|
|
|
|
|
shixun_service_configlist:response.data.shixun.shixun_service_configs,
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
// if(response.data.status===403){
|
|
|
|
// if(response.data.status===403){
|
|
|
@ -489,14 +492,14 @@ export default class TPMsettings extends Component {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
shixun_vnc=(e)=>{
|
|
|
|
shixun_vnc=(e)=>{
|
|
|
|
let sum = ""
|
|
|
|
// let sum = ""
|
|
|
|
if (e.target.checked === false) {
|
|
|
|
// if (e.target.checked === false) {
|
|
|
|
sum = 0
|
|
|
|
// sum = 0
|
|
|
|
} else if (e.target.checked === true) {
|
|
|
|
// } else if (e.target.checked === true) {
|
|
|
|
sum = 1
|
|
|
|
// sum = 1
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
vnc: sum,
|
|
|
|
vnc: e.target.checked,
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -513,6 +516,23 @@ export default class TPMsettings extends Component {
|
|
|
|
|
|
|
|
|
|
|
|
bigClass = (value) => {
|
|
|
|
bigClass = (value) => {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let {settingsData,shixun_service_configs}=this.state;
|
|
|
|
|
|
|
|
let newshixun_service_configs=shixun_service_configs;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
settingsData.shixun.main_type.some((item,key)=> {
|
|
|
|
|
|
|
|
if (item.id === value) {
|
|
|
|
|
|
|
|
newshixun_service_configs[0]={
|
|
|
|
|
|
|
|
mirror_repository_id:value,
|
|
|
|
|
|
|
|
name:item.type_name,
|
|
|
|
|
|
|
|
cpu_limit:1,
|
|
|
|
|
|
|
|
lower_cpu_limit:0.1,
|
|
|
|
|
|
|
|
memory_limit:1024,
|
|
|
|
|
|
|
|
request_limit:10
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return true
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
)
|
|
|
|
let url = `/shixuns/get_mirror_script.json?mirror_id=`+value;
|
|
|
|
let url = `/shixuns/get_mirror_script.json?mirror_id=`+value;
|
|
|
|
axios.get(url).then((response) => {
|
|
|
|
axios.get(url).then((response) => {
|
|
|
|
if (response.status === 200) {
|
|
|
|
if (response.status === 200) {
|
|
|
@ -520,7 +540,9 @@ export default class TPMsettings extends Component {
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
choice_main_type: value,
|
|
|
|
choice_main_type: value,
|
|
|
|
standard_scripts:response.data,
|
|
|
|
standard_scripts:response.data,
|
|
|
|
choice_standard_scripts:null
|
|
|
|
choice_standard_scripts:null,
|
|
|
|
|
|
|
|
shixun_service_configs:newshixun_service_configs,
|
|
|
|
|
|
|
|
shixun_service_configlist:newshixun_service_configs,
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}).catch((error) => {
|
|
|
|
}).catch((error) => {
|
|
|
@ -530,10 +552,80 @@ export default class TPMsettings extends Component {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Deselectlittle=(value)=>{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let {settingsData,shixun_service_configs,choice_small_type}=this.state;
|
|
|
|
|
|
|
|
let newshixun_service_configs=shixun_service_configs;
|
|
|
|
|
|
|
|
let newchoice_small_type=choice_small_type;
|
|
|
|
|
|
|
|
newchoice_small_type.some((items,keys)=> {
|
|
|
|
|
|
|
|
if (items === value) {
|
|
|
|
|
|
|
|
newchoice_small_type.splice(keys, 1)
|
|
|
|
|
|
|
|
return true
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
settingsData.shixun.small_type.some((items,keys)=> {
|
|
|
|
|
|
|
|
if (items.id === value) {
|
|
|
|
|
|
|
|
newshixun_service_configs.splice(keys+1, 1)
|
|
|
|
|
|
|
|
return true
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
choice_small_type: newchoice_small_type,
|
|
|
|
|
|
|
|
shixun_service_configs:newshixun_service_configs,
|
|
|
|
|
|
|
|
shixun_service_configlist:newshixun_service_configs,
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
littleClass = (value) => {
|
|
|
|
littleClass = (value) => {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let {settingsData,shixun_service_configs,choice_small_type}=this.state;
|
|
|
|
|
|
|
|
let newshixun_service_configs=shixun_service_configs;
|
|
|
|
|
|
|
|
let newchoice_small_type=choice_small_type;
|
|
|
|
|
|
|
|
// if(Array.isArray(value)===true){
|
|
|
|
|
|
|
|
// value.map((item,key)=>{
|
|
|
|
|
|
|
|
// settingsData.shixun.small_type.some((items,keys)=> {
|
|
|
|
|
|
|
|
// if (items.id === item) {
|
|
|
|
|
|
|
|
// newshixun_service_configs.push({
|
|
|
|
|
|
|
|
// mirror_repository_id:value,
|
|
|
|
|
|
|
|
// name:items.type_name,
|
|
|
|
|
|
|
|
// cpu_limit:1,
|
|
|
|
|
|
|
|
// lower_cpu_limit:0.1,
|
|
|
|
|
|
|
|
// memory_limit:1024,
|
|
|
|
|
|
|
|
// request_limit:10
|
|
|
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
// return true
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
// )
|
|
|
|
|
|
|
|
// })
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
settingsData.shixun.small_type.some((items,keys)=> {
|
|
|
|
|
|
|
|
if (items.id === value) {
|
|
|
|
|
|
|
|
newshixun_service_configs.push({
|
|
|
|
|
|
|
|
mirror_repository_id:value,
|
|
|
|
|
|
|
|
name:items.type_name,
|
|
|
|
|
|
|
|
cpu_limit:1,
|
|
|
|
|
|
|
|
lower_cpu_limit:0.1,
|
|
|
|
|
|
|
|
memory_limit:1024,
|
|
|
|
|
|
|
|
request_limit:10
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
return true
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
newchoice_small_type.push(value)
|
|
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
choice_small_type: value
|
|
|
|
choice_small_type: newchoice_small_type,
|
|
|
|
|
|
|
|
shixun_service_configs:newshixun_service_configs,
|
|
|
|
|
|
|
|
shixun_service_configlist:newshixun_service_configs,
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
onPodExistTimeChange = (e) => {
|
|
|
|
onPodExistTimeChange = (e) => {
|
|
|
@ -594,10 +686,15 @@ export default class TPMsettings extends Component {
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
submit_edit_shixun = () => {
|
|
|
|
submit_edit_shixun = () => {
|
|
|
|
let {
|
|
|
|
let {
|
|
|
|
name, description, choice_main_type, choice_small_type, choice_standard_scripts, scope_partment, choice_standard_scriptssum,
|
|
|
|
name, choice_main_type, choice_small_type, choice_standard_scripts, scope_partment, choice_standard_scriptssum,
|
|
|
|
evaluate_script, exec_time, webssh, use_scope, trainee, can_copy, task_pass, test_set_permission, hide_code, code_hidden, forbid_copy, vnc,multi_webssh,
|
|
|
|
evaluate_script, webssh, use_scope, trainee, can_copy, task_pass, test_set_permission, hide_code, code_hidden, forbid_copy, vnc,multi_webssh,
|
|
|
|
opening_time, pod_exist_time,shixunmemoMDvalue
|
|
|
|
opening_time,shixunmemoMDvalue,shixun_service_configlist
|
|
|
|
} = this.state;
|
|
|
|
} = this.state;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
shixun_service_configlist.map((item,key)=>{
|
|
|
|
|
|
|
|
delete item.name;
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
let operateauthority=this.props.identity<5&&this.state.status==0||this.props.identity===1&&this.state.status==2||this.props.identity===1&&this.state.status==1;
|
|
|
|
let operateauthority=this.props.identity<5&&this.state.status==0||this.props.identity===1&&this.state.status==2||this.props.identity===1&&this.state.status==1;
|
|
|
|
|
|
|
|
|
|
|
|
const description_editormd = this.description_editormd.getValue();
|
|
|
|
const description_editormd = this.description_editormd.getValue();
|
|
|
@ -652,15 +749,15 @@ export default class TPMsettings extends Component {
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (exec_time === "") {
|
|
|
|
// if (exec_time === "") {
|
|
|
|
this.setState({
|
|
|
|
// this.setState({
|
|
|
|
exec_timetype: true
|
|
|
|
// exec_timetype: true
|
|
|
|
})
|
|
|
|
// })
|
|
|
|
$('html').animate({
|
|
|
|
// $('html').animate({
|
|
|
|
scrollTop: 1500
|
|
|
|
// scrollTop: 1500
|
|
|
|
}, 1000);
|
|
|
|
// }, 1000);
|
|
|
|
return
|
|
|
|
// return
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
|
|
// if (!pod_exist_time) {
|
|
|
|
// if (!pod_exist_time) {
|
|
|
|
// this.setState({
|
|
|
|
// this.setState({
|
|
|
@ -680,40 +777,38 @@ export default class TPMsettings extends Component {
|
|
|
|
let id = this.props.match.params.shixunId;
|
|
|
|
let id = this.props.match.params.shixunId;
|
|
|
|
|
|
|
|
|
|
|
|
let newmulti_webssh=multi_webssh;
|
|
|
|
let newmulti_webssh=multi_webssh;
|
|
|
|
if(newmulti_webssh===true){
|
|
|
|
|
|
|
|
newmulti_webssh=1
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
newmulti_webssh=0
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(newmulti_webssh===null){
|
|
|
|
if(newmulti_webssh===null){
|
|
|
|
newmulti_webssh=0
|
|
|
|
newmulti_webssh=false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//exec_time: exec_time,
|
|
|
|
let Url = `/shixuns/` + id + `.json`;
|
|
|
|
let Url = `/shixuns/` + id + `.json`;
|
|
|
|
let data = {
|
|
|
|
let data = {
|
|
|
|
|
|
|
|
shixun:{
|
|
|
|
name: name,
|
|
|
|
name: name,
|
|
|
|
description: description_editormd,
|
|
|
|
|
|
|
|
main_type: choice_main_type,
|
|
|
|
|
|
|
|
small_type: choice_small_type,
|
|
|
|
|
|
|
|
webssh: webssh,
|
|
|
|
webssh: webssh,
|
|
|
|
user_scope: use_scope,
|
|
|
|
user_scope: use_scope,
|
|
|
|
scope_partment: scope_partment,
|
|
|
|
|
|
|
|
can_copy: can_copy,
|
|
|
|
can_copy: can_copy,
|
|
|
|
vnc: vnc,
|
|
|
|
vnc: vnc===null?undefined:vnc,
|
|
|
|
test_set_permission: test_set_permission,
|
|
|
|
test_set_permission: test_set_permission,
|
|
|
|
code_hidden: code_hidden,
|
|
|
|
code_hidden: code_hidden,
|
|
|
|
trainee: trainee,
|
|
|
|
trainee: trainee,
|
|
|
|
task_pass: task_pass,
|
|
|
|
task_pass: task_pass,
|
|
|
|
standard_scripts: choice_standard_scripts,
|
|
|
|
|
|
|
|
hide_code: hide_code,
|
|
|
|
hide_code: hide_code,
|
|
|
|
forbid_copy: forbid_copy,
|
|
|
|
forbid_copy: forbid_copy,
|
|
|
|
exec_time: exec_time,
|
|
|
|
|
|
|
|
evaluate_script: evaluate_script_editormd,
|
|
|
|
|
|
|
|
multi_webssh:newmulti_webssh,
|
|
|
|
multi_webssh:newmulti_webssh,
|
|
|
|
opening_time:opening_time,
|
|
|
|
opening_time:opening_time,
|
|
|
|
mirror_script_id:choice_standard_scriptssum,
|
|
|
|
mirror_script_id:choice_standard_scriptssum,
|
|
|
|
delType:1
|
|
|
|
},
|
|
|
|
|
|
|
|
shixun_info:{
|
|
|
|
|
|
|
|
description: description_editormd,
|
|
|
|
|
|
|
|
evaluate_script: evaluate_script_editormd,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
main_type: choice_main_type,
|
|
|
|
|
|
|
|
small_type: choice_small_type,
|
|
|
|
|
|
|
|
scope_partment: scope_partment,
|
|
|
|
|
|
|
|
shixun_service_configs:shixun_service_configlist
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
axios.put(Url, data).then((response) => {
|
|
|
|
axios.put(Url, data).then((response) => {
|
|
|
@ -941,6 +1036,7 @@ export default class TPMsettings extends Component {
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
opers:true
|
|
|
|
opers:true
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bigopens=()=>{
|
|
|
|
bigopens=()=>{
|
|
|
@ -950,16 +1046,19 @@ export default class TPMsettings extends Component {
|
|
|
|
opersss:false,
|
|
|
|
opersss:false,
|
|
|
|
opensmail:false
|
|
|
|
opensmail:false
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
bigopensmal=()=>{
|
|
|
|
bigopensmal=(e)=>{
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
opensmail:true
|
|
|
|
opensmail:true
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
sbigopen=()=>{
|
|
|
|
sbigopen=(e)=>{
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
operss:true
|
|
|
|
operss:true
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
sbigopens=()=>{
|
|
|
|
sbigopens=()=>{
|
|
|
@ -967,10 +1066,11 @@ export default class TPMsettings extends Component {
|
|
|
|
operss:false
|
|
|
|
operss:false
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
sbigopenss=()=>{
|
|
|
|
sbigopenss=(e)=>{
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
opersss:true
|
|
|
|
opersss:true
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
sbigopensss=()=>{
|
|
|
|
sbigopensss=()=>{
|
|
|
@ -1015,7 +1115,9 @@ export default class TPMsettings extends Component {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inputs=()=>{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
render() {
|
|
|
|
let {
|
|
|
|
let {
|
|
|
@ -1070,7 +1172,8 @@ export default class TPMsettings extends Component {
|
|
|
|
scope_partmenttype,
|
|
|
|
scope_partmenttype,
|
|
|
|
newuse_scope,
|
|
|
|
newuse_scope,
|
|
|
|
scope_partments,
|
|
|
|
scope_partments,
|
|
|
|
shixunmemoMDvalue,delType
|
|
|
|
shixunmemoMDvalue,delType,
|
|
|
|
|
|
|
|
shixun_service_configs
|
|
|
|
} = this.state;
|
|
|
|
} = this.state;
|
|
|
|
|
|
|
|
|
|
|
|
let options;
|
|
|
|
let options;
|
|
|
@ -1087,7 +1190,7 @@ export default class TPMsettings extends Component {
|
|
|
|
let operateauthority=this.props.identity===1?true:this.props.identity<5&&this.state.status==0?true:false;
|
|
|
|
let operateauthority=this.props.identity===1?true:this.props.identity<5&&this.state.status==0?true:false;
|
|
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<div className="educontent mt30 mb50" id="shixun_settings_show" onClick={this.bigopens} onMouseEnter={this.bigopens}>
|
|
|
|
<div className="educontent mt30 mb50" id="shixun_settings_show" onClick={this.bigopens} >
|
|
|
|
<div className="edu-back-white mb10">
|
|
|
|
<div className="edu-back-white mb10">
|
|
|
|
<div className="padding30 bor-bottom-greyE clearfix">
|
|
|
|
<div className="padding30 bor-bottom-greyE clearfix">
|
|
|
|
<span className="fl font-16">配置</span>
|
|
|
|
<span className="fl font-16">配置</span>
|
|
|
@ -1254,9 +1357,10 @@ export default class TPMsettings extends Component {
|
|
|
|
value={choice_small_type.length===0||choice_small_type[0]===""||choice_small_type===[]?undefined:choice_small_type}
|
|
|
|
value={choice_small_type.length===0||choice_small_type[0]===""||choice_small_type===[]?undefined:choice_small_type}
|
|
|
|
style={{width: 180}}
|
|
|
|
style={{width: 180}}
|
|
|
|
disabled={operateauthority?false:true}
|
|
|
|
disabled={operateauthority?false:true}
|
|
|
|
onChange={operateauthority?this.littleClass:""}
|
|
|
|
// onChange={operateauthority?this.littleClass:""}
|
|
|
|
|
|
|
|
onDeselect={operateauthority?this.Deselectlittle:""}
|
|
|
|
onMouseEnter={operateauthority?this.bigopensmal:""}
|
|
|
|
onMouseEnter={operateauthority?this.bigopensmal:""}
|
|
|
|
onSelect={operateauthority?this.bigopens:""}
|
|
|
|
onSelect={operateauthority?this.littleClass:""}
|
|
|
|
defaultOpen={false}
|
|
|
|
defaultOpen={false}
|
|
|
|
open={opensmail}
|
|
|
|
open={opensmail}
|
|
|
|
>
|
|
|
|
>
|
|
|
@ -1468,21 +1572,21 @@ export default class TPMsettings extends Component {
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div className="edu-back-white mb10 padding40-20 clearfix">
|
|
|
|
{/*<div className="edu-back-white mb10 padding40-20 clearfix">*/}
|
|
|
|
<span className="color-orange fl mr20">*</span>
|
|
|
|
{/*<span className="color-orange fl mr20">*</span>*/}
|
|
|
|
|
|
|
|
|
|
|
|
<p className="color-grey-6 font-16 mb30">程序最大执行时间</p>
|
|
|
|
{/*<p className="color-grey-6 font-16 mb30">程序最大执行时间</p>*/}
|
|
|
|
|
|
|
|
|
|
|
|
<Input className="mr10 fl" placeholder="请输入程序最大执行时间" maxLength="60" style={{width: '20%'}}
|
|
|
|
{/*<Input className="mr10 fl" placeholder="请输入程序最大执行时间" maxLength="60" style={{width: '20%'}}*/}
|
|
|
|
onInput={this.Timevalue} value={exec_time === undefined ? "" : exec_time}/> <span
|
|
|
|
{/*onInput={this.Timevalue} value={exec_time === undefined ? "" : exec_time}/> <span*/}
|
|
|
|
className="fl mr10 ml20">秒</span>
|
|
|
|
{/*className="fl mr10 ml20">秒</span>*/}
|
|
|
|
|
|
|
|
|
|
|
|
<div style={{width: ' 57px '}} className="fl">
|
|
|
|
{/*<div style={{width: ' 57px '}} className="fl">*/}
|
|
|
|
<span className={exec_timetype === true ? "color-orange mt8" : "color-orange mt8 none"}
|
|
|
|
{/*<span className={exec_timetype === true ? "color-orange mt8" : "color-orange mt8 none"}*/}
|
|
|
|
id="shixun_name_notice"><i
|
|
|
|
{/*id="shixun_name_notice"><i*/}
|
|
|
|
className="fa fa-exclamation-circle mr3"></i>必填项</span>
|
|
|
|
{/*className="fa fa-exclamation-circle mr3"></i>必填项</span>*/}
|
|
|
|
</div>
|
|
|
|
{/*</div>*/}
|
|
|
|
</div>
|
|
|
|
{/*</div>*/}
|
|
|
|
|
|
|
|
|
|
|
|
{/* <div className="edu-back-white mb10 padding40-20 clearfix" id="pod_exist_time">
|
|
|
|
{/* <div className="edu-back-white mb10 padding40-20 clearfix" id="pod_exist_time">
|
|
|
|
<span className="color-orange fl mr20">*</span>
|
|
|
|
<span className="color-orange fl mr20">*</span>
|
|
|
@ -1677,6 +1781,7 @@ export default class TPMsettings extends Component {
|
|
|
|
<DatePicker
|
|
|
|
<DatePicker
|
|
|
|
showToday={false}
|
|
|
|
showToday={false}
|
|
|
|
showTime
|
|
|
|
showTime
|
|
|
|
|
|
|
|
width={178}
|
|
|
|
locale={locale}
|
|
|
|
locale={locale}
|
|
|
|
format={dateFormat}
|
|
|
|
format={dateFormat}
|
|
|
|
placeholder="请选择开启时间"
|
|
|
|
placeholder="请选择开启时间"
|
|
|
@ -1686,14 +1791,66 @@ export default class TPMsettings extends Component {
|
|
|
|
<label style={{top:'6px'}} className="color-grey-9 ml10" >(为空,则学员在实训发布后,能随时开启实训挑战;否则,学员在开启时间后,才能开启实训挑战)</label>
|
|
|
|
<label style={{top:'6px'}} className="color-grey-9 ml10" >(为空,则学员在实训发布后,能随时开启实训挑战;否则,学员在开启时间后,才能开启实训挑战)</label>
|
|
|
|
</span>
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{/*<div className="clearfix mt20">*/}
|
|
|
|
<div className="clearfix mt20 ml30">
|
|
|
|
{/*<span className="color-grey-6 mt5 fl" style={{minWidth: '95px'}}>VNC图形化:</span>*/}
|
|
|
|
<span className="color-grey-6 mt5 fl" style={{minWidth: '95px'}}>VNC图形化:</span>
|
|
|
|
{/*<span className="fl mt5">*/}
|
|
|
|
<span className="fl mt5">
|
|
|
|
{/*<Checkbox checked={vnc === undefined ? false : vnc} onChange={this.shixun_vnc}></Checkbox>*/}
|
|
|
|
<Checkbox checked={vnc === undefined ? false : vnc} onChange={this.shixun_vnc}></Checkbox>
|
|
|
|
{/*<label style={{top:'6px'}} className="color-grey-9 ml10" >勾选则给学员的实践任务提供Ubuntu系统图形化实践窗口,否则不提供</label>*/}
|
|
|
|
<label style={{top:'6px'}} className="color-grey-9 ml10" >勾选则给学员的实践任务提供Ubuntu系统图形化实践窗口,否则不提供</label>
|
|
|
|
{/*</span>*/}
|
|
|
|
</span>
|
|
|
|
{/*</div>*/}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{/*"name": "我是镜像名", # 镜像名称*/}
|
|
|
|
|
|
|
|
{/*"cpu_limit": 1, # cpu核*/}
|
|
|
|
|
|
|
|
{/*"lower_cpu_limit": 0.1, # 最低cpu核 浮点数*/}
|
|
|
|
|
|
|
|
{/*"memory_limit": 1024 ,#内存限制*/}
|
|
|
|
|
|
|
|
{/*"request_limit": 10, # 内存要求*/}
|
|
|
|
|
|
|
|
{/*"mirror_repository_id": 12, # 镜像id*/}
|
|
|
|
|
|
|
|
<div className="edu-back-white padding40-20 mb20">
|
|
|
|
|
|
|
|
{this.props.identity<2?shixun_service_configs&&shixun_service_configs.map((item,key)=>{
|
|
|
|
|
|
|
|
return(
|
|
|
|
|
|
|
|
<div key={key}>
|
|
|
|
|
|
|
|
<p className="color-grey-6 font-16 mb30">服务配置</p>
|
|
|
|
|
|
|
|
<div id="5">
|
|
|
|
|
|
|
|
<p className="color-grey-6 font-16 mt30 mb20" id="shixun_scenario_type_name">{item.name}</p>
|
|
|
|
|
|
|
|
<div className="clearfix mb5">
|
|
|
|
|
|
|
|
<label className="panel-form-label fl">CPU(核):</label>
|
|
|
|
|
|
|
|
<div className="pr fl with80 status_con">
|
|
|
|
|
|
|
|
<input type="text" name="cpu_limit[]" value={item.cpu_limit} onInput={this.inputs}
|
|
|
|
|
|
|
|
className="panel-box-sizing task-form-100 task-height-40" placeholder="请输入类别名称" />
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div className="cl"></div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div className="clearfix mb5">
|
|
|
|
|
|
|
|
<label className="panel-form-label fl">最低CPU(核):</label>
|
|
|
|
|
|
|
|
<div className="pr fl with80 status_con">
|
|
|
|
|
|
|
|
<input type="text" name="lower_cpu_limit[]" value={item.lower_cpu_limit} onInput={this.inputs}
|
|
|
|
|
|
|
|
className="panel-box-sizing task-form-100 task-height-40" placeholder="请输入类别名称" />
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div className="cl"></div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div className="clearfix mb5">
|
|
|
|
|
|
|
|
<label className="panel-form-label fl">内存限制(M):</label>
|
|
|
|
|
|
|
|
<div className="pr fl with80 status_con">
|
|
|
|
|
|
|
|
<input type="text" name="memory_limit[]" value={item.memory_limit} onInput={this.inputs}
|
|
|
|
|
|
|
|
className="panel-box-sizing task-form-100 task-height-40" placeholder="请输入类别名称" />
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div className="cl"></div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div className="clearfix mb5">
|
|
|
|
|
|
|
|
<label className="panel-form-label fl">内存要求(M):</label>
|
|
|
|
|
|
|
|
<div className="pr fl with20 status_con">
|
|
|
|
|
|
|
|
<input type="text" name="request_limit[]" value={item.request_limit} onInput={this.inputs}
|
|
|
|
|
|
|
|
className="panel-box-sizing task-form-100 task-height-40" placeholder="请输入类别名称" />
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<label className="panel-form-label fl" style={{width: '48%'}}>温馨提示:纯编程类型实训建议使用默认值,对于大数据等建议使用最大内存的30%</label>
|
|
|
|
|
|
|
|
<div className="cl"></div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}) :""}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<p>
|
|
|
|
<p>
|
|
|
@ -1706,49 +1863,7 @@ export default class TPMsettings extends Component {
|
|
|
|
<a href={"/shixuns/" + shixunsID + "/challenges"} className="defalutCancelbtn fl">取消</a>
|
|
|
|
<a href={"/shixuns/" + shixunsID + "/challenges"} className="defalutCancelbtn fl">取消</a>
|
|
|
|
</div> :""
|
|
|
|
</div> :""
|
|
|
|
}
|
|
|
|
}
|
|
|
|
{/*{*/}
|
|
|
|
|
|
|
|
{/*this.props.identity===1&&this.props.status==2?*/}
|
|
|
|
|
|
|
|
{/*<div className="clearfix mt30">*/}
|
|
|
|
|
|
|
|
{/*<a className="defalutSubmitbtn fl mr20"*/}
|
|
|
|
|
|
|
|
{/*onClick={this.submit_edit_shixun}>保存</a>*/}
|
|
|
|
|
|
|
|
{/*<a href={"/shixuns/" + shixunsID + "/challenges"} className="defalutCancelbtn fl">取消</a>*/}
|
|
|
|
|
|
|
|
{/*/!*<a className="edu-default-btn edu-blueline-btn fl ml20"*!/*/}
|
|
|
|
|
|
|
|
{/*/!*id="challenge_begin"*!/*/}
|
|
|
|
|
|
|
|
{/*/!*onClick={this.operateshixuns}>*!/*/}
|
|
|
|
|
|
|
|
{/*/!*永久关闭*!/*/}
|
|
|
|
|
|
|
|
{/*/!*</a>*!/*/}
|
|
|
|
|
|
|
|
{/*</div> :""*/}
|
|
|
|
|
|
|
|
{/*}*/}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{/*{*/}
|
|
|
|
|
|
|
|
{/*this.props.identity===1||this.props.power==true?*/}
|
|
|
|
|
|
|
|
{/*<div className="clearfix mt30">*/}
|
|
|
|
|
|
|
|
{/*<a className="defalutSubmitbtn fl mr20"*/}
|
|
|
|
|
|
|
|
{/*onClick={this.submit_edit_shixun}>保存</a>*/}
|
|
|
|
|
|
|
|
{/*<a href={"/shixuns/" + shixunsID + "/challenges"} className="defalutCancelbtn fl">取消</a>*/}
|
|
|
|
|
|
|
|
{/*<Popconfirm title={status===0?"删除实训后,用户不能再开始挑战了是否确认删除?":"关闭实训后,用户不能再开始挑战了是否确认关闭?"} onConfirm={this.shixunsclose} okText="确定"*/}
|
|
|
|
|
|
|
|
{/*cancelText="取消"*/}
|
|
|
|
|
|
|
|
{/*style={{display:status===0?"none":"block"}}*/}
|
|
|
|
|
|
|
|
{/*>*/}
|
|
|
|
|
|
|
|
{/*<a*/}
|
|
|
|
|
|
|
|
{/*className="edu-default-btn edu-blueline-btn fl ml20"*/}
|
|
|
|
|
|
|
|
{/*id="challenge_begin"*/}
|
|
|
|
|
|
|
|
{/*style={{display:status===0?"none":"block"}}*/}
|
|
|
|
|
|
|
|
{/*>*/}
|
|
|
|
|
|
|
|
{/*{status===0?"":"永久关闭"}*/}
|
|
|
|
|
|
|
|
{/*</a>*/}
|
|
|
|
|
|
|
|
{/*</Popconfirm>*/}
|
|
|
|
|
|
|
|
{/*</div> :""*/}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{/*}*/}
|
|
|
|
|
|
|
|
{/*<div className="clearfix mt30">*/}
|
|
|
|
|
|
|
|
{/*<a className="defalutSubmitbtn fl mr20"*/}
|
|
|
|
|
|
|
|
{/*onClick={this.submit_edit_shixun}>保存</a>*/}
|
|
|
|
|
|
|
|
{/*<a href={"/shixuns/" + shixunsID + "/challenges"} className="defalutCancelbtn fl">取消</a>*/}
|
|
|
|
|
|
|
|
{/*</div>*/}
|
|
|
|
|
|
|
|
</p>
|
|
|
|
</p>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|