lhj #48

Merged
hjlee merged 6 commits from lhj into dev 2025-09-23 12:37:30 +09:00
3 changed files with 39 additions and 32 deletions
Showing only changes of commit 3083ffc0a3 - Show all commits

View File

@ -5,13 +5,13 @@ import Link from "next/link";
*/
export default function AdminPage() {
return (
<div className="space-y-6">
<div className="min-h-screen bg-gradient-to-br from-slate-50 to-blue-50/30 p-8 space-y-8">
{/* 관리자 기능 카드들 */}
<div className="grid gap-6 md:grid-cols-2 lg:grid-cols-3">
<div className="mx-auto max-w-7xl grid gap-6 md:grid-cols-2 lg:grid-cols-3">
<Link href="/admin/userMng" className="block">
<div className="rounded-lg border bg-white p-6 shadow-sm transition-colors hover:bg-gray-50">
<div className="flex items-center gap-4">
<div className="flex h-12 w-12 items-center justify-center rounded-lg bg-blue-50">
<div className="flex h-12 w-12 items-center justify-center rounded-lg bg-gradient-to-br from-blue-200 to-blue-300">
<Users className="h-6 w-6 text-blue-600" />
</div>
<div>
@ -24,8 +24,8 @@ export default function AdminPage() {
<div className="rounded-lg border bg-white p-6 shadow-sm">
<div className="flex items-center gap-4">
<div className="flex h-12 w-12 items-center justify-center rounded-lg bg-green-50">
<Shield className="h-6 w-6 text-green-600" />
<div className="flex h-12 w-12 items-center justify-center rounded-lg bg-gradient-to-br from-emerald-200 to-emerald-300">
<Shield className="h-6 w-6 text-emerald-600" />
</div>
<div>
<h3 className="font-semibold text-gray-900"> </h3>
@ -36,8 +36,8 @@ export default function AdminPage() {
<div className="rounded-lg border bg-white p-6 shadow-sm">
<div className="flex items-center gap-4">
<div className="flex h-12 w-12 items-center justify-center rounded-lg bg-purple-50">
<Settings className="h-6 w-6 text-purple-600" />
<div className="flex h-12 w-12 items-center justify-center rounded-lg bg-gradient-to-br from-violet-200 to-violet-300">
<Settings className="h-6 w-6 text-violet-600" />
</div>
<div>
<h3 className="font-semibold text-gray-900"> </h3>
@ -48,8 +48,8 @@ export default function AdminPage() {
<div className="rounded-lg border bg-white p-6 shadow-sm">
<div className="flex items-center gap-4">
<div className="flex h-12 w-12 items-center justify-center rounded-lg bg-orange-50">
<BarChart3 className="h-6 w-6 text-orange-600" />
<div className="flex h-12 w-12 items-center justify-center rounded-lg bg-gradient-to-br from-amber-200 to-amber-300">
<BarChart3 className="h-6 w-6 text-amber-600" />
</div>
<div>
<h3 className="font-semibold text-gray-900"> </h3>
@ -61,7 +61,7 @@ export default function AdminPage() {
<Link href="/admin/screenMng" className="block">
<div className="rounded-lg border bg-white p-6 shadow-sm transition-colors hover:bg-gray-50">
<div className="flex items-center gap-4">
<div className="flex h-12 w-12 items-center justify-center rounded-lg bg-indigo-50">
<div className="flex h-12 w-12 items-center justify-center rounded-lg bg-gradient-to-br from-indigo-200 to-indigo-300">
<Palette className="h-6 w-6 text-indigo-600" />
</div>
<div>
@ -74,14 +74,14 @@ export default function AdminPage() {
</div>
{/* 표준 관리 섹션 */}
<div className="space-y-4">
<div className="mx-auto max-w-7xl space-y-4">
<h2 className="text-xl font-semibold text-gray-900"> </h2>
<div className="grid gap-6 md:grid-cols-2 lg:grid-cols-4">
<Link href="/admin/standards" className="block">
<div className="rounded-lg border bg-white p-6 shadow-sm transition-colors hover:bg-gray-50">
<div className="flex items-center gap-4">
<div className="flex h-12 w-12 items-center justify-center rounded-lg bg-teal-50">
<Database className="h-6 w-6 text-teal-600" />
<div className="flex h-12 w-12 items-center justify-center rounded-lg bg-gradient-to-br from-teal-200 to-teal-300">
<Database className="h-6 w-6 text-teal-600" />
</div>
<div>
<h3 className="font-semibold text-gray-900"> </h3>
@ -94,8 +94,8 @@ export default function AdminPage() {
<Link href="/admin/templates" className="block">
<div className="rounded-lg border bg-white p-6 shadow-sm transition-colors hover:bg-gray-50">
<div className="flex items-center gap-4">
<div className="flex h-12 w-12 items-center justify-center rounded-lg bg-emerald-50">
<Layout className="h-6 w-6 text-emerald-600" />
<div className="flex h-12 w-12 items-center justify-center rounded-lg bg-gradient-to-br from-emerald-200 to-emerald-300">
<Layout className="h-6 w-6 text-emerald-600" />
</div>
<div>
<h3 className="font-semibold text-gray-900">릿 </h3>
@ -108,8 +108,8 @@ export default function AdminPage() {
<Link href="/admin/tableMng" className="block">
<div className="rounded-lg border bg-white p-6 shadow-sm transition-colors hover:bg-gray-50">
<div className="flex items-center gap-4">
<div className="flex h-12 w-12 items-center justify-center rounded-lg bg-cyan-50">
<Database className="h-6 w-6 text-cyan-600" />
<div className="flex h-12 w-12 items-center justify-center rounded-lg bg-gradient-to-br from-cyan-200 to-cyan-300">
<Database className="h-6 w-6 text-cyan-600" />
</div>
<div>
<h3 className="font-semibold text-gray-900"> </h3>
@ -122,8 +122,8 @@ export default function AdminPage() {
<Link href="/admin/components" className="block">
<div className="rounded-lg border bg-white p-6 shadow-sm transition-colors hover:bg-gray-50">
<div className="flex items-center gap-4">
<div className="flex h-12 w-12 items-center justify-center rounded-lg bg-violet-50">
<Package className="h-6 w-6 text-violet-600" />
<div className="flex h-12 w-12 items-center justify-center rounded-lg bg-gradient-to-br from-violet-200 to-violet-300">
<Package className="h-6 w-6 text-violet-600" />
</div>
<div>
<h3 className="font-semibold text-gray-900"> </h3>

View File

@ -211,18 +211,17 @@ export const ExternalDbConnectionModal: React.FC<ExternalDbConnectionModalProps>
setTestingConnection(true);
setTestResult(null);
const testData: ConnectionTestRequest = {
db_type: formData.db_type,
host: formData.host,
port: formData.port,
database_name: formData.database_name,
username: formData.username,
password: formData.password,
connection_timeout: formData.connection_timeout,
ssl_enabled: formData.ssl_enabled,
};
// 편집 모드일 때만 연결 테스트 실행
if (!isEditMode || !connection?.id) {
toast({
title: "연결 테스트 불가",
description: "연결을 먼저 저장한 후 테스트할 수 있습니다.",
variant: "destructive",
});
return;
}
const result = await ExternalDbConnectionAPI.testConnection(testData);
const result = await ExternalDbConnectionAPI.testConnection(connection.id);
setTestResult(result);
if (result.success) {

View File

@ -307,7 +307,11 @@ function AppLayoutInner({ children }: AppLayoutProps) {
<div key={menu.id}>
<div
className={`group flex cursor-pointer items-center justify-between rounded-lg px-3 py-2 text-sm font-medium transition-colors hover:cursor-pointer ${
isExpanded ? "bg-slate-100 text-slate-900" : "text-slate-600 hover:bg-slate-50 hover:text-slate-900"
pathname === menu.url
? "bg-gradient-to-br from-slate-100 to-blue-100/40 text-slate-900 border-l-4 border-blue-500"
: isExpanded
? "bg-slate-100 text-slate-900"
: "text-slate-600 hover:bg-slate-50 hover:text-slate-900"
} ${level > 0 ? "ml-6" : ""}`}
onClick={() => handleMenuClick(menu)}
>
@ -328,7 +332,11 @@ function AppLayoutInner({ children }: AppLayoutProps) {
{menu.children?.map((child: any) => (
<div
key={child.id}
className="flex cursor-pointer items-center rounded-lg px-3 py-2 text-sm text-slate-600 transition-colors hover:cursor-pointer hover:bg-slate-50 hover:text-slate-900"
className={`flex cursor-pointer items-center rounded-lg px-3 py-2 text-sm transition-colors hover:cursor-pointer ${
pathname === child.url
? "bg-gradient-to-br from-slate-100 to-blue-100/40 text-slate-900 border-l-4 border-blue-500"
: "text-slate-600 hover:bg-slate-50 hover:text-slate-900"
}`}
onClick={() => handleMenuClick(child)}
>
{child.icon}