대시보드 관리 수정

This commit is contained in:
dohyeons
2025-10-30 18:05:45 +09:00
parent 95dc16160e
commit 5d1d11869c
5 changed files with 255 additions and 166 deletions

View File

@@ -52,7 +52,7 @@ export function DatabaseConfig({ dataSource, onChange }: DatabaseConfigProps) {
<div className="space-y-3">
{/* 현재 DB vs 외부 DB 선택 */}
<div>
<Label className="mb-2 block text-xs font-medium text-foreground"> </Label>
<Label className="text-foreground mb-2 block text-xs font-medium"> </Label>
<div className="flex gap-2">
<button
onClick={() => {
@@ -88,12 +88,12 @@ export function DatabaseConfig({ dataSource, onChange }: DatabaseConfigProps) {
{dataSource.connectionType === "external" && (
<div className="space-y-2">
<div className="flex items-center justify-between">
<Label className="text-xs font-medium text-foreground"> </Label>
<Label className="text-foreground text-xs font-medium"> </Label>
<button
onClick={() => {
router.push("/admin/external-connections");
}}
className="flex items-center gap-1 text-[11px] text-primary transition-colors hover:text-primary"
className="text-primary hover:text-primary flex items-center gap-1 text-[11px] transition-colors"
>
<ExternalLink className="h-3 w-3" />
@@ -102,17 +102,17 @@ export function DatabaseConfig({ dataSource, onChange }: DatabaseConfigProps) {
{loading && (
<div className="flex items-center justify-center py-3">
<div className="h-4 w-4 animate-spin rounded-full border-2 border-border border-t-blue-600" />
<span className="ml-2 text-xs text-foreground"> ...</span>
<div className="border-border h-4 w-4 animate-spin rounded-full border-2 border-t-blue-600" />
<span className="text-foreground ml-2 text-xs"> ...</span>
</div>
)}
{error && (
<div className="rounded bg-destructive/10 px-2 py-1.5">
<div className="text-xs text-destructive">{error}</div>
<div className="bg-destructive/10 rounded px-2 py-1.5">
<div className="text-destructive text-xs">{error}</div>
<button
onClick={loadExternalConnections}
className="mt-1 text-[11px] text-destructive underline hover:no-underline"
className="text-destructive mt-1 text-[11px] underline hover:no-underline"
>
</button>
@@ -120,13 +120,13 @@ export function DatabaseConfig({ dataSource, onChange }: DatabaseConfigProps) {
)}
{!loading && !error && connections.length === 0 && (
<div className="rounded bg-warning/10 px-2 py-2 text-center">
<div className="mb-1 text-xs text-warning"> </div>
<div className="bg-warning/10 rounded px-2 py-2 text-center">
<div className="text-warning mb-1 text-xs"> </div>
<button
onClick={() => {
router.push("/admin/external-connections");
}}
className="text-[11px] text-warning underline hover:no-underline"
className="text-warning text-[11px] underline hover:no-underline"
>
</button>
@@ -149,7 +149,7 @@ export function DatabaseConfig({ dataSource, onChange }: DatabaseConfigProps) {
<SelectItem key={conn.id} value={String(conn.id)} className="text-xs">
<div className="flex items-center gap-1.5">
<span className="font-medium">{conn.connection_name}</span>
<span className="text-[10px] text-muted-foreground">({conn.db_type.toUpperCase()})</span>
<span className="text-muted-foreground text-[10px]">({conn.db_type.toUpperCase()})</span>
</div>
</SelectItem>
))}
@@ -157,7 +157,7 @@ export function DatabaseConfig({ dataSource, onChange }: DatabaseConfigProps) {
</Select>
{selectedConnection && (
<div className="space-y-0.5 rounded bg-muted px-2 py-1.5 text-[11px] text-foreground">
<div className="bg-muted text-foreground space-y-0.5 rounded px-2 py-1.5 text-[11px]">
<div>
<span className="font-medium">:</span> {selectedConnection.connection_name}
</div>