Merge branches 'dev_aliyun' and 'develop' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

chromesetting
杨树明 5 years ago
commit e7f481016f

@ -52,6 +52,7 @@ export function initAxiosInterceptors(props) {
//proxy="http://47.96.87.25:48080"
proxy="https://pre-newweb.educoder.net"
proxy="https://test-newweb.educoder.net"
//proxy="https://test-jupyterweb.educoder.net"
//proxy="http://192.168.2.63:3001"
// 在这里使用requestMap控制避免用户通过双击等操作发出重复的请求

@ -418,12 +418,21 @@ class Shixuninformation extends Component {
selectscripts:response.data[0].id
})
this.get_mirror_script(response.data[0].id)
this.setState({
choice_main_type: value,
standard_scripts: response.data,
shixun_service_configs: newshixun_service_configsagin,
shixun_service_configlist: newshixun_service_configsagin,
})
if(e.props.mirror_name===null){
this.setState({
choice_main_type: value,
standard_scripts: response.data,
})
}else{
this.setState({
choice_main_type: value,
standard_scripts: response.data,
shixun_service_configs: newshixun_service_configsagin,
shixun_service_configlist: newshixun_service_configsagin,
})
}
}
}).catch((error) => {
@ -476,46 +485,52 @@ class Shixuninformation extends Component {
})
}
littleClass = (value,e) => {
let newshixun_service_configs = this.state.shixun_service_configs;
let newchoice_small_type = this.state.choice_small_type;
let list = []
list.push(this.state.choice_main_type)
newchoice_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)
}
})
})
this.props.data.shixun.small_type.some((items, keys) => {
if (items.id === value) {
newshixun_service_configsagin.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
}
let newshixun_service_configs = this.state.shixun_service_configs;
let newchoice_small_type = this.state.choice_small_type;
let list = []
list.push(this.state.choice_main_type)
newchoice_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)
}
})
})
this.props.data.shixun.small_type.some((items, keys) => {
if (items.id === value) {
newshixun_service_configsagin.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)
if(e.props.mirror_name===null){
this.setState({
choice_small_type: newchoice_small_type,
})
}else{
this.setState({
choice_small_type: newchoice_small_type,
shixun_service_configs: newshixun_service_configsagin,
shixun_service_configlist: newshixun_service_configsagin,
})
}
)
newchoice_small_type.push(value)
this.setState({
choice_small_type: newchoice_small_type,
shixun_service_configs: newshixun_service_configsagin,
shixun_service_configlist: newshixun_service_configsagin,
})
}
SelectScput = (value, e) => {
@ -845,7 +860,7 @@ class Shixuninformation extends Component {
let itemtype=item.type_name.toLowerCase().indexOf('jupyter'.toLowerCase())
if(itemtype>-1) {
return (
<Option value={item.id} key={key} name={item.description}>
<Option value={item.id} key={key} name={item.description} mirror_name={item.mirror_name}>
<Tooltip placement="right" title={item.description === "" ? "无描述" : item.description}>
{item.type_name}
</Tooltip>
@ -899,7 +914,7 @@ class Shixuninformation extends Component {
{
this.props.data === undefined ? "" : this.props.data.shixun&&this.props.data.shixun.small_type.map((item, key) => {
return (
<Option value={item.id} key={key} name={item.description}>
<Option value={item.id} key={key} name={item.description} mirror_name={item.mirror_name}>
<Tooltip placement="right" title={item.description === "" ? "无描述" : item.description}>
{item.type_name}
</Tooltip>

Loading…
Cancel
Save