Skip to content

Commit f470d0f

Browse files
committed
refactor(board):getChartDataRequestBuilder
1 parent 235341e commit f470d0f

File tree

1 file changed

+8
-4
lines changed
  • frontend/src/app/pages/DashBoardPage/utils

1 file changed

+8
-4
lines changed

frontend/src/app/pages/DashBoardPage/utils/index.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ import { convertToChartConfigDTO } from 'app/utils/ChartDtoHelper';
3737
import { getTime } from 'app/utils/time';
3838
import { FilterSqlOperator, TIME_FORMATTER } from 'globalConstants';
3939
import i18next from 'i18next';
40-
import produce from 'immer';
4140
import moment from 'moment';
41+
import { CloneValueDeep } from 'utils/object';
4242
import { ChartDataRequestFilter } from '../../../types/ChartDataRequest';
4343
import { STORAGE_IMAGE_KEY_PREFIX } from '../constants';
4444
import {
@@ -97,9 +97,13 @@ export const getRGBAColor = color => {
9797
};
9898

9999
export const getChartDataRequestBuilder = (dataChart: DataChart) => {
100-
const migratedChartConfig = produce(dataChart?.config, draft => {
101-
migrateChartConfig(draft as ChartDetailConfigDTO);
102-
});
100+
// const migratedChartConfig = (dataChart?.config, draft => {
101+
// migrateChartConfig(draft as ChartDetailConfigDTO);
102+
// });
103+
// TODO
104+
const migratedChartConfig = migrateChartConfig(
105+
CloneValueDeep(dataChart?.config) as ChartDetailConfigDTO,
106+
);
103107
const { datas, settings } = convertToChartConfigDTO(
104108
migratedChartConfig as ChartDetailConfigDTO,
105109
);

0 commit comments

Comments
 (0)