dashboardService->getStats(); return $this->success('dashboard.stats_loaded', $stats); } catch (\Exception $e) { return $this->error('dashboard.stats_failed', 500, $e->getMessage()); } } /** * 시스템 리소스 사용량을 조회합니다. * * CPU, 메모리, 디스크 사용량 정보를 반환합니다. * * @return JsonResponse 리소스 사용량을 포함한 JSON 응답 */ public function resources(): JsonResponse { try { $resources = $this->dashboardService->getSystemResources(); return $this->success('dashboard.resources_loaded', $resources); } catch (\Exception $e) { return $this->error('dashboard.resources_failed', 500, $e->getMessage()); } } /** * 최근 활동 내역을 조회합니다. * * 최근 사용자 등록, 모듈 활성화 등의 활동 내역을 반환합니다. * * @return JsonResponse 활동 내역을 포함한 JSON 응답 */ public function activities(): JsonResponse { try { $activities = $this->dashboardService->getRecentActivities(); return $this->success('dashboard.activities_loaded', $activities); } catch (\Exception $e) { return $this->error('dashboard.activities_failed', 500, $e->getMessage()); } } /** * 시스템 알림을 조회합니다. * * 시스템 업데이트, 경고 등의 알림을 반환합니다. * * @return JsonResponse 알림 목록을 포함한 JSON 응답 */ public function alerts(): JsonResponse { try { $alerts = $this->dashboardService->getSystemAlerts(); return $this->success('dashboard.alerts_loaded', $alerts); } catch (\Exception $e) { return $this->error('dashboard.alerts_failed', 500, $e->getMessage()); } } /** * 최근 발송된 알림 이력을 조회합니다. * * 대시보드 "최근 알림" 카드에 표시할 최근 알림 발송 이력을 반환합니다. * * @return JsonResponse 최근 알림 이력을 포함한 JSON 응답 */ public function recentNotifications(): JsonResponse { try { $notifications = $this->dashboardService->getRecentNotificationLogs(); return $this->success('dashboard.recent_notifications_loaded', $notifications); } catch (\Exception $e) { return $this->error('dashboard.recent_notifications_failed', 500, $e->getMessage()); } } }