diff --git a/react-ui/src/components/CodeConfigItem/index.tsx b/react-ui/src/components/CodeConfigItem/index.tsx index ff48368c..942fa203 100644 --- a/react-ui/src/components/CodeConfigItem/index.tsx +++ b/react-ui/src/components/CodeConfigItem/index.tsx @@ -1,4 +1,3 @@ -import { AvailableRange } from '@/enums'; import { type CodeConfigData } from '@/pages/CodeConfig/List'; import { Flex, Typography } from 'antd'; import classNames from 'classnames'; @@ -24,12 +23,12 @@ function CodeConfigItem({ item, onClick }: CodeConfigItemProps) {
- {item.code_repo_vis === AvailableRange.Public ? '公开' : '私有'} + {item.is_public ? '公开' : '私有'}
{var a=(h=(h=document.getElementsByTagName("script"))[h.length-1]).getAttribute("data-injectcss"),h=h.getAttribute("data-disable-injectsvg");if(!h){var l,z,v,i,o,m=function(a,h){h.parentNode.insertBefore(a,h)};if(a&&!t.__iconfont__svg__cssinject__){t.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(a){console&&console.log(a)}}l=function(){var a,h=document.createElement("div");h.innerHTML=t._iconfont_svg_string_4511447,(h=h.getElementsByTagName("svg")[0])&&(h.setAttribute("aria-hidden","true"),h.style.position="absolute",h.style.width=0,h.style.height=0,h.style.overflow="hidden",h=h,(a=document.body).firstChild?m(h,a.firstChild):a.appendChild(h))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(l,0):(z=function(){document.removeEventListener("DOMContentLoaded",z,!1),l()},document.addEventListener("DOMContentLoaded",z,!1)):document.attachEvent&&(v=l,i=t.document,o=!1,d(),i.onreadystatechange=function(){"complete"==i.readyState&&(i.onreadystatechange=null,p())})}function p(){o||(o=!0,v())}function d(){try{i.documentElement.doScroll("left")}catch(a){return void setTimeout(d,50)}p()}})(window); \ No newline at end of file +window._iconfont_svg_string_4511447='',(t=>{var a=(h=(h=document.getElementsByTagName("script"))[h.length-1]).getAttribute("data-injectcss"),h=h.getAttribute("data-disable-injectsvg");if(!h){var l,v,z,i,o,p=function(a,h){h.parentNode.insertBefore(a,h)};if(a&&!t.__iconfont__svg__cssinject__){t.__iconfont__svg__cssinject__=!0;try{document.write("")}catch(a){console&&console.log(a)}}l=function(){var a,h=document.createElement("div");h.innerHTML=t._iconfont_svg_string_4511447,(h=h.getElementsByTagName("svg")[0])&&(h.setAttribute("aria-hidden","true"),h.style.position="absolute",h.style.width=0,h.style.height=0,h.style.overflow="hidden",h=h,(a=document.body).firstChild?p(h,a.firstChild):a.appendChild(h))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(l,0):(v=function(){document.removeEventListener("DOMContentLoaded",v,!1),l()},document.addEventListener("DOMContentLoaded",v,!1)):document.attachEvent&&(z=l,i=t.document,o=!1,d(),i.onreadystatechange=function(){"complete"==i.readyState&&(i.onreadystatechange=null,m())})}function m(){o||(o=!0,z())}function d(){try{i.documentElement.doScroll("left")}catch(a){return void setTimeout(d,50)}m()}})(window); \ No newline at end of file diff --git a/react-ui/src/pages/AutoML/components/ExperimentList/index.tsx b/react-ui/src/pages/AutoML/components/ExperimentList/index.tsx index 15846f9c..6f944ac7 100644 --- a/react-ui/src/pages/AutoML/components/ExperimentList/index.tsx +++ b/react-ui/src/pages/AutoML/components/ExperimentList/index.tsx @@ -334,7 +334,7 @@ function ExperimentList({ type }: ExperimentListProps) { dataIndex: 'update_time', key: 'update_time', width: '20%', - render: tableCellRender(false, TableCellValueType.Date), + render: tableCellRender(true, TableCellValueType.Date), }, { title: '最近五次运行状态', diff --git a/react-ui/src/pages/CodeConfig/List/index.tsx b/react-ui/src/pages/CodeConfig/List/index.tsx index a1ccd09c..069cdbe8 100644 --- a/react-ui/src/pages/CodeConfig/List/index.tsx +++ b/react-ui/src/pages/CodeConfig/List/index.tsx @@ -22,7 +22,7 @@ import styles from './index.less'; export type CodeConfigData = { id: number; code_repo_name: string; - code_repo_vis: number; + is_public: boolean; git_url: string; git_branch: string; git_user_name: string; diff --git a/react-ui/src/pages/CodeConfig/components/AddCodeConfigModal/index.tsx b/react-ui/src/pages/CodeConfig/components/AddCodeConfigModal/index.tsx index 6e621086..c250547a 100644 --- a/react-ui/src/pages/CodeConfig/components/AddCodeConfigModal/index.tsx +++ b/react-ui/src/pages/CodeConfig/components/AddCodeConfigModal/index.tsx @@ -1,5 +1,4 @@ import KFModal from '@/components/KFModal'; -import { AvailableRange } from '@/enums'; import { type CodeConfigData } from '@/pages/CodeConfig/List'; import { addCodeConfigReq, updateCodeConfigReq } from '@/services/codeConfig'; import { to } from '@/utils/promise'; @@ -27,7 +26,7 @@ interface AddCodeConfigModalProps extends Omit { function AddCodeConfigModal({ opType, codeConfigData, onOk, ...rest }: AddCodeConfigModalProps) { const [form] = Form.useForm(); - const isPublic = Form.useWatch('code_repo_vis', form) === AvailableRange.Public; + const isPublic = Form.useWatch('is_public', form) as boolean; const urlExample = useMemo( () => @@ -57,7 +56,7 @@ function AddCodeConfigModal({ opType, codeConfigData, onOk, ...rest }: AddCodeCo ...formData, }; // 清除多余的信息 - if (formData.code_repo_vis === AvailableRange.Public) { + if (formData.is_public) { omit(params, ['verify_mode', 'git_user_name', 'git_password', 'ssh_key']); } if (formData.verify_mode === VerifyMode.Password) { @@ -83,7 +82,7 @@ function AddCodeConfigModal({ opType, codeConfigData, onOk, ...rest }: AddCodeCo // 设置初始值 const initialValues: FormData = codeConfigData ?? { - code_repo_vis: AvailableRange.Public, + is_public: true, verify_mode: VerifyMode.Password, }; if (initialValues.verify_mode === undefined || initialValues.verify_mode === null) { @@ -125,7 +124,7 @@ function AddCodeConfigModal({ opType, codeConfigData, onOk, ...rest }: AddCodeCo - 公开 - 私有 + 公开 + 私有 - prevValues?.code_repo_vis !== currentValues?.code_repo_vis + prevValues?.is_public !== currentValues?.is_public } > {({ getFieldValue }) => { - return getFieldValue('code_repo_vis') === AvailableRange.Private ? ( + return getFieldValue('is_public') === false ? ( <> - {item.code_repo_vis === AvailableRange.Public ? '公开' : '私有'} + {item.is_public ? '公开' : '私有'} - )} - {record.status === DevEditorStatus.Running ? ( + {record.status !== DevEditorStatus.Running ? (