중간저장
This commit is contained in:
@@ -301,29 +301,30 @@ export class DashboardService {
|
||||
|
||||
// 3. 요소 데이터 변환
|
||||
console.log('📊 대시보드 요소 개수:', elementsResult.rows.length);
|
||||
if (elementsResult.rows.length > 0) {
|
||||
console.log('📊 첫 번째 요소 raw data:', elementsResult.rows[0]);
|
||||
}
|
||||
|
||||
const elements: DashboardElement[] = elementsResult.rows.map((row: any) => ({
|
||||
id: row.id,
|
||||
type: row.element_type,
|
||||
subtype: row.element_subtype,
|
||||
position: {
|
||||
x: row.position_x,
|
||||
y: row.position_y
|
||||
},
|
||||
size: {
|
||||
width: row.width,
|
||||
height: row.height
|
||||
},
|
||||
title: row.title,
|
||||
content: row.content,
|
||||
dataSource: JSON.parse(row.data_source_config || '{}'),
|
||||
chartConfig: JSON.parse(row.chart_config || '{}')
|
||||
}));
|
||||
|
||||
console.log('📊 변환된 첫 번째 요소:', elements[0]);
|
||||
const elements: DashboardElement[] = elementsResult.rows.map((row: any, index: number) => {
|
||||
const element = {
|
||||
id: row.id,
|
||||
type: row.element_type,
|
||||
subtype: row.element_subtype,
|
||||
position: {
|
||||
x: row.position_x,
|
||||
y: row.position_y
|
||||
},
|
||||
size: {
|
||||
width: row.width,
|
||||
height: row.height
|
||||
},
|
||||
title: row.title,
|
||||
content: row.content,
|
||||
dataSource: JSON.parse(row.data_source_config || '{}'),
|
||||
chartConfig: JSON.parse(row.chart_config || '{}')
|
||||
};
|
||||
|
||||
console.log(`📊 위젯 #${index + 1}: type="${element.type}", subtype="${element.subtype}", title="${element.title}"`);
|
||||
|
||||
return element;
|
||||
});
|
||||
|
||||
return {
|
||||
id: dashboard.id,
|
||||
|
||||
Reference in New Issue
Block a user