리스트 위젯 REST API 기능 개선
This commit is contained in:
@@ -296,13 +296,20 @@ export function WidgetConfigSidebar({ element, isOpen, onClose, onApply }: Widge
|
||||
element.subtype === "custom-metric-v2" ||
|
||||
element.subtype === "risk-alert-v2";
|
||||
|
||||
// 리스트 위젯이 단일 데이터 소스 UI를 사용하는 경우, dataSource를 dataSources로 변환
|
||||
let finalDataSources = dataSources;
|
||||
if (isMultiDataSourceWidget && element.subtype === "list-v2" && dataSources.length === 0 && dataSource.endpoint) {
|
||||
// 단일 데이터 소스가 설정되어 있으면 dataSources 배열로 변환
|
||||
finalDataSources = [dataSource];
|
||||
}
|
||||
|
||||
// chartConfig 구성 (위젯 타입별로 다르게 처리)
|
||||
let finalChartConfig = { ...chartConfig };
|
||||
|
||||
if (isMultiDataSourceWidget) {
|
||||
finalChartConfig = {
|
||||
...finalChartConfig,
|
||||
dataSources: dataSources,
|
||||
dataSources: finalDataSources,
|
||||
};
|
||||
}
|
||||
|
||||
@@ -325,7 +332,7 @@ export function WidgetConfigSidebar({ element, isOpen, onClose, onApply }: Widge
|
||||
// 다중 데이터 소스 위젯은 dataSources도 포함 (빈 배열도 허용 - 연결 해제)
|
||||
...(isMultiDataSourceWidget
|
||||
? {
|
||||
dataSources: dataSources,
|
||||
dataSources: finalDataSources,
|
||||
}
|
||||
: {}),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user