Db와 rest api 같이 구현

This commit is contained in:
dohyeons 2025-11-20 14:34:17 +09:00
parent 461338618e
commit 751a5da119
1 changed files with 10 additions and 7 deletions

View File

@ -199,14 +199,14 @@ export default function MultiDatabaseConfig({ dataSource, onChange, onTestResult
onValueChange={(value: "current" | "external") => onChange({ connectionType: value })}
>
<div className="flex items-center space-x-2">
<RadioGroupItem value="current" id={"current-${dataSource.id}"} />
<Label htmlFor={"current-${dataSource.id}"} className="text-xs font-normal">
<RadioGroupItem value="current" id={`current-${dataSource.id}`} />
<Label htmlFor={`current-${dataSource.id}`} className="text-xs font-normal">
</Label>
</div>
<div className="flex items-center space-x-2">
<RadioGroupItem value="external" id={"external-${dataSource.id}"} />
<Label htmlFor={"external-${dataSource.id}"} className="text-xs font-normal">
<RadioGroupItem value="external" id={`external-${dataSource.id}`} />
<Label htmlFor={`external-${dataSource.id}`} className="text-xs font-normal">
</Label>
</div>
@ -216,7 +216,7 @@ export default function MultiDatabaseConfig({ dataSource, onChange, onTestResult
{/* 외부 DB 선택 */}
{dataSource.connectionType === "external" && (
<div className="space-y-2">
<Label htmlFor={"external-conn-${dataSource.id}"} className="text-xs">
<Label htmlFor={`external-conn-${dataSource.id}`} className="text-xs">
*
</Label>
{loadingConnections ? (
@ -246,7 +246,7 @@ export default function MultiDatabaseConfig({ dataSource, onChange, onTestResult
{/* SQL 쿼리 */}
<div className="space-y-2">
<div className="flex items-center justify-between">
<Label htmlFor={"query-${dataSource.id}"} className="text-xs">
<Label htmlFor={`query-${dataSource.id}`} className="text-xs">
SQL *
</Label>
<Select
@ -313,7 +313,7 @@ ORDER BY 하위부서수 DESC`,
</Select>
</div>
<Textarea
id={"query-${dataSource.id}"}
id={`query-${dataSource.id}`}
value={dataSource.query || ""}
onChange={(e) => onChange({ query: e.target.value })}
placeholder="SELECT * FROM table_name WHERE ..."
@ -340,6 +340,9 @@ ORDER BY 하위부서수 DESC`,
<SelectItem value="arrow" className="text-xs">
</SelectItem>
<SelectItem value="truck" className="text-xs">
</SelectItem>
</SelectContent>
</Select>
<p className="text-muted-foreground text-[10px]"> </p>