diff --git a/react-ui/src/iconfont/iconfont-menu.js b/react-ui/src/iconfont/iconfont-menu.js index 2b0bcaa9..f527568a 100644 --- a/react-ui/src/iconfont/iconfont-menu.js +++ b/react-ui/src/iconfont/iconfont-menu.js @@ -1 +1 @@ -window._iconfont_svg_string_4511326='',(t=>{var a=(l=(l=document.getElementsByTagName("script"))[l.length-1]).getAttribute("data-injectcss"),l=l.getAttribute("data-disable-injectsvg");if(!l){var i,h,o,c,e,m=function(a,l){l.parentNode.insertBefore(a,l)};if(a&&!t.__iconfont__svg__cssinject__){t.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(a){console&&console.log(a)}}i=function(){var a,l=document.createElement("div");l.innerHTML=t._iconfont_svg_string_4511326,(l=l.getElementsByTagName("svg")[0])&&(l.setAttribute("aria-hidden","true"),l.style.position="absolute",l.style.width=0,l.style.height=0,l.style.overflow="hidden",l=l,(a=document.body).firstChild?m(l,a.firstChild):a.appendChild(l))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(i,0):(h=function(){document.removeEventListener("DOMContentLoaded",h,!1),i()},document.addEventListener("DOMContentLoaded",h,!1)):document.attachEvent&&(o=i,c=t.document,e=!1,n(),c.onreadystatechange=function(){"complete"==c.readyState&&(c.onreadystatechange=null,p())})}function p(){e||(e=!0,o())}function n(){try{c.documentElement.doScroll("left")}catch(a){return void setTimeout(n,50)}p()}})(window); \ No newline at end of file +window._iconfont_svg_string_4511326='',(t=>{var a=(l=(l=document.getElementsByTagName("script"))[l.length-1]).getAttribute("data-injectcss"),l=l.getAttribute("data-disable-injectsvg");if(!l){var i,h,o,c,e,m=function(a,l){l.parentNode.insertBefore(a,l)};if(a&&!t.__iconfont__svg__cssinject__){t.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(a){console&&console.log(a)}}i=function(){var a,l=document.createElement("div");l.innerHTML=t._iconfont_svg_string_4511326,(l=l.getElementsByTagName("svg")[0])&&(l.setAttribute("aria-hidden","true"),l.style.position="absolute",l.style.width=0,l.style.height=0,l.style.overflow="hidden",l=l,(a=document.body).firstChild?m(l,a.firstChild):a.appendChild(l))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(i,0):(h=function(){document.removeEventListener("DOMContentLoaded",h,!1),i()},document.addEventListener("DOMContentLoaded",h,!1)):document.attachEvent&&(o=i,c=t.document,e=!1,n(),c.onreadystatechange=function(){"complete"==c.readyState&&(c.onreadystatechange=null,p())})}function p(){e||(e=!0,o())}function n(){try{c.documentElement.doScroll("left")}catch(a){return void setTimeout(n,50)}p()}})(window); \ No newline at end of file diff --git a/react-ui/src/iconfont/iconfont-menu.json b/react-ui/src/iconfont/iconfont-menu.json index 15215226..cb25a583 100644 --- a/react-ui/src/iconfont/iconfont-menu.json +++ b/react-ui/src/iconfont/iconfont-menu.json @@ -1,10 +1,24 @@ { "id": "4511326", - "name": "智能材料科研平台-导航", + "name": "复杂智能软件-导航", "font_family": "iconfont", "css_prefix_text": "icon-", "description": "", "glyphs": [ + { + "icon_id": "42495274", + "name": "知识图谱-active", + "font_class": "zhishitupu-icon-active", + "unicode": "e63e", + "unicode_decimal": 58942 + }, + { + "icon_id": "42495275", + "name": "知识图谱", + "font_class": "zhishitupu-icon", + "unicode": "e63f", + "unicode_decimal": 58943 + }, { "icon_id": "41643218", "name": "模型开发", diff --git a/react-ui/src/pages/ModelDeployment/CreateVersion/index.tsx b/react-ui/src/pages/ModelDeployment/CreateVersion/index.tsx index 324b77a8..46d50b21 100644 --- a/react-ui/src/pages/ModelDeployment/CreateVersion/index.tsx +++ b/react-ui/src/pages/ModelDeployment/CreateVersion/index.tsx @@ -3,7 +3,6 @@ * @Date: 2024-04-16 13:58:08 * @Description: 创建服务版本 */ -import CodeSelect from '@/components/CodeSelect'; import PageTitle from '@/components/PageTitle'; import ParameterSelect from '@/components/ParameterSelect'; import ResourceSelect, { @@ -36,7 +35,7 @@ export type FormData = { description: string; // 描述 model: ParameterInputObject; // 模型 image: ParameterInputObject; // 镜像 - code_config: ParameterInputObject; // 代码 + // code_config: ParameterInputObject; // 代码 resource: string; // 资源规格 replicas: string; // 副本数量 mount_path: string; // 模型路径 @@ -75,28 +74,23 @@ function CreateServiceVersion() { setOperationType(res.operationType); setLastPage(res.lastPage); setVersionInfo(res); - let model, codeConfig, envVariables; + let model, envVariables; + // 模型 if (res.model && typeof res.model === 'object') { model = changePropertyName(res.model, { show_value: 'showValue' }); // 接口返回是数据没有 value 值,但是 form 需要 value model.value = model.showValue; } - if (res.code_config && typeof res.code_config === 'object') { - codeConfig = changePropertyName(res.code_config, { show_value: 'showValue' }); - // 接口返回是数据没有 value 值,但是 form 需要 value - codeConfig.value = codeConfig.showValue; - } + // 环境变量 if (res.env_variables && typeof res.env_variables === 'object') { envVariables = Object.entries(res.env_variables).map(([key, value]) => ({ key, value, })); } - const formData = { - ...omit(res, 'model', 'code_config', 'env_variables'), + ...omit(res, 'model', 'env_variables'), model: model, - code_config: codeConfig, env_variables: envVariables, }; form.setFieldsValue(formData); @@ -124,7 +118,6 @@ function CreateServiceVersion() { const createServiceVersion = async (formData: FormData) => { const envList = formData['env_variables']; const model = formData['model']; - const codeConfig = formData['code_config']; const envVariables = envList?.reduce((acc, cur) => { acc[cur.key] = cur.value; return acc; @@ -132,18 +125,13 @@ function CreateServiceVersion() { // 根据后台要求,修改表单数据 const object = { - ...omit(formData, ['replicas', 'env_variables', 'model', 'code_config']), + ...omit(formData, ['replicas', 'env_variables', 'model']), replicas: Number(formData.replicas), env_variables: envVariables, model: changePropertyName( pick(model, ['id', 'name', 'version', 'path', 'identifier', 'owner', 'showValue']), { showValue: 'show_value' }, ), - code_config: codeConfig - ? changePropertyName(pick(codeConfig, ['code_path', 'branch', 'showValue']), { - showValue: 'show_value', - }) - : undefined, service_id: serviceId, }; @@ -335,7 +323,7 @@ function CreateServiceVersion() { - + {/* - + */}