feat: Implement smart factory log functionality

- Added a new controller for managing smart factory logs, including retrieval and statistics endpoints.
- Integrated smart factory log migration to set up the necessary database structure.
- Enhanced the authentication controller to include user name in log submissions.
- Developed a frontend page for displaying and filtering smart factory logs, accessible only to super admins.
- Implemented API calls for fetching logs and statistics, improving data visibility and management.

These changes aim to provide comprehensive logging capabilities for smart factory activities, enhancing monitoring and analysis for administrators.
This commit is contained in:
kjs
2026-04-07 10:35:16 +09:00
parent c48dd95045
commit 822f9ac35a
9 changed files with 895 additions and 7 deletions

View File

@@ -32,6 +32,10 @@ import {
setUserLocale,
getTableSchema, // 테이블 스키마 조회
} from "../controllers/adminController";
import {
getSmartFactoryLogs,
getSmartFactoryLogStats,
} from "../controllers/smartFactoryLogController";
import { authenticateToken } from "../middleware/authMiddleware";
import { requireSuperAdmin } from "../middleware/permissionMiddleware";
@@ -84,4 +88,8 @@ router.post("/user-locale", setUserLocale);
// 테이블 스키마 API (엑셀 업로드 컬럼 매핑용)
router.get("/tables/:tableName/schema", getTableSchema);
// 스마트공장 활용 로그 API (최고관리자 전용)
router.get("/smart-factory-log", requireSuperAdmin, getSmartFactoryLogs);
router.get("/smart-factory-log/stats", requireSuperAdmin, getSmartFactoryLogStats);
export default router;