|
|
@ -223,6 +223,7 @@ export default class TPMsettings extends Component {
|
|
|
|
newuse_scope:undefined,
|
|
|
|
newuse_scope:undefined,
|
|
|
|
scope_partments:0,
|
|
|
|
scope_partments:0,
|
|
|
|
shixun_service_configs:undefined,
|
|
|
|
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,7 +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_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){
|
|
|
@ -490,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,
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -539,7 +541,8 @@ export default class TPMsettings extends Component {
|
|
|
|
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_configs:newshixun_service_configs,
|
|
|
|
|
|
|
|
shixun_service_configlist:newshixun_service_configs,
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}).catch((error) => {
|
|
|
|
}).catch((error) => {
|
|
|
@ -575,7 +578,8 @@ export default class TPMsettings extends Component {
|
|
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
choice_small_type: newchoice_small_type,
|
|
|
|
choice_small_type: newchoice_small_type,
|
|
|
|
shixun_service_configs:newshixun_service_configs
|
|
|
|
shixun_service_configs:newshixun_service_configs,
|
|
|
|
|
|
|
|
shixun_service_configlist:newshixun_service_configs,
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
littleClass = (value) => {
|
|
|
|
littleClass = (value) => {
|
|
|
@ -620,7 +624,8 @@ export default class TPMsettings extends Component {
|
|
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
choice_small_type: newchoice_small_type,
|
|
|
|
choice_small_type: newchoice_small_type,
|
|
|
|
shixun_service_configs:newshixun_service_configs
|
|
|
|
shixun_service_configs:newshixun_service_configs,
|
|
|
|
|
|
|
|
shixun_service_configlist:newshixun_service_configs,
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
onPodExistTimeChange = (e) => {
|
|
|
|
onPodExistTimeChange = (e) => {
|
|
|
@ -681,12 +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,shixun_service_configs
|
|
|
|
opening_time,shixunmemoMDvalue,shixun_service_configlist
|
|
|
|
} = this.state;
|
|
|
|
} = this.state;
|
|
|
|
|
|
|
|
|
|
|
|
console.log(shixun_service_configs)
|
|
|
|
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();
|
|
|
@ -769,14 +777,10 @@ 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,
|
|
|
|
//exec_time: exec_time,
|
|
|
|
let Url = `/shixuns/` + id + `.json`;
|
|
|
|
let Url = `/shixuns/` + id + `.json`;
|
|
|
@ -786,18 +790,16 @@ export default class TPMsettings extends Component {
|
|
|
|
webssh: webssh,
|
|
|
|
webssh: webssh,
|
|
|
|
user_scope: use_scope,
|
|
|
|
user_scope: use_scope,
|
|
|
|
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,
|
|
|
|
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:{
|
|
|
|
shixun_info:{
|
|
|
|
description: description_editormd,
|
|
|
|
description: description_editormd,
|
|
|
@ -806,7 +808,7 @@ export default class TPMsettings extends Component {
|
|
|
|
main_type: choice_main_type,
|
|
|
|
main_type: choice_main_type,
|
|
|
|
small_type: choice_small_type,
|
|
|
|
small_type: choice_small_type,
|
|
|
|
scope_partment: scope_partment,
|
|
|
|
scope_partment: scope_partment,
|
|
|
|
shixun_service_configs:shixun_service_configs
|
|
|
|
shixun_service_configs:shixun_service_configlist
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
axios.put(Url, data).then((response) => {
|
|
|
|
axios.put(Url, data).then((response) => {
|
|
|
@ -1030,14 +1032,14 @@ export default class TPMsettings extends Component {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bigopen=(e)=>{
|
|
|
|
bigopen=()=>{
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
opers:true
|
|
|
|
opers:true
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bigopens=(e)=>{
|
|
|
|
bigopens=()=>{
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
opers:false,
|
|
|
|
opers:false,
|
|
|
|
operss:false,
|
|
|
|
operss:false,
|
|
|
@ -1188,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>
|
|
|
@ -1789,13 +1791,13 @@ 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>
|
|
|
|
</div>
|
|
|
|
{/*"name": "我是镜像名", # 镜像名称*/}
|
|
|
|
{/*"name": "我是镜像名", # 镜像名称*/}
|
|
|
|