fix: fix time in the download csv

1. Update the since time to the local time in the download csv
2. Remove the useless stringify for the created_at column in the volume list page

Closes-Bug: #1988962
Change-Id: I7d4419ee67e19d9b10794342b0a983f4ff90804e
This commit is contained in:
Jingwei.Zhang 2022-09-07 17:20:36 +08:00
parent d3d75a43cb
commit a2dbe5ab8f
2 changed files with 4 additions and 3 deletions

View File

@ -114,7 +114,9 @@ export default class index extends Component {
return stringify(value, data);
}
if (valueRender) {
const renderFunc = getValueRenderFunc(valueRender);
const newValueRender =
valueRender === 'sinceTime' ? 'toLocalTime' : valueRender;
const renderFunc = getValueRenderFunc(newValueRender);
return this.getSimpleValue(renderFunc(value, data), data, dataIndex);
}
if (render) {

View File

@ -14,7 +14,7 @@
import React from 'react';
import { yesNoOptions } from 'utils/constants';
import { toLocalTimeFilter, renderFilterMap } from 'utils/index';
import { renderFilterMap } from 'utils/index';
import globalProjectStore from 'stores/keystone/project';
import globalVolumeStore from 'stores/cinder/volume';
import { isEmpty } from 'lodash';
@ -349,7 +349,6 @@ export const getVolumeColumnsList = (self) => {
dataIndex: 'created_at',
isHideable: true,
valueRender: 'sinceTime',
stringify: (value) => toLocalTimeFilter(value),
},
];
};