Browse Source

style: 修改开发环境表格列宽度

pull/219/head
cp3hnu 9 months ago
parent
commit
b629456ecc
3 changed files with 15 additions and 15 deletions
  1. +3
    -3
      react-ui/src/enums/index.ts
  2. +1
    -1
      react-ui/src/pages/AutoML/components/ExperimentList/index.tsx
  3. +11
    -11
      react-ui/src/pages/DevelopmentEnvironment/List/index.tsx

+ 3
- 3
react-ui/src/enums/index.ts View File

@@ -39,9 +39,9 @@ export enum TensorBoardStatus {


// 镜像版本状态 // 镜像版本状态
export enum MirrorVersionStatus { export enum MirrorVersionStatus {
Available = 'available', // 可用
Building = 'building', // 构建中
Failed = 'failed', // 构建中
Available = 'Available', // 可用
Building = 'Building', // 构建中
Failed = 'Failed', // 失败
} }


// 服务运行状态 // 服务运行状态


+ 1
- 1
react-ui/src/pages/AutoML/components/ExperimentList/index.tsx View File

@@ -334,7 +334,7 @@ function ExperimentList({ type }: ExperimentListProps) {
dataIndex: 'update_time', dataIndex: 'update_time',
key: 'update_time', key: 'update_time',
width: '20%', width: '20%',
render: tableCellRender(false, TableCellValueType.Date),
render: tableCellRender(true, TableCellValueType.Date),
}, },
{ {
title: '最近五次运行状态', title: '最近五次运行状态',


+ 11
- 11
react-ui/src/pages/DevelopmentEnvironment/List/index.tsx View File

@@ -185,7 +185,7 @@ function EditorList() {
title: '编辑器名称', title: '编辑器名称',
dataIndex: 'name', dataIndex: 'name',
key: 'name', key: 'name',
width: '20%',
width: '16%',
render: (text, record, index) => render: (text, record, index) =>
record.url && record.status === DevEditorStatus.Running record.url && record.status === DevEditorStatus.Running
? tableCellRender<EditorData>(true, TableCellValueType.Link, { ? tableCellRender<EditorData>(true, TableCellValueType.Link, {
@@ -197,14 +197,14 @@ function EditorList() {
title: '计算资源', title: '计算资源',
dataIndex: 'computing_resource', dataIndex: 'computing_resource',
key: 'computing_resource', key: 'computing_resource',
width: 100,
width: '12%',
render: tableCellRender(), render: tableCellRender(),
}, },
{ {
title: '资源规格', title: '资源规格',
dataIndex: 'computing_resource_id', dataIndex: 'computing_resource_id',
key: 'computing_resource_id', key: 'computing_resource_id',
width: '20%',
width: '12%',
render: tableCellRender(true, TableCellValueType.Custom, { render: tableCellRender(true, TableCellValueType.Custom, {
format: getResourceDescription, format: getResourceDescription,
}), }),
@@ -213,36 +213,36 @@ function EditorList() {
title: '数据集', title: '数据集',
dataIndex: ['dataset', 'showValue'], dataIndex: ['dataset', 'showValue'],
key: 'dataset', key: 'dataset',
width: '15%',
width: '12%',
render: tableCellRender(true), render: tableCellRender(true),
}, },
{ {
title: '模型', title: '模型',
dataIndex: ['model', 'showValue'], dataIndex: ['model', 'showValue'],
key: 'model', key: 'model',
width: '15%',
width: '12%',
render: tableCellRender(true), render: tableCellRender(true),
}, },
{ {
title: '镜像', title: '镜像',
dataIndex: ['image', 'showValue'], dataIndex: ['image', 'showValue'],
key: 'image', key: 'image',
width: '15%',
width: '12%',
render: tableCellRender(true), render: tableCellRender(true),
}, },
{ {
title: '创建者', title: '创建者',
dataIndex: 'update_by', dataIndex: 'update_by',
key: 'update_by', key: 'update_by',
width: '15%',
width: '12%',
render: tableCellRender(true), render: tableCellRender(true),
}, },
{ {
title: '创建时间', title: '创建时间',
dataIndex: 'create_time', dataIndex: 'create_time',
key: 'create_time', key: 'create_time',
width: 180,
render: tableCellRender(false, TableCellValueType.Date),
width: '12%',
render: tableCellRender(true, TableCellValueType.Date),
}, },
{ {
title: '状态', title: '状态',
@@ -254,7 +254,7 @@ function EditorList() {
{ {
title: '操作', title: '操作',
dataIndex: 'operation', dataIndex: 'operation',
width: 300,
width: 270,
key: 'operation', key: 'operation',
render: (_: any, record: EditorData) => ( render: (_: any, record: EditorData) => (
<div> <div>
@@ -280,7 +280,7 @@ function EditorList() {
启动 启动
</Button> </Button>
)} )}
{record.status === DevEditorStatus.Running ? (
{record.status !== DevEditorStatus.Running ? (
<Button <Button
type="link" type="link"
size="small" size="small"


Loading…
Cancel
Save