diff --git a/app/Controllers/ErrorLogController.php b/app/Controllers/ErrorLogController.php index 0758f70..371f988 100644 --- a/app/Controllers/ErrorLogController.php +++ b/app/Controllers/ErrorLogController.php @@ -41,7 +41,7 @@ class ErrorLogController extends Controller $errors = $this->errorLogModel->getPaginatedErrors($filters, $perPage, $offset); // Get statistics using model - $stats = $this->errorLogModel->getAdminStats(); + $errorStats = $this->errorLogModel->getAdminStats(); // Pagination data $totalPages = ceil($totalErrors / $perPage); @@ -54,7 +54,7 @@ class ErrorLogController extends Controller 'showing_to' => min($offset + $perPage, $totalErrors) ]; - $this->view('errors/admin-index', compact('errors', 'stats', 'filters', 'pagination')); + $this->view('errors/admin-index', compact('errors', 'errorStats', 'filters', 'pagination')); } /** diff --git a/app/Controllers/TldRegistryController.php b/app/Controllers/TldRegistryController.php index b2de78d..73b74fc 100644 --- a/app/Controllers/TldRegistryController.php +++ b/app/Controllers/TldRegistryController.php @@ -37,12 +37,12 @@ class TldRegistryController extends Controller $order = $_GET['order'] ?? 'asc'; $result = $this->tldModel->getPaginated($page, $perPage, $search, $sort, $order, $status, $dataType); - $stats = $this->tldModel->getStatistics(); + $tldStats = $this->tldModel->getStatistics(); $this->view('tld-registry/index', [ 'tlds' => $result['tlds'], 'pagination' => $result['pagination'], - 'stats' => $stats, + 'tldStats' => $tldStats, 'filters' => [ 'search' => $search, 'status' => $status, @@ -584,7 +584,7 @@ class TldRegistryController extends Controller $this->view('tld-registry/import-logs', [ 'imports' => $result['logs'], 'pagination' => $result['pagination'], - 'stats' => $importStats, + 'importStats' => $importStats, 'title' => 'TLD Import Logs' ]); } diff --git a/app/Views/dashboard/index.php b/app/Views/dashboard/index.php index 8f1871f..a27f897 100644 --- a/app/Views/dashboard/index.php +++ b/app/Views/dashboard/index.php @@ -4,9 +4,9 @@ $pageTitle = 'Dashboard Overview'; $pageDescription = 'Monitor your domains and expiration dates'; $pageIcon = 'fas fa-chart-line'; -// Get stats for dashboard (if not already set by base.php) -if (!isset($stats)) { - $stats = \App\Helpers\LayoutHelper::getDomainStats(); +// Get domain stats for dashboard (if not already set by base.php) +if (!isset($domainStats)) { + $domainStats = \App\Helpers\LayoutHelper::getDomainStats(); } ob_start(); @@ -19,7 +19,7 @@ ob_start();
Total Domains
-= $stats['total'] ?? 0 ?>
+= $domainStats['total'] ?? 0 ?>
Active
-= $stats['active'] ?? 0 ?>
+= $domainStats['active'] ?? 0 ?>
Expiring Soon
-= $stats['expiring_soon'] ?? 0 ?>
-within = $stats['expiring_threshold'] ?? 30 ?> days
+= $domainStats['expiring_soon'] ?? 0 ?>
+within = $domainStats['expiring_threshold'] ?? 30 ?> days
Inactive
-= $stats['inactive'] ?? 0 ?>
+= $domainStats['inactive'] ?? 0 ?>
No domains expiring soon
-within = $stats['expiring_threshold'] ?? 30 ?> days
+within = $domainStats['expiring_threshold'] ?? 30 ?> days
Total Errors
-= $stats['total_errors'] ?? 0 ?>
+= $errorStats['total_errors'] ?? 0 ?>
Unresolved
-= $stats['unresolved'] ?? 0 ?>
+= $errorStats['unresolved'] ?? 0 ?>
Last 24h
-= $stats['last_24h'] ?? 0 ?>
+= $errorStats['last_24h'] ?? 0 ?>
Occurrences
-= $stats['total_occurrences'] ?? 0 ?>
+= $errorStats['total_occurrences'] ?? 0 ?>
Total Imports
-= $stats['total_imports'] ?? 0 ?>
+= $importStats['total_imports'] ?? 0 ?>
Successful
-= $stats['successful_imports'] ?? 0 ?>
+= $importStats['successful_imports'] ?? 0 ?>
Failed
-= $stats['failed_imports'] ?? 0 ?>
+= $importStats['failed_imports'] ?? 0 ?>
Last Import
- - = date('M j, H:i', strtotime($stats['last_import'])) ?> + + = date('M j, H:i', strtotime($importStats['last_import'])) ?> Never diff --git a/app/Views/tld-registry/index.php b/app/Views/tld-registry/index.php index 33d8f7f..b5c4a3a 100644 --- a/app/Views/tld-registry/index.php +++ b/app/Views/tld-registry/index.php @@ -37,7 +37,7 @@ $currentFilters = $filters ?? ['search' => '', 'sort' => 'tld', 'order' => 'asc'