대시보드 위젯 렌더링 수정 및 외부 API 키 통합

- DashboardViewer에 ListSummaryWidget 연결
- list 위젯이 실제 DB 데이터 표시하도록 수정
- ITS_API_KEY (국토교통부 교통사고 API) 추가
- KMA_API_KEY (기상청 특보 API) 재적용
- dashboard.ts API URL 수정 (/api로 통일)
This commit is contained in:
leeheejin
2025-10-15 17:02:06 +09:00
parent 720917fcab
commit 0b5b140625
4 changed files with 17 additions and 3 deletions

View File

@@ -300,6 +300,11 @@ export class DashboardService {
const elementsResult = await PostgreSQLService.query(elementsQuery, [dashboardId]);
// 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,
@@ -318,6 +323,8 @@ export class DashboardService {
chartConfig: JSON.parse(row.chart_config || '{}')
}));
console.log('📊 변환된 첫 번째 요소:', elements[0]);
return {
id: dashboard.id,
title: dashboard.title,