fix: list local date
This commit is contained in:
@@ -121,7 +121,9 @@ const InstanceItem: React.FC<InstanceItemProps> = ({
|
||||
</Col>
|
||||
<Col span={5}>
|
||||
<span style={{ paddingLeft: 38 }}>
|
||||
{dayjs.utc(item.created_at).format('YYYY-MM-DD HH:mm:ss')}
|
||||
{dayjs(item.created_at)
|
||||
.local()
|
||||
.format('YYYY-MM-DD HH:mm:ss')}
|
||||
</span>
|
||||
</Col>
|
||||
<Col span={4}>
|
||||
|
||||
@@ -360,18 +360,26 @@ const Models: React.FC<ModelsProps> = ({
|
||||
key="replicas"
|
||||
align="center"
|
||||
span={4}
|
||||
render={(text, record: ListItem) => {
|
||||
return (
|
||||
<span>
|
||||
{record.ready_replicas} / {record.replicas}
|
||||
</span>
|
||||
);
|
||||
}}
|
||||
/>
|
||||
<SealColumn
|
||||
span={5}
|
||||
title={intl.formatMessage({ id: 'common.table.createTime' })}
|
||||
dataIndex="created_at"
|
||||
key="createTime"
|
||||
key="created_at"
|
||||
defaultSortOrder="descend"
|
||||
sortOrder={sortOrder}
|
||||
showSorterTooltip={false}
|
||||
sorter={true}
|
||||
render={(val, row) => {
|
||||
return dayjs.utc(val).format('YYYY-MM-DD HH:mm:ss');
|
||||
render={(text, row) => {
|
||||
console.log('val=time===', text, row.name, row, row.created_at);
|
||||
return dayjs(text).local().format('YYYY-MM-DD HH:mm:ss');
|
||||
}}
|
||||
/>
|
||||
<SealColumn
|
||||
|
||||
@@ -4,6 +4,8 @@ export interface ListItem {
|
||||
huggingface_file_name: string;
|
||||
huggingface_filename: string;
|
||||
ollama_library_model_name: string;
|
||||
ready_replicas: number;
|
||||
replicas: number;
|
||||
s3Address: string;
|
||||
name: string;
|
||||
description: string;
|
||||
|
||||
@@ -47,9 +47,10 @@ const Models: React.FC = () => {
|
||||
cancelToken: axiosToken.token
|
||||
});
|
||||
console.log('res=======', res);
|
||||
if (!firstLoad) {
|
||||
setDataSource(res.items);
|
||||
}
|
||||
// if (!firstLoad) {
|
||||
// setDataSource(res.items);
|
||||
// }
|
||||
setDataSource(res.items);
|
||||
setTotal(res.pagination.total);
|
||||
} catch (error) {
|
||||
setDataSource([]);
|
||||
|
||||
Reference in New Issue
Block a user