From 9307603e42646e159dec65a8d209a2387b298579 Mon Sep 17 00:00:00 2001 From: "choi.jh" Date: Thu, 13 Nov 2025 14:30:12 +0900 Subject: [PATCH] trafficmonitor init...1 --- app/Config/Routes.php | 2 +- app/Controllers/Admin/TrafficController.php | 6 +- app/Views/admin/traffic/dashboard.php | 78 ++++++--------------- 3 files changed, 26 insertions(+), 60 deletions(-) diff --git a/app/Config/Routes.php b/app/Config/Routes.php index 7612846..3f87761 100644 --- a/app/Config/Routes.php +++ b/app/Config/Routes.php @@ -53,7 +53,7 @@ $routes->group('admin', ['namespace' => 'App\Controllers\Admin', 'filter' => 'au $routes->post('batchjob_delete', 'TrafficController::batchjob_delete'); $routes->get('download/(:alpha)', 'TrafficController::download/$1'); $routes->get('dashboard', 'TrafficController::dashboard'); - $routes->post('data', 'TrafficController::getAggregatedData'); + $routes->get('data', 'TrafficController::getAggregatedData'); }); $routes->group('collector', ['namespace' => 'App\Controllers\Admin'], function ($routes) { $routes->get('/', 'CollectorController::index'); diff --git a/app/Controllers/Admin/TrafficController.php b/app/Controllers/Admin/TrafficController.php index b535be3..9384d67 100644 --- a/app/Controllers/Admin/TrafficController.php +++ b/app/Controllers/Admin/TrafficController.php @@ -84,13 +84,13 @@ class TrafficController extends AdminController */ public function getAggregatedData(): ResponseInterface { - $uid = $this->request->getPost('uid'); + $uid = $this->request->getVar('uid'); $entity = $this->service->getEntity($uid); if (!$entity instanceof TrafficEntity) { throw new \Exception(__METHOD__ . "에서 오류발생:{$uid}에 해당하는 트래픽정보를 찾을수없습니다."); } - $startDate = $this->request->getPost('startDate'); - $endDate = $this->request->getPost('endDate'); + $startDate = $this->request->getVar('startDate'); + $endDate = $this->request->getVar('endDate'); // 입력값 검증 (실제 프로덕션에서는 반드시 수행해야 함) if (empty($startDate) || empty($endDate)) { return $this->response->setStatusCode(400)->setJSON([ diff --git a/app/Views/admin/traffic/dashboard.php b/app/Views/admin/traffic/dashboard.php index d00ef70..66e6c47 100644 --- a/app/Views/admin/traffic/dashboard.php +++ b/app/Views/admin/traffic/dashboard.php @@ -34,15 +34,6 @@ box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important; } - .aggregation-button.active { - background-color: var(--bs-primary); - color: white; - } - - .aggregation-button { - transition: background-color 0.2s, box-shadow 0.2s; - } - .chart-container { position: relative; height: 400px; @@ -56,7 +47,7 @@

-

기간 및 집계 기준을 선택하여 트래픽 추이를 확인하세요.

+

기간을 선택하여 트래픽 추이를 확인하세요.

@@ -75,17 +66,6 @@
- - -
- -
- - - - -
-