|
|
|
@ -560,13 +560,32 @@ export default class TPMsettings extends Component {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bigClass = (value) => {
|
|
|
|
|
// choice_main_type
|
|
|
|
|
// choice_small_type
|
|
|
|
|
let {settingsData,shixun_service_configs,choice_main_type,choice_small_type}=this.state;
|
|
|
|
|
|
|
|
|
|
let list=[]
|
|
|
|
|
list.push(choice_main_type)
|
|
|
|
|
choice_small_type.map((item,key)=>{
|
|
|
|
|
list.push(item)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
let newshixun_service_configs=shixun_service_configs;
|
|
|
|
|
|
|
|
|
|
let newshixun_service_configsagin=[]
|
|
|
|
|
|
|
|
|
|
newshixun_service_configs.map((item,key)=>{
|
|
|
|
|
list.map((its,index)=>{
|
|
|
|
|
if(item.mirror_repository_id===its){
|
|
|
|
|
newshixun_service_configsagin.push(item)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
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]={
|
|
|
|
|
newshixun_service_configsagin[0]={
|
|
|
|
|
mirror_repository_id:value,
|
|
|
|
|
name:item.type_name,
|
|
|
|
|
cpu_limit:1,
|
|
|
|
@ -586,8 +605,8 @@ export default class TPMsettings extends Component {
|
|
|
|
|
choice_main_type: value,
|
|
|
|
|
standard_scripts:response.data,
|
|
|
|
|
choice_standard_scripts:null,
|
|
|
|
|
shixun_service_configs:newshixun_service_configs,
|
|
|
|
|
shixun_service_configlist:newshixun_service_configs,
|
|
|
|
|
shixun_service_configs:newshixun_service_configsagin,
|
|
|
|
|
shixun_service_configlist:newshixun_service_configsagin,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}).catch((error) => {
|
|
|
|
@ -628,7 +647,7 @@ export default class TPMsettings extends Component {
|
|
|
|
|
}
|
|
|
|
|
littleClass = (value) => {
|
|
|
|
|
|
|
|
|
|
let {settingsData,shixun_service_configs,choice_small_type}=this.state;
|
|
|
|
|
let {settingsData,shixun_service_configs,choice_small_type,choice_main_type}=this.state;
|
|
|
|
|
let newshixun_service_configs=shixun_service_configs;
|
|
|
|
|
let newchoice_small_type=choice_small_type;
|
|
|
|
|
// if(Array.isArray(value)===true){
|
|
|
|
@ -649,9 +668,26 @@ export default class TPMsettings extends Component {
|
|
|
|
|
// )
|
|
|
|
|
// })
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
let list=[]
|
|
|
|
|
list.push(choice_main_type)
|
|
|
|
|
choice_small_type.map((item,key)=>{
|
|
|
|
|
list.push(item)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
let newshixun_service_configsagin=[]
|
|
|
|
|
|
|
|
|
|
newshixun_service_configs.map((item,key)=>{
|
|
|
|
|
list.map((its,index)=>{
|
|
|
|
|
if(item.mirror_repository_id===its){
|
|
|
|
|
newshixun_service_configsagin.push(item)
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
settingsData.shixun.small_type.some((items,keys)=> {
|
|
|
|
|
if (items.id === value) {
|
|
|
|
|
newshixun_service_configs.push({
|
|
|
|
|
newshixun_service_configsagin.push({
|
|
|
|
|
mirror_repository_id:value,
|
|
|
|
|
name:items.type_name,
|
|
|
|
|
cpu_limit:1,
|
|
|
|
@ -666,10 +702,11 @@ export default class TPMsettings extends Component {
|
|
|
|
|
|
|
|
|
|
newchoice_small_type.push(value)
|
|
|
|
|
|
|
|
|
|
consoe.log(newshixun_service_configsagin)
|
|
|
|
|
this.setState({
|
|
|
|
|
choice_small_type: newchoice_small_type,
|
|
|
|
|
shixun_service_configs:newshixun_service_configs,
|
|
|
|
|
shixun_service_configlist:newshixun_service_configs,
|
|
|
|
|
shixun_service_configs:newshixun_service_configsagin,
|
|
|
|
|
shixun_service_configlist:newshixun_service_configsagin,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
onPodExistTimeChange = (e) => {
|
|
|
|
@ -1609,7 +1646,7 @@ export default class TPMsettings extends Component {
|
|
|
|
|
settingsData === undefined ? "" : settingsData.shixun.main_type.map((item, key) => {
|
|
|
|
|
return (
|
|
|
|
|
<Option value={item.id} key={key} >
|
|
|
|
|
<Tooltip placement="right" title={item.description} >
|
|
|
|
|
<Tooltip placement="right" title={item.description=== ""?"无描述":item.description} >
|
|
|
|
|
{item.type_name}
|
|
|
|
|
</Tooltip>
|
|
|
|
|
</Option>
|
|
|
|
@ -1738,7 +1775,11 @@ export default class TPMsettings extends Component {
|
|
|
|
|
{
|
|
|
|
|
settingsData === undefined ? "" : settingsData.shixun.small_type.map((item, key) => {
|
|
|
|
|
return(
|
|
|
|
|
<Option value={item.id} key={key}>{item.type_name}</Option>
|
|
|
|
|
<Option value={item.id} key={key}>
|
|
|
|
|
<Tooltip placement="right" title={item.description=== ""?"无描述":item.description} >
|
|
|
|
|
{item.type_name}
|
|
|
|
|
</Tooltip>
|
|
|
|
|
</Option>
|
|
|
|
|
)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
@ -2189,7 +2230,7 @@ export default class TPMsettings extends Component {
|
|
|
|
|
<div id="5">
|
|
|
|
|
<p className="color-grey-6 font-16 mt30 mb20" id="shixun_scenario_type_name">
|
|
|
|
|
<span className={"fl"}>{item.name}</span>
|
|
|
|
|
<span className={"fr mr40"} onClick={()=>this.Deselectlittle(item.mirror_repository_id)}><i className="fa fa-times-circle color-grey-c font-16 fl"></i></span>
|
|
|
|
|
{/*<span className={"fr mr40"} onClick={()=>this.Deselectlittle(item.mirror_repository_id)}><i className="fa fa-times-circle color-grey-c font-16 fl"></i></span>*/}
|
|
|
|
|
</p>
|
|
|
|
|
<div className="clearfix mb5">
|
|
|
|
|
<label className="panel-form-label fl">CPU(核):</label>
|
|
|
|
|