| @@ -20,13 +20,13 @@ export default { | |||||
| // localhost:8000/api/** -> https://preview.pro.ant.design/api/** | // localhost:8000/api/** -> https://preview.pro.ant.design/api/** | ||||
| '/api/': { | '/api/': { | ||||
| // 要代理的地址 | // 要代理的地址 | ||||
| target: 'http://172.20.32.181:31213', // 开发环境 | |||||
| // target: 'http://172.20.32.98:8082', | |||||
| // target: 'http://172.20.32.181:31213', // 开发环境 | |||||
| target: 'http://172.168.15.80:8082', | |||||
| // target: 'http://172.20.32.150:8082', | // target: 'http://172.20.32.150:8082', | ||||
| // 配置了这个可以从 http 代理到 https | // 配置了这个可以从 http 代理到 https | ||||
| // 依赖 origin 的功能可能需要这个,比如 cookie | // 依赖 origin 的功能可能需要这个,比如 cookie | ||||
| changeOrigin: true, | changeOrigin: true, | ||||
| // pathRewrite: { '^/api': '' }, | |||||
| pathRewrite: { '^/api': '' }, | |||||
| }, | }, | ||||
| '/profile/avatar/': { | '/profile/avatar/': { | ||||
| target: 'http://172.20.32.185:31213', | target: 'http://172.20.32.185:31213', | ||||
| @@ -140,7 +140,7 @@ | |||||
| "umi-presets-pro": "^2.0.0" | "umi-presets-pro": "^2.0.0" | ||||
| }, | }, | ||||
| "engines": { | "engines": { | ||||
| "node": ">=16.14.0" | |||||
| "node": ">=18.18.0" | |||||
| }, | }, | ||||
| "create-umi": { | "create-umi": { | ||||
| "ignoreScript": [ | "ignoreScript": [ | ||||
| @@ -26,6 +26,12 @@ | |||||
| border: 1px solid rgba(22, 100, 255, 0.3); | border: 1px solid rgba(22, 100, 255, 0.3); | ||||
| border-radius: 8px; | border-radius: 8px; | ||||
| :global { | |||||
| .ant-tree-list-holder { | |||||
| overflow-x: hidden; | |||||
| } | |||||
| } | |||||
| &__search { | &__search { | ||||
| margin-bottom: 14px; | margin-bottom: 14px; | ||||
| padding-left: 0; | padding-left: 0; | ||||
| @@ -55,12 +55,10 @@ function EditorCreate() { | |||||
| // 创建编辑器 | // 创建编辑器 | ||||
| const createEditor = async (formData: FormData) => { | const createEditor = async (formData: FormData) => { | ||||
| // 根据后台要求,修改表单数据 | // 根据后台要求,修改表单数据 | ||||
| const image = formData['image']; | |||||
| const model = formData['model']; | const model = formData['model']; | ||||
| const dataset = formData['dataset']; | const dataset = formData['dataset']; | ||||
| const params = { | const params = { | ||||
| ...omit(formData, ['image', 'model', 'dataset']), | |||||
| image: image.value, | |||||
| ...omit(formData, ['model', 'dataset']), | |||||
| model: model && pick(model, ['id', 'version', 'path', 'showValue']), | model: model && pick(model, ['id', 'version', 'path', 'showValue']), | ||||
| dataset: dataset && pick(dataset, ['id', 'version', 'path', 'showValue']), | dataset: dataset && pick(dataset, ['id', 'version', 'path', 'showValue']), | ||||
| }; | }; | ||||
| @@ -117,7 +117,6 @@ function CreateServiceVersion() { | |||||
| // 创建版本 | // 创建版本 | ||||
| const createServiceVersion = async (formData: FormData) => { | const createServiceVersion = async (formData: FormData) => { | ||||
| const envList = formData['env_variables']; | const envList = formData['env_variables']; | ||||
| const image = formData['image']; | |||||
| const model = formData['model']; | const model = formData['model']; | ||||
| const codeConfig = formData['code_config']; | const codeConfig = formData['code_config']; | ||||
| const envVariables = envList?.reduce((acc, cur) => { | const envVariables = envList?.reduce((acc, cur) => { | ||||
| @@ -127,10 +126,9 @@ function CreateServiceVersion() { | |||||
| // 根据后台要求,修改表单数据 | // 根据后台要求,修改表单数据 | ||||
| const object = { | const object = { | ||||
| ...omit(formData, ['replicas', 'env_variables', 'image', 'model', 'code_config']), | |||||
| ...omit(formData, ['replicas', 'env_variables', 'model', 'code_config']), | |||||
| replicas: Number(formData.replicas), | replicas: Number(formData.replicas), | ||||
| env_variables: envVariables, | env_variables: envVariables, | ||||
| image: image.value, | |||||
| model: changePropertyName( | model: changePropertyName( | ||||
| pick(model, ['id', 'name', 'version', 'path', 'identifier', 'owner', 'showValue']), | pick(model, ['id', 'name', 'version', 'path', 'identifier', 'owner', 'showValue']), | ||||
| { showValue: 'show_value' }, | { showValue: 'show_value' }, | ||||
| @@ -11,7 +11,7 @@ | |||||
| &__top { | &__top { | ||||
| display: flex; | display: flex; | ||||
| align-items: center; | align-items: center; | ||||
| justify-content: end; | |||||
| justify-content: flex-end; | |||||
| width: 100%; | width: 100%; | ||||
| height: 52px; | height: 52px; | ||||
| padding: 0 20px; | padding: 0 20px; | ||||