From f8d306e4a96863f631dbcc8cb5afd38a8bf5e31a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
Date: Mon, 16 Dec 2019 19:13:21 +0800
Subject: [PATCH 1/2] =?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
public/react/src/AppConfig.js | 2 +-
.../tpm/TPMsettings/Shixuninformation.js | 84 ++++++++++---------
2 files changed, 46 insertions(+), 40 deletions(-)
diff --git a/public/react/src/AppConfig.js b/public/react/src/AppConfig.js
index acd18e6c3..ac39562a7 100644
--- a/public/react/src/AppConfig.js
+++ b/public/react/src/AppConfig.js
@@ -52,7 +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="https://test-jupyterweb.educoder.net"
//proxy="http://192.168.2.63:3001"
// 在这里使用requestMap控制,避免用户通过双击等操作发出重复的请求;
diff --git a/public/react/src/modules/tpm/TPMsettings/Shixuninformation.js b/public/react/src/modules/tpm/TPMsettings/Shixuninformation.js
index 71754fc87..25c6e8cad 100644
--- a/public/react/src/modules/tpm/TPMsettings/Shixuninformation.js
+++ b/public/react/src/modules/tpm/TPMsettings/Shixuninformation.js
@@ -476,46 +476,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) => {
@@ -899,7 +905,7 @@ class Shixuninformation extends Component {
{
this.props.data === undefined ? "" : this.props.data.shixun&&this.props.data.shixun.small_type.map((item, key) => {
return (
-