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 ? '公开' : '私有'}
',(t=>{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 ? '公开' : '私有'}
-
+ }
+ onClick={showVersionSelector}
+ >
版本对比
}
disabled={!version}
diff --git a/react-ui/src/pages/Dataset/components/ResourceItem/index.less b/react-ui/src/pages/Dataset/components/ResourceItem/index.less
index 618423e1..9cdc2a37 100644
--- a/react-ui/src/pages/Dataset/components/ResourceItem/index.less
+++ b/react-ui/src/pages/Dataset/components/ResourceItem/index.less
@@ -7,12 +7,18 @@
border-radius: 4px;
cursor: pointer;
- @media screen and (max-width: 1860px) {
+ @media screen and (max-width: 1860px) and (min-width: 1601px) {
& {
width: calc(33.33% - 13.33px);
}
}
+ @media screen and (max-width: 1600px) {
+ & {
+ width: calc(50% - 10px);
+ }
+ }
+
&:hover {
border-color: @primary-color;
box-shadow: 0px 0px 6px 1px rgba(0, 0, 0, 0.1);
@@ -56,8 +62,19 @@
&__time {
display: flex;
align-items: center;
- color: #808080;
- font-size: 13px;
min-width: 0;
+ color: @text-color-tertiary;
+ font-size: 13px;
+
+ &__separator {
+ width: 1px;
+ height: 9px;
+ margin: 0 8px;
+ background-color: rgba(205, 206, 209, 0.5);
+ }
+
+ &__praise {
+ margin-left: 4px;
+ }
}
}
diff --git a/react-ui/src/pages/Dataset/components/ResourceItem/index.tsx b/react-ui/src/pages/Dataset/components/ResourceItem/index.tsx
index 22078902..a9025a98 100644
--- a/react-ui/src/pages/Dataset/components/ResourceItem/index.tsx
+++ b/react-ui/src/pages/Dataset/components/ResourceItem/index.tsx
@@ -14,9 +14,9 @@ type ResourceItemProps = {
};
function ResourceItem({ item, isPublic, onClick, onRemove }: ResourceItemProps) {
- const timeAgo =
- '最近更新: ' +
- (item.update_time ? formatDate(item.update_time, 'YYYY-MM-DD') : item.time_ago ?? '');
+ const timeAgo = `更新于${
+ item.update_time ? formatDate(item.update_time, 'YYYY-MM-DD') : item.time_ago ?? ''
+ }`;
const create_by = item.create_by ?? '';
return (
onClick(item)}>
@@ -54,6 +54,9 @@ function ResourceItem({ item, isPublic, onClick, onRemove }: ResourceItemProps)
{timeAgo}
+
+
+
{item.praises_count}
diff --git a/react-ui/src/pages/Dataset/config.tsx b/react-ui/src/pages/Dataset/config.tsx
index 61c63531..af1993b9 100644
--- a/react-ui/src/pages/Dataset/config.tsx
+++ b/react-ui/src/pages/Dataset/config.tsx
@@ -162,6 +162,8 @@ export interface ResourceData {
usage?: string;
relative_paths?: string;
train_task?: TrainTask; // 训练任务
+ praises_count: number; // 点赞数
+ praised: boolean; // 是否点赞
}
// 数据集数据
diff --git a/react-ui/src/pages/DevelopmentEnvironment/List/index.tsx b/react-ui/src/pages/DevelopmentEnvironment/List/index.tsx
index 0eaf361e..f8717a90 100644
--- a/react-ui/src/pages/DevelopmentEnvironment/List/index.tsx
+++ b/react-ui/src/pages/DevelopmentEnvironment/List/index.tsx
@@ -185,7 +185,7 @@ function EditorList() {
title: '编辑器名称',
dataIndex: 'name',
key: 'name',
- width: '20%',
+ width: '16%',
render: (text, record, index) =>
record.url && record.status === DevEditorStatus.Running
? tableCellRender(true, TableCellValueType.Link, {
@@ -197,14 +197,14 @@ function EditorList() {
title: '计算资源',
dataIndex: 'computing_resource',
key: 'computing_resource',
- width: 100,
+ width: '12%',
render: tableCellRender(),
},
{
title: '资源规格',
dataIndex: 'computing_resource_id',
key: 'computing_resource_id',
- width: '20%',
+ width: '12%',
render: tableCellRender(true, TableCellValueType.Custom, {
format: getResourceDescription,
}),
@@ -213,36 +213,36 @@ function EditorList() {
title: '数据集',
dataIndex: ['dataset', 'showValue'],
key: 'dataset',
- width: '15%',
+ width: '12%',
render: tableCellRender(true),
},
{
title: '模型',
dataIndex: ['model', 'showValue'],
key: 'model',
- width: '15%',
+ width: '12%',
render: tableCellRender(true),
},
{
title: '镜像',
dataIndex: ['image', 'showValue'],
key: 'image',
- width: '15%',
+ width: '12%',
render: tableCellRender(true),
},
{
title: '创建者',
dataIndex: 'update_by',
key: 'update_by',
- width: '15%',
+ width: '12%',
render: tableCellRender(true),
},
{
title: '创建时间',
dataIndex: 'create_time',
key: 'create_time',
- width: 180,
- render: tableCellRender(false, TableCellValueType.Date),
+ width: '12%',
+ render: tableCellRender(true, TableCellValueType.Date),
},
{
title: '状态',
@@ -254,7 +254,7 @@ function EditorList() {
{
title: '操作',
dataIndex: 'operation',
- width: 300,
+ width: 270,
key: 'operation',
render: (_: any, record: EditorData) => (
@@ -280,7 +280,7 @@ function EditorList() {
启动
)}
- {record.status === DevEditorStatus.Running ? (
+ {record.status !== DevEditorStatus.Running ? (
- {item.code_repo_vis === AvailableRange.Public ? '公开' : '私有'}
+ {item.is_public ? '公开' : '私有'}