chore: set col order
This commit is contained in:
@@ -2,6 +2,7 @@ import AutoTooltip from '@/components/auto-tooltip';
|
||||
import DropdownButtons from '@/components/drop-down-buttons';
|
||||
import { TooltipOverlayScroller } from '@/components/overlay-scroller';
|
||||
import StatusTag from '@/components/status-tag';
|
||||
import { tableSorter } from '@/config/settings';
|
||||
import { modelSourceMap } from '@/pages/llmodels/config';
|
||||
import { modelFileActions } from '@/pages/llmodels/config/button-actions';
|
||||
import { convertFileSize } from '@/utils';
|
||||
@@ -265,9 +266,7 @@ const useFilesColumns = (props: {
|
||||
{
|
||||
title: intl.formatMessage({ id: 'models.form.source' }),
|
||||
dataIndex: 'source',
|
||||
sorter: {
|
||||
multiple: 1
|
||||
},
|
||||
sorter: tableSorter(1),
|
||||
ellipsis: {
|
||||
showTitle: false
|
||||
},
|
||||
@@ -286,9 +285,7 @@ const useFilesColumns = (props: {
|
||||
{
|
||||
title: intl.formatMessage({ id: 'resources.worker' }),
|
||||
dataIndex: 'worker_id',
|
||||
sorter: {
|
||||
multiple: 2
|
||||
},
|
||||
sorter: tableSorter(2),
|
||||
width: '18%',
|
||||
ellipsis: {
|
||||
showTitle: false
|
||||
@@ -312,9 +309,7 @@ const useFilesColumns = (props: {
|
||||
{
|
||||
title: intl.formatMessage({ id: 'resources.modelfiles.form.path' }),
|
||||
dataIndex: 'resolved_paths',
|
||||
sorter: {
|
||||
multiple: 3
|
||||
},
|
||||
sorter: tableSorter(3),
|
||||
width: '20%',
|
||||
ellipsis: {
|
||||
showTitle: false
|
||||
@@ -344,9 +339,7 @@ const useFilesColumns = (props: {
|
||||
dataIndex: 'created_at',
|
||||
defaultSortOrder: 'descend',
|
||||
key: 'created_at',
|
||||
sorter: {
|
||||
multiple: 4
|
||||
},
|
||||
sorter: tableSorter(4),
|
||||
width: 180,
|
||||
ellipsis: {
|
||||
showTitle: false
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import AutoTooltip from '@/components/auto-tooltip';
|
||||
import ProgressBar from '@/components/progress-bar';
|
||||
import InfoColumn from '@/components/simple-table/info-column';
|
||||
import { tableSorter } from '@/config/settings';
|
||||
import { convertFileSize } from '@/utils';
|
||||
import { useIntl } from '@umijs/max';
|
||||
import { ColumnsType } from 'antd/lib/table';
|
||||
@@ -50,9 +51,7 @@ const useGPUColumns = (props: {
|
||||
title: intl.formatMessage({ id: 'common.table.name' }),
|
||||
dataIndex: 'name',
|
||||
width: 240,
|
||||
sorter: {
|
||||
multiple: 1
|
||||
},
|
||||
sorter: tableSorter(1),
|
||||
render: (text: string, record: GPUDeviceItem) => (
|
||||
<AutoTooltip ghost maxWidth={240}>
|
||||
{text}
|
||||
@@ -62,17 +61,13 @@ const useGPUColumns = (props: {
|
||||
{
|
||||
title: intl.formatMessage({ id: 'resources.table.index' }),
|
||||
dataIndex: 'index',
|
||||
sorter: {
|
||||
multiple: 2
|
||||
},
|
||||
sorter: tableSorter(2),
|
||||
render: (text: string, record: GPUDeviceItem) => <span>{text}</span>
|
||||
},
|
||||
{
|
||||
title: intl.formatMessage({ id: 'clusters.title' }),
|
||||
dataIndex: 'cluster_id',
|
||||
sorter: {
|
||||
multiple: 3
|
||||
},
|
||||
sorter: tableSorter(3),
|
||||
ellipsis: {
|
||||
showTitle: false
|
||||
},
|
||||
@@ -85,9 +80,7 @@ const useGPUColumns = (props: {
|
||||
{
|
||||
title: intl.formatMessage({ id: 'resources.worker' }),
|
||||
dataIndex: 'worker_name',
|
||||
sorter: {
|
||||
multiple: 4
|
||||
},
|
||||
sorter: tableSorter(4),
|
||||
ellipsis: {
|
||||
showTitle: false
|
||||
},
|
||||
@@ -98,9 +91,7 @@ const useGPUColumns = (props: {
|
||||
{
|
||||
title: intl.formatMessage({ id: 'resources.table.vender' }),
|
||||
dataIndex: 'vendor',
|
||||
sorter: {
|
||||
multiple: 5
|
||||
}
|
||||
sorter: tableSorter(5)
|
||||
},
|
||||
{
|
||||
title: `${intl.formatMessage({ id: 'resources.table.temperature' })} (°C)`,
|
||||
@@ -113,9 +104,7 @@ const useGPUColumns = (props: {
|
||||
title: `${intl.formatMessage({ id: 'resources.table.utilization' })}`,
|
||||
dataIndex: 'core.utilization_rate',
|
||||
key: 'core.utilization_rate',
|
||||
sorter: {
|
||||
multiple: 6
|
||||
},
|
||||
sorter: tableSorter(6),
|
||||
render: (text: number, record: GPUDeviceItem) => {
|
||||
return (
|
||||
<>
|
||||
@@ -134,9 +123,7 @@ const useGPUColumns = (props: {
|
||||
title: intl.formatMessage({ id: 'resources.table.vramutilization' }),
|
||||
dataIndex: 'memory.utilization_rate',
|
||||
key: 'memory.utilization_rate',
|
||||
sorter: {
|
||||
multiple: 7
|
||||
},
|
||||
sorter: tableSorter(7),
|
||||
render: (text: number, record: GPUDeviceItem, index: number) => {
|
||||
return (
|
||||
<ProgressBar
|
||||
|
||||
@@ -4,6 +4,7 @@ import LabelsCell from '@/components/label-cell';
|
||||
import ProgressBar from '@/components/progress-bar';
|
||||
import InfoColumn from '@/components/simple-table/info-column';
|
||||
import StatusTag from '@/components/status-tag';
|
||||
import { tableSorter } from '@/config/settings';
|
||||
import { convertFileSize } from '@/utils';
|
||||
import {
|
||||
DeleteOutlined,
|
||||
@@ -274,9 +275,7 @@ const useWorkerColumns = ({
|
||||
title: intl.formatMessage({ id: 'common.table.name' }),
|
||||
dataIndex: 'name',
|
||||
width: 100,
|
||||
sorter: {
|
||||
multiple: 1
|
||||
},
|
||||
sorter: tableSorter(1),
|
||||
render: (text: string) => (
|
||||
<AutoTooltip ghost maxWidth={240}>
|
||||
{text}
|
||||
@@ -301,9 +300,7 @@ const useWorkerColumns = ({
|
||||
{
|
||||
title: intl.formatMessage({ id: 'common.table.status' }),
|
||||
dataIndex: 'state',
|
||||
sorter: {
|
||||
multiple: 2
|
||||
},
|
||||
sorter: tableSorter(2),
|
||||
render: (_, record) => (
|
||||
<StatusTag
|
||||
maxTooltipWidth={400}
|
||||
@@ -319,9 +316,7 @@ const useWorkerColumns = ({
|
||||
{
|
||||
title: 'IP',
|
||||
dataIndex: 'ip',
|
||||
sorter: {
|
||||
multiple: 3
|
||||
},
|
||||
sorter: tableSorter(3),
|
||||
render: (text: string, record) => (
|
||||
<AutoTooltip ghost maxWidth={240}>
|
||||
{renderIP(text, record)}
|
||||
@@ -331,9 +326,7 @@ const useWorkerColumns = ({
|
||||
{
|
||||
title: 'CPU',
|
||||
dataIndex: 'status.cpu.utilization_rate',
|
||||
sorter: {
|
||||
multiple: 4
|
||||
},
|
||||
sorter: tableSorter(4),
|
||||
render: (text: string, record) =>
|
||||
statusAvailable(record) ? (
|
||||
<ProgressBar
|
||||
@@ -346,9 +339,7 @@ const useWorkerColumns = ({
|
||||
{
|
||||
title: intl.formatMessage({ id: 'resources.table.memory' }),
|
||||
dataIndex: 'status.memory.utilization_rate',
|
||||
sorter: {
|
||||
multiple: 5
|
||||
},
|
||||
sorter: tableSorter(5),
|
||||
render: (_, record) =>
|
||||
statusAvailable(record) ? (
|
||||
<ProgressBar
|
||||
|
||||
Reference in New Issue
Block a user