|
|
@ -554,28 +554,27 @@ export default class TPMsettings extends Component {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
Deselectlittle=(value)=>{
|
|
|
|
Deselectlittle=(value)=>{
|
|
|
|
|
|
|
|
|
|
|
|
let {settingsData,shixun_service_configs,choice_small_type}=this.state;
|
|
|
|
let {shixun_service_configs,choice_small_type}=this.state;
|
|
|
|
let newshixun_service_configs=shixun_service_configs;
|
|
|
|
let newshixun_service_configs=shixun_service_configs;
|
|
|
|
let newchoice_small_type=choice_small_type;
|
|
|
|
let newchoice_small_type=choice_small_type;
|
|
|
|
newchoice_small_type.some((items,keys)=> {
|
|
|
|
|
|
|
|
if (items === value) {
|
|
|
|
newshixun_service_configs.some((item,key)=> {
|
|
|
|
newchoice_small_type.splice(keys, 1)
|
|
|
|
if (item.mirror_repository_id === value) {
|
|
|
|
|
|
|
|
newshixun_service_configs.splice(key, 1)
|
|
|
|
|
|
|
|
return true
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
newchoice_small_type.some((item,key)=> {
|
|
|
|
|
|
|
|
if (item === value) {
|
|
|
|
|
|
|
|
newchoice_small_type.splice(key, 1)
|
|
|
|
return true
|
|
|
|
return true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
settingsData.shixun.small_type.some((items,keys)=> {
|
|
|
|
|
|
|
|
if (items.id === value) {
|
|
|
|
|
|
|
|
newshixun_service_configs.splice(keys+1, 1)
|
|
|
|
|
|
|
|
return true
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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,
|
|
|
@ -691,9 +690,11 @@ export default class TPMsettings extends Component {
|
|
|
|
opening_time,shixunmemoMDvalue,shixun_service_configlist
|
|
|
|
opening_time,shixunmemoMDvalue,shixun_service_configlist
|
|
|
|
} = this.state;
|
|
|
|
} = this.state;
|
|
|
|
|
|
|
|
|
|
|
|
shixun_service_configlist.map((item,key)=>{
|
|
|
|
let newshixun_service_configlist = shixun_service_configlist.map(v => {
|
|
|
|
delete item.name;
|
|
|
|
let v1 = Object.assign({},v);
|
|
|
|
})
|
|
|
|
delete v1.name;
|
|
|
|
|
|
|
|
return v1
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
|
|
|
@ -788,7 +789,7 @@ export default class TPMsettings extends Component {
|
|
|
|
shixun:{
|
|
|
|
shixun:{
|
|
|
|
name: name,
|
|
|
|
name: name,
|
|
|
|
webssh: webssh,
|
|
|
|
webssh: webssh,
|
|
|
|
user_scope: use_scope,
|
|
|
|
use_scope: use_scope,
|
|
|
|
can_copy: can_copy,
|
|
|
|
can_copy: can_copy,
|
|
|
|
vnc: vnc===null?undefined:vnc,
|
|
|
|
vnc: vnc===null?undefined:vnc,
|
|
|
|
test_set_permission: test_set_permission,
|
|
|
|
test_set_permission: test_set_permission,
|
|
|
@ -799,7 +800,7 @@ export default class TPMsettings extends Component {
|
|
|
|
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===undefined?choice_standard_scripts:choice_standard_scriptssum,
|
|
|
|
},
|
|
|
|
},
|
|
|
|
shixun_info:{
|
|
|
|
shixun_info:{
|
|
|
|
description: description_editormd,
|
|
|
|
description: description_editormd,
|
|
|
@ -808,7 +809,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_configlist
|
|
|
|
shixun_service_configs:newshixun_service_configlist
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
axios.put(Url, data).then((response) => {
|
|
|
|
axios.put(Url, data).then((response) => {
|
|
|
@ -1807,10 +1808,10 @@ export default class TPMsettings extends Component {
|
|
|
|
{/*"request_limit": 10, # 内存要求*/}
|
|
|
|
{/*"request_limit": 10, # 内存要求*/}
|
|
|
|
{/*"mirror_repository_id": 12, # 镜像id*/}
|
|
|
|
{/*"mirror_repository_id": 12, # 镜像id*/}
|
|
|
|
<div className="edu-back-white padding40-20 mb20">
|
|
|
|
<div className="edu-back-white padding40-20 mb20">
|
|
|
|
|
|
|
|
<p className="color-grey-6 font-16 mb30">服务配置</p>
|
|
|
|
{this.props.identity<2?shixun_service_configs&&shixun_service_configs.map((item,key)=>{
|
|
|
|
{this.props.identity<2?shixun_service_configs&&shixun_service_configs.map((item,key)=>{
|
|
|
|
return(
|
|
|
|
return(
|
|
|
|
<div key={key}>
|
|
|
|
<div key={key}>
|
|
|
|
<p className="color-grey-6 font-16 mb30">服务配置</p>
|
|
|
|
|
|
|
|
<div id="5">
|
|
|
|
<div id="5">
|
|
|
|
<p className="color-grey-6 font-16 mt30 mb20" id="shixun_scenario_type_name">{item.name}</p>
|
|
|
|
<p className="color-grey-6 font-16 mt30 mb20" id="shixun_scenario_type_name">{item.name}</p>
|
|
|
|
<div className="clearfix mb5">
|
|
|
|
<div className="clearfix mb5">
|
|
|
|