feat: add read-only System Info admin page with health checks and module inventory
New page at /admin/system-info with three tabs:
- Overview: PHP version, SAPI, environment, 6 health checks (DB, schema,
storage, RBAC baseline, admin role, scheduler heartbeat)
- Modules: table of active modules with version, dependencies, permission count
- Permissions: active/inactive counts and per-source breakdown
Gated behind new system_info.view permission assigned to Admin role.
No mutations — purely diagnostic/observability.
Includes SystemHealthService, SystemInfoService, SystemHealthRepository
with interface, DI registration, i18n keys (de+en), idempotent DB update
script, and 17 new PHPUnit tests.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-22 15:08:02 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
use MintyPHP\Buffer;
|
|
|
|
|
use MintyPHP\Service\Access\OperationsAuthorizationPolicy;
|
|
|
|
|
use MintyPHP\Service\System\SystemInfoService;
|
|
|
|
|
use MintyPHP\Support\Guard;
|
|
|
|
|
|
|
|
|
|
Guard::requireAbilityOrForbidden(OperationsAuthorizationPolicy::ABILITY_ADMIN_SYSTEM_INFO_VIEW);
|
|
|
|
|
|
|
|
|
|
$pageData = app(SystemInfoService::class)->buildPageData();
|
|
|
|
|
$overview = $pageData['overview'] ?? [];
|
|
|
|
|
$modules = $pageData['modules'] ?? [];
|
|
|
|
|
$permissions = $pageData['permissions'] ?? [];
|
|
|
|
|
$healthChecks = $overview['health_checks'] ?? [];
|
|
|
|
|
|
|
|
|
|
Buffer::set('title', t('System Info'));
|
2026-04-05 17:17:06 +02:00
|
|
|
|
|
|
|
|
$breadcrumbs = [
|
|
|
|
|
['label' => t('Home'), 'path' => 'admin'],
|
|
|
|
|
['label' => t('System Info')],
|
|
|
|
|
];
|