fix: update the time display

1. FIx the created time column title in the backup tab in the database instance detail page
2. Fix created time/updated time label and value in detail pages

Change-Id: I656b1b195d08374949ad319d3b71d2dd97d946d2
This commit is contained in:
Jingwei.Zhang 2023-05-06 17:24:45 +08:00
parent 614d837075
commit 482e4ba321
15 changed files with 47 additions and 45 deletions

View File

@ -2587,7 +2587,6 @@
"Update User Password": "Update User Password", "Update User Password": "Update User Password",
"Update Zone": "Update Zone", "Update Zone": "Update Zone",
"Update user password": "Update user password", "Update user password": "Update user password",
"Updated": "Updated",
"Updated At": "Updated At", "Updated At": "Updated At",
"Updating": "Updating", "Updating": "Updating",
"Updating Password": "Updating Password", "Updating Password": "Updating Password",

View File

@ -2587,7 +2587,6 @@
"Update User Password": "사용자 암호 업데이트", "Update User Password": "사용자 암호 업데이트",
"Update Zone": "", "Update Zone": "",
"Update user password": "사용자 암호 업데이트", "Update user password": "사용자 암호 업데이트",
"Updated": "업데이트 완료",
"Updated At": "갱신 시점", "Updated At": "갱신 시점",
"Updating": "업데이트 중", "Updating": "업데이트 중",
"Updating Password": "", "Updating Password": "",

View File

@ -2587,7 +2587,6 @@
"Update User Password": "修改用户密码", "Update User Password": "修改用户密码",
"Update Zone": "修改区域", "Update Zone": "修改区域",
"Update user password": "修改用户密码", "Update user password": "修改用户密码",
"Updated": "更新于",
"Updated At": "更新于", "Updated At": "更新于",
"Updating": "更新中", "Updating": "更新中",
"Updating Password": "更新密码中", "Updating Password": "更新密码中",

View File

@ -47,12 +47,12 @@ export class ClusterTemplateDetail extends Base {
dataIndex: 'name', dataIndex: 'name',
}, },
{ {
title: t('Created'), title: t('Created At'),
dataIndex: 'created_at', dataIndex: 'created_at',
valueRender: 'toLocalTime', valueRender: 'toLocalTime',
}, },
{ {
title: t('Updated'), title: t('Updated At'),
dataIndex: 'updated_at', dataIndex: 'updated_at',
valueRender: 'toLocalTime', valueRender: 'toLocalTime',
}, },

View File

@ -50,12 +50,12 @@ export class ClustersDetail extends Base {
dataIndex: 'name', dataIndex: 'name',
}, },
{ {
title: t('Created'), title: t('Created At'),
dataIndex: 'created_at', dataIndex: 'created_at',
valueRender: 'toLocalTime', valueRender: 'toLocalTime',
}, },
{ {
title: t('Updated'), title: t('Updated At'),
dataIndex: 'updated_at', dataIndex: 'updated_at',
valueRender: 'toLocalTime', valueRender: 'toLocalTime',
}, },

View File

@ -39,12 +39,14 @@ export class BaseDetail extends Base {
dataIndex: 'size', dataIndex: 'size',
}, },
{ {
label: t('Created'), label: t('Created At'),
dataIndex: 'created', dataIndex: 'created',
valueRender: 'toLocalTime',
}, },
{ {
label: t('Updated'), label: t('Updated At'),
dataIndex: 'updated', dataIndex: 'updated',
valueRender: 'toLocalTime',
}, },
{ {
label: t('Status'), label: t('Status'),

View File

@ -39,12 +39,14 @@ export class BaseDetail extends Base {
dataIndex: 'datastore_version_name', dataIndex: 'datastore_version_name',
}, },
{ {
label: t('Created'), label: t('Created At'),
dataIndex: 'created', dataIndex: 'created',
valueRender: 'toLocalTime',
}, },
{ {
label: t('Updated'), label: t('Updated At'),
dataIndex: 'updated', dataIndex: 'updated',
valueRender: 'toLocalTime',
}, },
]; ];

View File

