diff --git a/src/Core/Controller/Panel/DashboardController.php b/src/Core/Controller/Panel/DashboardController.php
index c6e2d99..77b4484 100644
--- a/src/Core/Controller/Panel/DashboardController.php
+++ b/src/Core/Controller/Panel/DashboardController.php
@@ -74,6 +74,7 @@ public function configureMenuItems(): iterable
if ($this->isGranted(UserRoleEnum::ROLE_ADMIN->name)) {
yield MenuItem::section($this->translator->trans('pteroca.crud.menu.administration'));
+ yield MenuItem::linkToRoute($this->translator->trans('pteroca.crud.menu.overview'), 'fa fa-gauge', 'admin_overview');
yield MenuItem::linkToCrud($this->translator->trans('pteroca.crud.menu.categories'), 'fa fa-list', Category::class);
yield MenuItem::linkToCrud($this->translator->trans('pteroca.crud.menu.products'), 'fa fa-sliders-h', Product::class);
yield MenuItem::linkToCrud($this->translator->trans('pteroca.crud.menu.payments'), 'fa fa-money', Payment::class);
diff --git a/src/Core/Controller/Panel/OverviewController.php b/src/Core/Controller/Panel/OverviewController.php
new file mode 100644
index 0000000..d89ae66
--- /dev/null
+++ b/src/Core/Controller/Panel/OverviewController.php
@@ -0,0 +1,27 @@
+checkPermission(UserRoleEnum::ROLE_ADMIN->name);
+
+ return $this->render('panel/admin/overview.html.twig', [
+ 'systemInformation' => $systemInformationService->getSystemInformation(),
+ 'statistics' => $adminStatisticsService->getAdminStatistics(),
+ ]);
+ }
+}
\ No newline at end of file
diff --git a/src/Core/Repository/PaymentRepository.php b/src/Core/Repository/PaymentRepository.php
index 68821e1..a9f9878 100644
--- a/src/Core/Repository/PaymentRepository.php
+++ b/src/Core/Repository/PaymentRepository.php
@@ -18,4 +18,23 @@ public function save(Payment $payment): void
$this->getEntityManager()->persist($payment);
$this->getEntityManager()->flush();
}
+
+ public function getPaymentsCreatedAfterCount(\DateTime $date): int
+ {
+ return $this->createQueryBuilder('p')
+ ->select('COUNT(p.id)')
+ ->where('p.createdAt > :date')
+ ->setParameter('date', $date)
+ ->getQuery()
+ ->getSingleScalarResult();
+ }
+
+ public function getLastPayments(int $limit): array
+ {
+ return $this->createQueryBuilder('p')
+ ->orderBy('p.createdAt', 'DESC')
+ ->setMaxResults($limit)
+ ->getQuery()
+ ->getResult();
+ }
}
diff --git a/src/Core/Repository/ServerRepository.php b/src/Core/Repository/ServerRepository.php
index bfee3cc..10e10f0 100644
--- a/src/Core/Repository/ServerRepository.php
+++ b/src/Core/Repository/ServerRepository.php
@@ -37,4 +37,13 @@ public function getServersExpiredBefore(\DateTime $expiresBefore): array
->getQuery()
->getResult();
}
+
+ public function getActiveServersCount(): int
+ {
+ return $this->createQueryBuilder('s')
+ ->select('COUNT(s.id)')
+ ->where('s.isSuspended = false')
+ ->getQuery()
+ ->getSingleScalarResult();
+ }
}
diff --git a/src/Core/Repository/UserRepository.php b/src/Core/Repository/UserRepository.php
index 101766f..0bad434 100644
--- a/src/Core/Repository/UserRepository.php
+++ b/src/Core/Repository/UserRepository.php
@@ -43,4 +43,23 @@ public function save(User $user): void
$this->getEntityManager()->persist($user);
$this->getEntityManager()->flush();
}
+
+ public function getUsersRegisteredAfterCount(\DateTime $date): int
+ {
+ return $this->createQueryBuilder('u')
+ ->select('COUNT(u.id)')
+ ->where('u.createdAt > :date')
+ ->setParameter('date', $date)
+ ->getQuery()
+ ->getSingleScalarResult();
+ }
+
+ public function getLastRegisteredUsers(int $limit): array
+ {
+ return $this->createQueryBuilder('u')
+ ->orderBy('u.createdAt', 'DESC')
+ ->setMaxResults($limit)
+ ->getQuery()
+ ->getResult();
+ }
}
diff --git a/src/Core/Resources/config/services.yaml b/src/Core/Resources/config/services.yaml
index 2fbbea6..bf26c28 100644
--- a/src/Core/Resources/config/services.yaml
+++ b/src/Core/Resources/config/services.yaml
@@ -25,3 +25,7 @@ services:
App\Core\Twig\AppExtension:
tags: [ 'twig.extension' ]
+
+ App\Core\Service\System\SystemInformationService:
+ arguments:
+ $entityManager: '@doctrine.orm.entity_manager'
\ No newline at end of file
diff --git a/src/Core/Resources/translations/messages.cn.yaml b/src/Core/Resources/translations/messages.cn.yaml
index 69ffae5..6e5d05b 100644
--- a/src/Core/Resources/translations/messages.cn.yaml
+++ b/src/Core/Resources/translations/messages.cn.yaml
@@ -297,6 +297,7 @@ pteroca:
phpmyadmin: 'PHPMyAdmin'
payments: '支付'
logs: '日志'
+ overview: '概览'
api:
servers:
@@ -347,3 +348,29 @@ pteroca:
subject: '服务器暂停'
server_suspended: '我们通知您,您的一个服务器已被暂停,因为它未续订。'
extend_server: '要恢复服务器,请在客户面板中续订它。'
+
+ admin:
+ overview:
+ title: '管理员概览'
+ servers: '活跃服务器'
+ users: '注册用户'
+ payments: '支付'
+ last_30_days: '过去30天'
+ now: '现在'
+ links: '重要链接'
+ system: '系统信息'
+ payment_overview: '支付概览'
+ view_all: '查看全部'
+ last_registered_users: '最新注册用户'
+ user: '用户'
+ amount: '金额'
+ currency: '货币'
+ status: '状态'
+ date: '日期'
+ no_payments: '您的系统尚未收到任何支付。'
+ balance: '余额'
+ verified: '已验证'
+ unverified: '未验证'
+ project_site: '项目网站'
+ documentation: '文档'
+ support: '支持'
diff --git a/src/Core/Resources/translations/messages.de.yaml b/src/Core/Resources/translations/messages.de.yaml
index f21166c..c0e060d 100644
--- a/src/Core/Resources/translations/messages.de.yaml
+++ b/src/Core/Resources/translations/messages.de.yaml
@@ -297,6 +297,7 @@ pteroca:
phpmyadmin: 'PHPMyAdmin'
payments: 'Zahlungen'
logs: 'Logs'
+ overview: 'Übersicht'
api:
servers:
@@ -347,3 +348,29 @@ pteroca:
subject: 'Serversperrung'
server_suspended: 'Wir informieren Sie, dass einer Ihrer Server gesperrt wurde, da er nicht verlängert wurde.'
extend_server: 'Um den Server wiederherzustellen, verlängern Sie ihn im Kundenbereich.'
+
+ admin:
+ overview:
+ title: 'Admin Übersicht'
+ servers: 'Aktive Server'
+ users: 'Registrierte Benutzer'
+ payments: 'Zahlungen'
+ last_30_days: 'Letzte 30 Tage'
+ now: 'Jetzt'
+ links: 'Wichtige Links'
+ system: 'Systeminformationen'
+ payment_overview: 'Zahlungsübersicht'
+ view_all: 'Alle anzeigen'
+ last_registered_users: 'Zuletzt registrierte Benutzer'
+ user: 'Benutzer'
+ amount: 'Betrag'
+ currency: 'Währung'
+ status: 'Status'
+ date: 'Datum'
+ no_payments: 'Ihr System hat bisher keine Zahlungen erhalten.'
+ balance: 'Kontostand'
+ verified: 'Verifiziert'
+ unverified: 'Nicht verifiziert'
+ project_site: 'Projektseite'
+ documentation: 'Dokumentation'
+ support: 'Support'
\ No newline at end of file
diff --git a/src/Core/Resources/translations/messages.en.yaml b/src/Core/Resources/translations/messages.en.yaml
index 5a10ba6..a8ac010 100644
--- a/src/Core/Resources/translations/messages.en.yaml
+++ b/src/Core/Resources/translations/messages.en.yaml
@@ -297,6 +297,7 @@ pteroca:
phpmyadmin: 'PHPMyAdmin'
payments: 'Payments'
logs: 'Logs'
+ overview: 'Overview'
api:
servers:
@@ -347,3 +348,29 @@ pteroca:
subject: 'Server Suspension'
server_suspended: 'We inform you that one of your servers has been suspended because it has not been renewed.'
extend_server: 'To restore the server, renew it in the client panel.'
+
+ admin:
+ overview:
+ title: 'Admin Overview'
+ servers: 'Active Servers'
+ users: 'Registered Users'
+ payments: 'Payments'
+ last_30_days: 'Last 30 days'
+ now: 'Now'
+ links: 'Important links'
+ system: 'System Information'
+ payment_overview: 'Payment Overview'
+ view_all: 'View all'
+ last_registered_users: 'Last registered users'
+ user: 'User'
+ amount: 'Amount'
+ currency: 'Currency'
+ status: 'Status'
+ date: 'Date'
+ no_payments: 'Your system has not received any payments yet.'
+ balance: 'Balance'
+ verified: 'Verified'
+ unverified: 'Unverified'
+ project_site: 'Project site'
+ documentation: 'Documentation'
+ support: 'Support'
\ No newline at end of file
diff --git a/src/Core/Resources/translations/messages.es.yaml b/src/Core/Resources/translations/messages.es.yaml
index 19bef4e..2167650 100644
--- a/src/Core/Resources/translations/messages.es.yaml
+++ b/src/Core/Resources/translations/messages.es.yaml
@@ -297,6 +297,7 @@ pteroca:
phpmyadmin: 'PHPMyAdmin'
payments: 'Pagos'
logs: 'Registros'
+ overview: 'Resumen'
api:
servers:
@@ -347,3 +348,29 @@ pteroca:
subject: 'Suspensión del servidor'
server_suspended: 'Te informamos que uno de tus servidores ha sido suspendido porque no fue renovado.'
extend_server: 'Para restaurar el servidor, renueva tu suscripción en el panel de cliente.'
+
+ admin:
+ overview:
+ title: 'Resumen de Administración'
+ servers: 'Servidores Activos'
+ users: 'Usuarios Registrados'
+ payments: 'Pagos'
+ last_30_days: 'Últimos 30 días'
+ now: 'Ahora'
+ links: 'Enlaces Importantes'
+ system: 'Información del Sistema'
+ payment_overview: 'Resumen de Pagos'
+ view_all: 'Ver todo'
+ last_registered_users: 'Últimos usuarios registrados'
+ user: 'Usuario'
+ amount: 'Cantidad'
+ currency: 'Moneda'
+ status: 'Estado'
+ date: 'Fecha'
+ no_payments: 'Tu sistema no ha recibido ningún pago aún.'
+ balance: 'Saldo'
+ verified: 'Verificado'
+ unverified: 'No Verificado'
+ project_site: 'Sitio del proyecto'
+ documentation: 'Documentación'
+ support: 'Soporte'
\ No newline at end of file
diff --git a/src/Core/Resources/translations/messages.fr.yaml b/src/Core/Resources/translations/messages.fr.yaml
index f4db184..2bf1cec 100644
--- a/src/Core/Resources/translations/messages.fr.yaml
+++ b/src/Core/Resources/translations/messages.fr.yaml
@@ -297,6 +297,7 @@ pteroca:
phpmyadmin: 'PHPMyAdmin'
payments: 'Paiements'
logs: 'Journaux'
+ overview: 'Vue d’ensemble'
api:
servers:
@@ -347,3 +348,29 @@ pteroca:
subject: 'Suspension de serveur'
server_suspended: 'Nous vous informons qu’un de vos serveurs a été suspendu, car il n’a pas été renouvelé.'
extend_server: 'Pour restaurer le serveur, prolongez-le depuis le panneau client.'
+
+ admin:
+ overview:
+ title: 'Vue d’ensemble Admin'
+ servers: 'Serveurs Actifs'
+ users: 'Utilisateurs Enregistrés'
+ payments: 'Paiements'
+ last_30_days: '30 derniers jours'
+ now: 'Maintenant'
+ links: 'Liens Importants'
+ system: 'Informations Système'
+ payment_overview: 'Vue d’ensemble des Paiements'
+ view_all: 'Voir tout'
+ last_registered_users: 'Derniers utilisateurs enregistrés'
+ user: 'Utilisateur'
+ amount: 'Montant'
+ currency: 'Devise'
+ status: 'Statut'
+ date: 'Date'
+ no_payments: 'Votre système n’a encore reçu aucun paiement.'
+ balance: 'Solde'
+ verified: 'Vérifié'
+ unverified: 'Non Vérifié'
+ project_site: 'Site du projet'
+ documentation: 'Documentation'
+ support: 'Support'
diff --git a/src/Core/Resources/translations/messages.it.yaml b/src/Core/Resources/translations/messages.it.yaml
index f020a67..302426e 100644
--- a/src/Core/Resources/translations/messages.it.yaml
+++ b/src/Core/Resources/translations/messages.it.yaml
@@ -297,6 +297,7 @@ pteroca:
phpmyadmin: 'PHPMyAdmin'
payments: 'Pagamenti'
logs: 'Registri'
+ overview: 'Panoramica'
api:
servers:
@@ -347,3 +348,29 @@ pteroca:
subject: 'Sospensione server'
server_suspended: 'Ti informiamo che uno dei tuoi server è stato sospeso perché non è stato rinnovato.'
extend_server: 'Per ripristinare il server, rinnova nel pannello clienti.'
+
+ admin:
+ overview:
+ title: 'Panoramica Amministratore'
+ servers: 'Server Attivi'
+ users: 'Utenti Registrati'
+ payments: 'Pagamenti'
+ last_30_days: 'Ultimi 30 giorni'
+ now: 'Adesso'
+ links: 'Link Importanti'
+ system: 'Informazioni di Sistema'
+ payment_overview: 'Panoramica dei Pagamenti'
+ view_all: 'Vedi tutto'
+ last_registered_users: 'Ultimi utenti registrati'
+ user: 'Utente'
+ amount: 'Importo'
+ currency: 'Valuta'
+ status: 'Stato'
+ date: 'Data'
+ no_payments: 'Il tuo sistema non ha ancora ricevuto alcun pagamento.'
+ balance: 'Saldo'
+ verified: 'Verificato'
+ unverified: 'Non verificato'
+ project_site: 'Sito del progetto'
+ documentation: 'Documentazione'
+ support: 'Supporto'
diff --git a/src/Core/Resources/translations/messages.pl.yaml b/src/Core/Resources/translations/messages.pl.yaml
index 1447242..d9c0bbc 100644
--- a/src/Core/Resources/translations/messages.pl.yaml
+++ b/src/Core/Resources/translations/messages.pl.yaml
@@ -297,6 +297,7 @@ pteroca:
phpmyadmin: 'PHPMyAdmin'
payments: 'Płatności'
logs: 'Logi'
+ overview: 'Przegląd'
api:
servers:
@@ -347,3 +348,29 @@ pteroca:
subject: 'Zawieszenie serwera'
server_suspended: 'Informujemy, że jeden z Twoich serwer został zawieszony, ponieważ nie został przedłużony.'
extend_server: 'Aby przywrócić serwer, przedłuż go w panelu klienta.'
+
+ admin:
+ overview:
+ title: 'Przegląd Administracyjny'
+ servers: 'Aktywne Serwery'
+ users: 'Zarejestrowani Użytkownicy'
+ payments: 'Płatności'
+ last_30_days: 'Ostatnie 30 dni'
+ now: 'Teraz'
+ links: 'Ważne Linki'
+ system: 'Informacje o Systemie'
+ payment_overview: 'Przegląd Płatności'
+ view_all: 'Zobacz wszystko'
+ last_registered_users: 'Ostatnio zarejestrowani użytkownicy'
+ user: 'Użytkownik'
+ amount: 'Kwota'
+ currency: 'Waluta'
+ status: 'Status'
+ date: 'Data'
+ no_payments: 'Twój system nie otrzymał jeszcze żadnych płatności.'
+ balance: 'Saldo'
+ verified: 'Zweryfikowany'
+ unverified: 'Niezweryfikowany'
+ project_site: 'Strona projektu'
+ documentation: 'Dokumentacja'
+ support: 'Wsparcie'
diff --git a/src/Core/Resources/translations/messages.pt.yaml b/src/Core/Resources/translations/messages.pt.yaml
index b34a501..2bdc645 100644
--- a/src/Core/Resources/translations/messages.pt.yaml
+++ b/src/Core/Resources/translations/messages.pt.yaml
@@ -297,6 +297,7 @@ pteroca:
phpmyadmin: 'PHPMyAdmin'
payments: 'Pagamentos'
logs: 'Registros'
+ overview: 'Visão Geral'
api:
servers:
@@ -347,3 +348,29 @@ pteroca:
subject: 'Suspensão de servidor'
server_suspended: 'Informamos que um de seus servidores foi suspenso por não ter sido renovado.'
extend_server: 'Para restaurar o servidor, renove-o no painel do cliente.'
+
+ admin:
+ overview:
+ title: 'Visão Geral do Admin'
+ servers: 'Servidores Ativos'
+ users: 'Usuários Registrados'
+ payments: 'Pagamentos'
+ last_30_days: 'Últimos 30 dias'
+ now: 'Agora'
+ links: 'Links Importantes'
+ system: 'Informações do Sistema'
+ payment_overview: 'Visão Geral dos Pagamentos'
+ view_all: 'Ver tudo'
+ last_registered_users: 'Últimos usuários registrados'
+ user: 'Usuário'
+ amount: 'Valor'
+ currency: 'Moeda'
+ status: 'Status'
+ date: 'Data'
+ no_payments: 'Seu sistema ainda não recebeu nenhum pagamento.'
+ balance: 'Saldo'
+ verified: 'Verificado'
+ unverified: 'Não Verificado'
+ project_site: 'Site do Projeto'
+ documentation: 'Documentação'
+ support: 'Suporte'
\ No newline at end of file
diff --git a/src/Core/Resources/translations/messages.ua.yaml b/src/Core/Resources/translations/messages.ua.yaml
index 5273847..1c11b9a 100644
--- a/src/Core/Resources/translations/messages.ua.yaml
+++ b/src/Core/Resources/translations/messages.ua.yaml
@@ -297,6 +297,7 @@ pteroca:
phpmyadmin: 'PHPMyAdmin'
payments: 'Платежі'
logs: 'Журнали'
+ overview: 'Огляд'
api:
servers:
@@ -347,3 +348,29 @@ pteroca:
subject: 'Призупинення сервера'
server_suspended: 'Повідомляємо вас, що один із ваших серверів був призупинений, оскільки він не був продовжений.'
extend_server: 'Щоб відновити сервер, продовжіть його у панелі клієнта.'
+
+ admin:
+ overview:
+ title: 'Адміністративний Огляд'
+ servers: 'Активні Сервери'
+ users: 'Зареєстровані Користувачі'
+ payments: 'Платежі'
+ last_30_days: 'Останні 30 днів'
+ now: 'Зараз'
+ links: 'Важливі Посилання'
+ system: 'Інформація про Систему'
+ payment_overview: 'Огляд Платежів'
+ view_all: 'Переглянути все'
+ last_registered_users: 'Останні зареєстровані користувачі'
+ user: 'Користувач'
+ amount: 'Сума'
+ currency: 'Валюта'
+ status: 'Статус'
+ date: 'Дата'
+ no_payments: 'Ваша система ще не отримала жодного платежу.'
+ balance: 'Баланс'
+ verified: 'Перевірено'
+ unverified: 'Не Перевірено'
+ project_site: 'Сайт Проєкту'
+ documentation: 'Документація'
+ support: 'Підтримка'
diff --git a/src/Core/Service/Statistics/AdminStatisticsService.php b/src/Core/Service/Statistics/AdminStatisticsService.php
new file mode 100644
index 0000000..d7d25e5
--- /dev/null
+++ b/src/Core/Service/Statistics/AdminStatisticsService.php
@@ -0,0 +1,29 @@
+ $this->serverRepository->getActiveServersCount(),
+ 'usersRegisteredLastMonth' => $this->userRepository->getUsersRegisteredAfterCount(new \DateTime('-1 month')),
+ 'paymentsCreatedLastMonth' => $this->paymentRepository->getPaymentsCreatedAfterCount(new \DateTime('-1 month')),
+ 'lastRegisteredUsers' => $this->userRepository->getLastRegisteredUsers(5),
+ 'lastPayments' => $this->paymentRepository->getLastPayments(5),
+ ];
+ }
+}
diff --git a/src/Core/Service/System/SystemInformationService.php b/src/Core/Service/System/SystemInformationService.php
new file mode 100644
index 0000000..1012534
--- /dev/null
+++ b/src/Core/Service/System/SystemInformationService.php
@@ -0,0 +1,58 @@
+ [
+ 'version' => phpversion(),
+ 'extensions' => get_loaded_extensions(),
+ ],
+ 'database' => [
+ 'version' => $this->getDatabaseVersion(),
+ ],
+ 'os' => [
+ 'name' => php_uname('s'),
+ 'release' => php_uname('r'),
+ 'version' => php_uname('v'),
+ 'machine' => php_uname('m')
+ ],
+ 'webserver' => $_SERVER['SERVER_SOFTWARE'] ?? 'N/A',
+ 'pterodactyl' => [
+ 'status' => $this->isPterodactylApiOnline(),
+ ],
+ ];
+ }
+
+ private function getDatabaseVersion(): string
+ {
+ try {
+ return $this->entityManager->getConnection()->getServerVersion();
+ } catch (\Exception $exception) {
+ return 'N/A';
+ }
+ }
+
+ private function isPterodactylApiOnline(): bool
+ {
+ try {
+ $this->pterodactylService->getApi();
+ return true;
+ } catch (\Exception $exception) {
+ return false;
+ }
+ }
+}
diff --git a/src/Core/Tests/Unit/Service/Statistics/AdminStatisticsServiceTest.php b/src/Core/Tests/Unit/Service/Statistics/AdminStatisticsServiceTest.php
new file mode 100644
index 0000000..f330e74
--- /dev/null
+++ b/src/Core/Tests/Unit/Service/Statistics/AdminStatisticsServiceTest.php
@@ -0,0 +1,47 @@
+createMock(ServerRepository::class);
+ $serverRepository->expects($this->once())
+ ->method('getActiveServersCount')
+ ->willReturn(5);
+
+ $userRepository = $this->createMock(UserRepository::class);
+ $userRepository->expects($this->once())
+ ->method('getUsersRegisteredAfterCount')
+ ->willReturn(10);
+ $userRepository->expects($this->once())
+ ->method('getLastRegisteredUsers')
+ ->willReturn([]);
+
+ $paymentRepository = $this->createMock(PaymentRepository::class);
+ $paymentRepository->expects($this->once())
+ ->method('getPaymentsCreatedAfterCount')
+ ->willReturn(15);
+ $paymentRepository->expects($this->once())
+ ->method('getLastPayments')
+ ->willReturn([]);
+
+ $adminStatisticsService = new AdminStatisticsService($serverRepository, $userRepository, $paymentRepository);
+ $statistics = $adminStatisticsService->getAdminStatistics();
+
+ $this->assertEquals([
+ 'activeServers' => 5,
+ 'usersRegisteredLastMonth' => 10,
+ 'paymentsCreatedLastMonth' => 15,
+ 'lastRegisteredUsers' => [],
+ 'lastPayments' => [],
+ ], $statistics);
+ }
+}
diff --git a/src/Core/Tests/Unit/Service/System/SystemInformationServiceTest.php b/src/Core/Tests/Unit/Service/System/SystemInformationServiceTest.php
new file mode 100644
index 0000000..8680c0f
--- /dev/null
+++ b/src/Core/Tests/Unit/Service/System/SystemInformationServiceTest.php
@@ -0,0 +1,26 @@
+createMock(PterodactylService::class);
+ $entityManager = $this->createMock(EntityManagerInterface::class);
+
+ $systemInformationService = new SystemInformationService($entityManager, $pterodactylService);
+ $systemInformation = $systemInformationService->getSystemInformation();
+
+ $this->assertArrayHasKey('php', $systemInformation);
+ $this->assertArrayHasKey('database', $systemInformation);
+ $this->assertArrayHasKey('os', $systemInformation);
+ $this->assertArrayHasKey('webserver', $systemInformation);
+ $this->assertArrayHasKey('pterodactyl', $systemInformation);
+ }
+}
diff --git a/templates/panel/admin/overview.html.twig b/templates/panel/admin/overview.html.twig
new file mode 100644
index 0000000..00293fa
--- /dev/null
+++ b/templates/panel/admin/overview.html.twig
@@ -0,0 +1,155 @@
+{% extends '@EasyAdmin/page/content.html.twig' %}
+
+{% block content_title %}{{ 'pteroca.admin.overview.title'|trans }}{% endblock %}
+
+{% block page_actions %}
+
+ {{ 'pteroca.system.back'|trans }}
+
+{% endblock %}
+
+{% block main %}
+
+
+
+
+
+
{{ 'pteroca.admin.overview.servers'|trans }}
+
{{ 'pteroca.admin.overview.now'|trans }}
+
{{ statistics.activeServers }}
+
+
+
+
+
+
+
{{ 'pteroca.admin.overview.users'|trans }}
+
{{ 'pteroca.admin.overview.last_30_days'|trans }}
+
{{ statistics.usersRegisteredLastMonth }}
+
+
+
+
+
+
+
{{ 'pteroca.admin.overview.payments'|trans }}
+
{{ 'pteroca.admin.overview.last_30_days'|trans }}
+
{{ statistics.paymentsCreatedLastMonth }}
+
+
+
+
+
+
+
{{ 'pteroca.admin.overview.links'|trans }}
+
{{ 'pteroca.admin.overview.project_site'|trans }}: pteroca.com
+
{{ 'pteroca.admin.overview.documentation'|trans }}: docs.pteroca.com
+
{{ 'pteroca.admin.overview.support'|trans }}: Github Issues
+
+
+
+
+
+
+
+
+
+
+
+ {% if not statistics.lastPayments %}
+
{{ 'pteroca.admin.overview.no_payments'|trans }}
+ {% else %}
+
+
+
+ # |
+ {{ 'pteroca.admin.overview.user'|trans }} |
+ {{ 'pteroca.admin.overview.amount'|trans }} |
+ {{ 'pteroca.admin.overview.currency'|trans }} |
+ {{ 'pteroca.admin.overview.status'|trans }} |
+ {{ 'pteroca.admin.overview.date'|trans }} |
+
+
+
+ {% for payment in statistics.lastPayments %}
+
+ {{ payment.id }} |
+ {{ payment.user.email }} |
+ {{ payment.amount|number_format(2, ',', ' ') }} |
+ {{ payment.currency }} |
+ {{ payment.status }} |
+ {{ payment.createdAt|date('Y-m-d H:i') }} |
+
+ {% endfor %}
+
+
+ {% endif %}
+
+
+
+
+
+
+
+
+
+
+ # |
+ {{ 'pteroca.admin.overview.user'|trans }} |
+ {{ 'pteroca.admin.overview.balance'|trans }} |
+ {{ 'pteroca.admin.overview.status'|trans }} |
+ {{ 'pteroca.admin.overview.date'|trans }} |
+
+
+
+ {% for user in statistics.lastRegisteredUsers %}
+
+ {{ user.id }} |
+ {{ user.email }} |
+ {{ user.balance|number_format(2, ',', ' ') }} {{ get_currency() }} |
+ {{ user.isVerified ? 'pteroca.admin.overview.verified'|trans : 'pteroca.admin.overview.unverified'|trans }} |
+ {{ user.createdAt|date('Y-m-d H:i') }} |
+
+ {% endfor %}
+
+
+
+
+
+
+
+
+
+
+
+
+
{{ 'pteroca.admin.overview.system'|trans }}
+
PteroCA Version: v{{ get_app_version() }}
+
+ Pterodactyl API:
+
+ {{ systemInformation.pterodactyl.status ? ' OK' : ' Error' }}
+
+
+
PHP: {{ systemInformation.php.version }}
+
Database: {{ systemInformation.database.version }}
+
Web: {{ systemInformation.webserver }}
+
Host: {{ systemInformation.os|join(' ') }}
+
+
+
+
+
+
+
+{% endblock %}
\ No newline at end of file