|
|
|
@ -190,7 +190,7 @@ export default class TPMsettings extends Component {
|
|
|
|
|
evaluate_script:undefined,
|
|
|
|
|
standard_scripts: undefined,
|
|
|
|
|
choice_main_type: "",
|
|
|
|
|
choice_small_type: [""],
|
|
|
|
|
choice_small_type: [],
|
|
|
|
|
choice_standard_scripts:undefined,
|
|
|
|
|
editordescriptios: undefined,
|
|
|
|
|
editorevaluate_scripts: undefined,
|
|
|
|
@ -222,7 +222,8 @@ export default class TPMsettings extends Component {
|
|
|
|
|
scope_partmenttype:false,
|
|
|
|
|
newuse_scope:undefined,
|
|
|
|
|
scope_partments:0,
|
|
|
|
|
|
|
|
|
|
shixun_service_configs:undefined,
|
|
|
|
|
shixun_service_configlist:undefined,
|
|
|
|
|
pod_exist_time: undefined,
|
|
|
|
|
pod_exist_timetype: false,
|
|
|
|
|
shixunmemoMDvalue:"",
|
|
|
|
@ -325,6 +326,8 @@ export default class TPMsettings extends Component {
|
|
|
|
|
newuse_scope:response.data.shixun.use_scope,
|
|
|
|
|
scope_partments: response.data.shixun.scope_partment.length,
|
|
|
|
|
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){
|
|
|
|
@ -489,14 +492,14 @@ export default class TPMsettings extends Component {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
shixun_vnc=(e)=>{
|
|
|
|
|
let sum = ""
|
|
|
|
|
if (e.target.checked === false) {
|
|
|
|
|
sum = 0
|
|
|
|
|
} else if (e.target.checked === true) {
|
|
|
|
|
sum = 1
|
|
|
|
|
}
|
|
|
|
|
// let sum = ""
|
|
|
|
|
// if (e.target.checked === false) {
|
|
|
|
|
// sum = 0
|
|
|
|
|
// } else if (e.target.checked === true) {
|
|
|
|
|
// sum = 1
|
|
|
|
|
// }
|
|
|
|
|
this.setState({
|
|
|
|
|
vnc: sum,
|
|
|
|
|
vnc: e.target.checked,
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -513,6 +516,23 @@ export default class TPMsettings extends Component {
|
|
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
axios.get(url).then((response) => {
|
|
|
|
|
if (response.status === 200) {
|
|
|
|
@ -520,7 +540,9 @@ export default class TPMsettings extends Component {
|
|
|
|
|
this.setState({
|
|
|
|
|
choice_main_type: value,
|
|
|
|
|
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) => {
|
|
|
|
@ -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) => {
|
|
|
|
|
|
|
|
|
|
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({
|
|
|
|
|
choice_small_type: value
|
|
|
|
|
choice_small_type: newchoice_small_type,
|
|
|
|
|
shixun_service_configs:newshixun_service_configs,
|
|
|
|
|
shixun_service_configlist:newshixun_service_configs,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
onPodExistTimeChange = (e) => {
|
|
|
|
@ -594,10 +686,15 @@ export default class TPMsettings extends Component {
|
|
|
|
|
// }
|
|
|
|
|
submit_edit_shixun = () => {
|
|
|
|
|
let {
|
|
|
|
|
name, description, 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,
|
|
|
|
|
opening_time, pod_exist_time,shixunmemoMDvalue
|
|
|
|
|
name, choice_main_type, choice_small_type, choice_standard_scripts, scope_partment, choice_standard_scriptssum,
|
|
|
|
|
evaluate_script, webssh, use_scope, trainee, can_copy, task_pass, test_set_permission, hide_code, code_hidden, forbid_copy, vnc,multi_webssh,
|
|
|
|
|
opening_time,shixunmemoMDvalue,shixun_service_configlist
|
|
|
|
|
} = 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;
|
|
|
|
|
|
|
|
|
|
const description_editormd = this.description_editormd.getValue();
|
|
|
|
@ -652,15 +749,15 @@ export default class TPMsettings extends Component {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (exec_time === "") {
|
|
|
|
|
this.setState({
|
|
|
|
|
exec_timetype: true
|
|
|
|
|
})
|
|
|
|
|
$('html').animate({
|
|
|
|
|
scrollTop: 1500
|
|
|
|
|
}, 1000);
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
// if (exec_time === "") {
|
|
|
|
|
// this.setState({
|
|
|
|
|
// exec_timetype: true
|
|
|
|
|
// })
|
|
|
|
|
// $('html').animate({
|
|
|
|
|
// scrollTop: 1500
|
|
|
|
|
// }, 1000);
|
|
|
|
|
// return
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// if (!pod_exist_time) {
|
|
|
|
|
// this.setState({
|
|
|
|
@ -680,40 +777,38 @@ export default class TPMsettings extends Component {
|
|
|
|
|
let id = this.props.match.params.shixunId;
|
|
|
|
|
|
|
|
|
|
let newmulti_webssh=multi_webssh;
|
|
|
|
|
if(newmulti_webssh===true){
|
|
|
|
|
newmulti_webssh=1
|
|
|
|
|
}else{
|
|
|
|
|
newmulti_webssh=0
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(newmulti_webssh===null){
|
|
|
|
|
newmulti_webssh=0
|
|
|
|
|
newmulti_webssh=false
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//exec_time: exec_time,
|
|
|
|
|
let Url = `/shixuns/` + id + `.json`;
|
|
|
|
|
let data = {
|
|
|
|
|
name: name,
|
|
|
|
|
description: description_editormd,
|
|
|
|
|
main_type: choice_main_type,
|
|
|
|
|
small_type: choice_small_type,
|
|
|
|
|
webssh: webssh,
|
|
|
|
|
user_scope: use_scope,
|
|
|
|
|
scope_partment: scope_partment,
|
|
|
|
|
can_copy: can_copy,
|
|
|
|
|
vnc: vnc,
|
|
|
|
|
test_set_permission: test_set_permission,
|
|
|
|
|
code_hidden: code_hidden,
|
|
|
|
|
trainee: trainee,
|
|
|
|
|
task_pass: task_pass,
|
|
|
|
|
standard_scripts: choice_standard_scripts,
|
|
|
|
|
hide_code: hide_code,
|
|
|
|
|
forbid_copy: forbid_copy,
|
|
|
|
|
exec_time: exec_time,
|
|
|
|
|
evaluate_script: evaluate_script_editormd,
|
|
|
|
|
multi_webssh:newmulti_webssh,
|
|
|
|
|
opening_time:opening_time,
|
|
|
|
|
mirror_script_id:choice_standard_scriptssum,
|
|
|
|
|
delType:1
|
|
|
|
|
shixun:{
|
|
|
|
|
name: name,
|
|
|
|
|
webssh: webssh,
|
|
|
|
|
user_scope: use_scope,
|
|
|
|
|
can_copy: can_copy,
|
|
|
|
|
vnc: vnc===null?undefined:vnc,
|
|
|
|
|
test_set_permission: test_set_permission,
|
|
|
|
|
code_hidden: code_hidden,
|
|
|
|
|
trainee: trainee,
|
|
|
|
|
task_pass: task_pass,
|
|
|
|
|
hide_code: hide_code,
|
|
|
|
|
forbid_copy: forbid_copy,
|
|
|
|
|
multi_webssh:newmulti_webssh,
|
|
|
|
|
opening_time:opening_time,
|
|
|
|
|
mirror_script_id:choice_standard_scriptssum,
|
|
|
|
|
},
|
|
|
|
|
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) => {
|
|
|
|
@ -941,6 +1036,7 @@ export default class TPMsettings extends Component {
|
|
|
|
|
this.setState({
|
|
|
|
|
opers:true
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bigopens=()=>{
|
|
|
|
@ -950,16 +1046,19 @@ export default class TPMsettings extends Component {
|
|
|
|
|
opersss:false,
|
|
|
|
|
opensmail:false
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
bigopensmal=()=>{
|
|
|
|
|
bigopensmal=(e)=>{
|
|
|
|
|
this.setState({
|
|
|
|
|
opensmail:true
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
sbigopen=()=>{
|
|
|
|
|
sbigopen=(e)=>{
|
|
|
|
|
this.setState({
|
|
|
|
|
operss:true
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
sbigopens=()=>{
|
|
|
|
@ -967,10 +1066,11 @@ export default class TPMsettings extends Component {
|
|
|
|
|
operss:false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
sbigopenss=()=>{
|
|
|
|
|
sbigopenss=(e)=>{
|
|
|
|
|
this.setState({
|
|
|
|
|
opersss:true
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
sbigopensss=()=>{
|
|
|
|
@ -1015,7 +1115,9 @@ export default class TPMsettings extends Component {
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
inputs=()=>{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
|
let {
|
|
|
|
@ -1070,7 +1172,8 @@ export default class TPMsettings extends Component {
|
|
|
|
|
scope_partmenttype,
|
|
|
|
|
newuse_scope,
|
|
|
|
|
scope_partments,
|
|
|
|
|
shixunmemoMDvalue,delType
|
|
|
|
|
shixunmemoMDvalue,delType,
|
|
|
|
|
shixun_service_configs
|
|
|
|
|
} = this.state;
|
|
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
|
|
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="padding30 bor-bottom-greyE clearfix">
|
|
|
|
|
<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}
|
|
|
|
|
style={{width: 180}}
|
|
|
|
|
disabled={operateauthority?false:true}
|
|
|
|
|
onChange={operateauthority?this.littleClass:""}
|
|
|
|
|
// onChange={operateauthority?this.littleClass:""}
|
|
|
|
|
onDeselect={operateauthority?this.Deselectlittle:""}
|
|
|
|
|
onMouseEnter={operateauthority?this.bigopensmal:""}
|
|
|
|
|
onSelect={operateauthority?this.bigopens:""}
|
|
|
|
|
onSelect={operateauthority?this.littleClass:""}
|
|
|
|
|
defaultOpen={false}
|
|
|
|
|
open={opensmail}
|
|
|
|
|
>
|
|
|
|
@ -1468,21 +1572,21 @@ export default class TPMsettings extends Component {
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div className="edu-back-white mb10 padding40-20 clearfix">
|
|
|
|
|
<span className="color-orange fl mr20">*</span>
|
|
|
|
|
{/*<div className="edu-back-white mb10 padding40-20 clearfix">*/}
|
|
|
|
|
{/*<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%'}}
|
|
|
|
|
onInput={this.Timevalue} value={exec_time === undefined ? "" : exec_time}/> <span
|
|
|
|
|
className="fl mr10 ml20">秒</span>
|
|
|
|
|
{/*<Input className="mr10 fl" placeholder="请输入程序最大执行时间" maxLength="60" style={{width: '20%'}}*/}
|
|
|
|
|
{/*onInput={this.Timevalue} value={exec_time === undefined ? "" : exec_time}/> <span*/}
|
|
|
|
|
{/*className="fl mr10 ml20">秒</span>*/}
|
|
|
|
|
|
|
|
|
|
<div style={{width: ' 57px '}} className="fl">
|
|
|
|
|
<span className={exec_timetype === true ? "color-orange mt8" : "color-orange mt8 none"}
|
|
|
|
|
id="shixun_name_notice"><i
|
|
|
|
|
className="fa fa-exclamation-circle mr3"></i>必填项</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
{/*<div style={{width: ' 57px '}} className="fl">*/}
|
|
|
|
|
{/*<span className={exec_timetype === true ? "color-orange mt8" : "color-orange mt8 none"}*/}
|
|
|
|
|
{/*id="shixun_name_notice"><i*/}
|
|
|
|
|
{/*className="fa fa-exclamation-circle mr3"></i>必填项</span>*/}
|
|
|
|
|
{/*</div>*/}
|
|
|
|
|
{/*</div>*/}
|
|
|
|
|
|
|
|
|
|
{/* <div className="edu-back-white mb10 padding40-20 clearfix" id="pod_exist_time">
|
|
|
|
|
<span className="color-orange fl mr20">*</span>
|
|
|
|
@ -1675,8 +1779,9 @@ export default class TPMsettings extends Component {
|
|
|
|
|
<span className="color-grey-6 mt5 fl" style={{minWidth: '95px'}}>开启时间:</span>
|
|
|
|
|
<span className="fl mt5">
|
|
|
|
|
<DatePicker
|
|
|
|
|
showToday={false}
|
|
|
|
|
showToday={false}
|
|
|
|
|
showTime
|
|
|
|
|
width={178}
|
|
|
|
|
locale={locale}
|
|
|
|
|
format={dateFormat}
|
|
|
|
|
placeholder="请选择开启时间"
|
|
|
|
@ -1686,15 +1791,67 @@ export default class TPMsettings extends Component {
|
|
|
|
|
<label style={{top:'6px'}} className="color-grey-9 ml10" >(为空,则学员在实训发布后,能随时开启实训挑战;否则,学员在开启时间后,才能开启实训挑战)</label>
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
{/*<div className="clearfix mt20">*/}
|
|
|
|
|
{/*<span className="color-grey-6 mt5 fl" style={{minWidth: '95px'}}>VNC图形化:</span>*/}
|
|
|
|
|
{/*<span className="fl mt5">*/}
|
|
|
|
|
{/*<Checkbox checked={vnc === undefined ? false : vnc} onChange={this.shixun_vnc}></Checkbox>*/}
|
|
|
|
|
{/*<label style={{top:'6px'}} className="color-grey-9 ml10" >勾选则给学员的实践任务提供Ubuntu系统图形化实践窗口,否则不提供</label>*/}
|
|
|
|
|
{/*</span>*/}
|
|
|
|
|
{/*</div>*/}
|
|
|
|
|
<div className="clearfix mt20 ml30">
|
|
|
|
|
<span className="color-grey-6 mt5 fl" style={{minWidth: '95px'}}>VNC图形化:</span>
|
|
|
|
|
<span className="fl mt5">
|
|
|
|
|
<Checkbox checked={vnc === undefined ? false : vnc} onChange={this.shixun_vnc}></Checkbox>
|
|
|
|
|
<label style={{top:'6px'}} className="color-grey-9 ml10" >勾选则给学员的实践任务提供Ubuntu系统图形化实践窗口,否则不提供</label>
|
|
|
|
|
</span>
|
|
|
|
|
</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>
|
|
|
|
|
|
|
|
|
|
<p>
|
|
|
|
|
{
|
|
|
|
@ -1706,49 +1863,7 @@ export default class TPMsettings extends Component {
|
|
|
|
|
<a href={"/shixuns/" + shixunsID + "/challenges"} className="defalutCancelbtn fl">取消</a>
|
|
|
|
|
</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>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|