diff --git a/frontend/components/admin/dashboard/widgets/custom-metric/CustomMetricConfigSidebar.tsx b/frontend/components/admin/dashboard/widgets/custom-metric/CustomMetricConfigSidebar.tsx index c08fd501..0a1dd39b 100644 --- a/frontend/components/admin/dashboard/widgets/custom-metric/CustomMetricConfigSidebar.tsx +++ b/frontend/components/admin/dashboard/widgets/custom-metric/CustomMetricConfigSidebar.tsx @@ -35,6 +35,8 @@ export default function CustomMetricConfigSidebar({ ); const [draggedIndex, setDraggedIndex] = useState(null); const [dragOverIndex, setDragOverIndex] = useState(null); + const [customTitle, setCustomTitle] = useState(element.customTitle || element.title || ""); + const [showHeader, setShowHeader] = useState(element.showHeader !== false); // 쿼리 실행 결과 처리 const handleQueryTest = (result: any) => { @@ -136,6 +138,8 @@ export default function CustomMetricConfigSidebar({ // 저장 const handleSave = () => { onApply({ + customTitle: customTitle, + showHeader: showHeader, customMetricConfig: { metrics, }, @@ -170,31 +174,64 @@ export default function CustomMetricConfigSidebar({ {/* 본문: 스크롤 가능 영역 */}
+ {/* 헤더 설정 */} +
+
헤더 설정
+
+ {/* 제목 입력 */} +
+ + setCustomTitle(e.target.value)} + placeholder="위젯 제목을 입력하세요" + className="h-8 text-xs" + style={{ fontSize: "12px" }} + /> +
+ + {/* 헤더 표시 여부 */} +
+ + +
+
+
+ {/* 데이터 소스 타입 선택 */}
데이터 소스 타입