@ -36,8 +36,9 @@ export class Backups extends Base {
dataIndex: 'name', dataIndex: 'name',
}, },
{ {
title: t('Created'), title: t('Created At'),
dataIndex: 'created', dataIndex: 'created',
valueRender: 'toLocalTime',
}, },
{ {
title: t('Backup File'), title: t('Backup File'),

View File

@ -80,12 +80,12 @@ export class BaseDetail extends Base {
unit: 'GiB', unit: 'GiB',
}, },
{ {
label: t('Created'), label: t('Created At'),
dataIndex: 'created', dataIndex: 'created',
valueRender: 'toLocalTime', valueRender: 'toLocalTime',
}, },
{ {
label: t('Updated'), label: t('Updated At'),
dataIndex: 'updated', dataIndex: 'updated',
valueRender: 'toLocalTime', valueRender: 'toLocalTime',
}, },
@ -149,7 +149,7 @@ export class BaseDetail extends Base {
get faultCard() { get faultCard() {
const options = [ const options = [
{ {
label: t('Created'), label: t('Created At'),
dataIndex: 'created', dataIndex: 'created',
valueRender: 'toLocalTime', valueRender: 'toLocalTime',
}, },

View File

@ -51,19 +51,19 @@ export class BaseDetail extends Base {
get modificationTimesCard() { get modificationTimesCard() {
const options = [ const options = [
{ {
label: t('Created'), label: t('Created At'),
dataIndex: 'created_at', dataIndex: 'created_at',
valueRender: 'toLocalTime' valueRender: 'toLocalTime',
}, },
{ {
label: t('Updated'), label: t('Updated At'),
dataIndex: 'updated_at', dataIndex: 'updated_at',
valueRender: 'toLocalTime' valueRender: 'toLocalTime',
}, },
{ {
label: t('Transferred'), label: t('Transferred'),
dataIndex: 'transferred_at', dataIndex: 'transferred_at',
valueRender: 'toLocalTime' valueRender: 'toLocalTime',
}, },
]; ];
@ -78,8 +78,8 @@ export class BaseDetail extends Base {
{ {
label: t('Attributes'), label: t('Attributes'),
dataIndex: 'attributes', dataIndex: 'attributes',
render: (value) => JSON.stringify(value) render: (value) => JSON.stringify(value),
} },
]; ];
return { return {
@ -101,8 +101,8 @@ export class BaseDetail extends Base {
{ {
label: t('Masters'), label: t('Masters'),
dataIndex: 'masters', dataIndex: 'masters',
render: (value) => JSON.stringify(value) render: (value) => JSON.stringify(value),
} },
]; ];
return { return {
@ -112,4 +112,4 @@ export class BaseDetail extends Base {
} }
} }
export default inject('rootStore')(observer(BaseDetail)); export default inject('rootStore')(observer(BaseDetail));

View File

@ -32,7 +32,7 @@ export class BaseDetail extends Base {
{ {
label: t('Records'), label: t('Records'),
dataIndex: 'records', dataIndex: 'records',
render: (value) => value.map((item) => <div>{item}</div>) render: (value) => value.map((item) => <div>{item}</div>),
// render: (value) => value.join(" - ") // render: (value) => value.join(" - ")
}, },
{ {
@ -42,36 +42,36 @@ export class BaseDetail extends Base {
{ {
label: t('Version'), label: t('Version'),
dataIndex: 'version', dataIndex: 'version',
} },
]; ];
return { return {
title: t('Base Info'), title: t('Base Info'),
labelCol: 6, labelCol: 6,
contentCol: 18, contentCol: 18,
options options,
}; };
} }
get modificationTimesCard() { get modificationTimesCard() {
const options = [ const options = [
{ {
label: t('Created'), label: t('Created At'),
dataIndex: 'created_at', dataIndex: 'created_at',
valueRender: 'toLocalTime' valueRender: 'toLocalTime',
}, },
{ {
label: t('Updated'), label: t('Updated At'),
dataIndex: 'updated_at', dataIndex: 'updated_at',
valueRender: 'toLocalTime' valueRender: 'toLocalTime',
} },
]; ];
return { return {
title: t('Modification Times'), title: t('Modification Times'),
labelCol: 6, labelCol: 6,
contentCol: 18, contentCol: 18,
options options,
}; };
} }
@ -80,7 +80,7 @@ export class BaseDetail extends Base {
{ {
label: t('Zone ID'), label: t('Zone ID'),
dataIndex: 'zone_id', dataIndex: 'zone_id',
copyable: true copyable: true,
}, },
{ {
label: t('Zone Name'), label: t('Zone Name'),
@ -89,17 +89,17 @@ export class BaseDetail extends Base {
{ {
label: t('Project ID'), label: t('Project ID'),
dataIndex: 'project_id', dataIndex: 'project_id',
copyable: true copyable: true,
} },
]; ];
return { return {
title: t('Associations'), title: t('Associations'),
// labelCol: 4, // labelCol: 4,
// contentCol: 18, // contentCol: 18,
options options,
}; };
} }
} }
export default inject('rootStore')(observer(BaseDetail)); export default inject('rootStore')(observer(BaseDetail));

View File

@ -48,12 +48,12 @@ export class Detail extends Base {
valueMap: shareStatus, valueMap: shareStatus,
}, },
{ {
title: t('Created'), title: t('Created At'),
dataIndex: 'created_at', dataIndex: 'created_at',
valueRender: 'toLocalTime', valueRender: 'toLocalTime',
}, },
{ {
title: t('Updated'), title: t('Updated At'),
dataIndex: 'updated_at', dataIndex: 'updated_at',
valueRender: 'toLocalTime', valueRender: 'toLocalTime',
}, },

View File

@ -54,7 +54,7 @@ export class Detail extends Base {
valueRender: 'toLocalTime', valueRender: 'toLocalTime',
}, },
{ {
title: t('Updated'), title: t('Updated At'),
dataIndex: 'updated_at', dataIndex: 'updated_at',
valueRender: 'toLocalTime', valueRender: 'toLocalTime',
}, },

View File

@ -49,12 +49,12 @@ export class Detail extends Base {
valueMap: shareServerStatus, valueMap: shareServerStatus,
}, },
{ {
title: t('Created'), title: t('Created At'),
dataIndex: 'created_at', dataIndex: 'created_at',
valueRender: 'toLocalTime', valueRender: 'toLocalTime',
}, },
{ {
title: t('Updated'), title: t('Updated At'),
dataIndex: 'updated_at', dataIndex: 'updated_at',
valueRender: 'toLocalTime', valueRender: 'toLocalTime',
}, },

View File

@ -115,7 +115,7 @@ export class BaseDetail extends Base {
dataIndex: 'transfer.name', dataIndex: 'transfer.name',
}, },
{ {
label: t('Created'), label: t('Created At'),
dataIndex: 'transfer.created_at', dataIndex: 'transfer.created_at',
valueRender: 'toLocalTime', valueRender: 'toLocalTime',
}, },