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
|
|
|
|
|
|
|
|
|
|
/**
|
2026-04-24 16:32:46 +02:00
|
|
|
* @var list<array{status: string, name: string, message: string, label: string, description: string}> $checks
|
|
|
|
|
* @var string $overall
|
|
|
|
|
* @var array{php_version: string, environment: string} $meta
|
|
|
|
|
* @var string $lastChecked
|
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
|
|
|
*/
|
|
|
|
|
|
2026-04-24 16:32:46 +02:00
|
|
|
$checks = $checks ?? [];
|
|
|
|
|
$overall = $overall ?? 'ok';
|
|
|
|
|
$meta = $meta ?? ['php_version' => '', 'environment' => ''];
|
|
|
|
|
$lastChecked = $lastChecked ?? '';
|
|
|
|
|
|
|
|
|
|
$bannerTitles = [
|
|
|
|
|
'ok' => t('All systems operational'),
|
|
|
|
|
'warn' => t('Degraded service'),
|
|
|
|
|
'fail' => t('System outage detected'),
|
|
|
|
|
];
|
|
|
|
|
$bannerIcons = [
|
|
|
|
|
'ok' => 'bi-check-circle-fill',
|
|
|
|
|
'warn' => 'bi-exclamation-triangle-fill',
|
|
|
|
|
'fail' => 'bi-x-circle-fill',
|
|
|
|
|
];
|
|
|
|
|
$bannerVariants = [
|
|
|
|
|
'ok' => 'success',
|
|
|
|
|
'warn' => 'warn',
|
|
|
|
|
'fail' => 'danger',
|
|
|
|
|
];
|
|
|
|
|
$statusBadgeLabel = [
|
|
|
|
|
'ok' => t('OK'),
|
|
|
|
|
'warn' => t('Warning'),
|
|
|
|
|
'fail' => t('Fail'),
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
$bannerTitle = $bannerTitles[$overall] ?? $bannerTitles['ok'];
|
|
|
|
|
$bannerIcon = $bannerIcons[$overall] ?? $bannerIcons['ok'];
|
|
|
|
|
$bannerVariant = $bannerVariants[$overall] ?? $bannerVariants['ok'];
|
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
|
|
|
|
2026-03-22 16:26:16 +01:00
|
|
|
?>
|
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
|
|
|
<div class="app-dashboard-titlebar">
|
2026-04-24 16:32:46 +02:00
|
|
|
<h1><?php e(t('System status')); ?></h1>
|
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
|
|
|
</div>
|
|
|
|
|
|
2026-04-24 16:32:46 +02:00
|
|
|
<section class="app-status-banner" data-variant="<?php e($bannerVariant); ?>" aria-live="polite">
|
|
|
|
|
<i class="bi <?php e($bannerIcon); ?>" aria-hidden="true"></i>
|
|
|
|
|
<div class="app-status-banner-text">
|
|
|
|
|
<h2><?php e($bannerTitle); ?></h2>
|
|
|
|
|
<small><?php e(t('Last checked')); ?>: <?php e($lastChecked); ?></small>
|
|
|
|
|
</div>
|
|
|
|
|
</section>
|
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
|
|
|
|
2026-04-24 16:32:46 +02:00
|
|
|
<div class="app-stats-table">
|
|
|
|
|
<div class="app-stats-table-header">
|
|
|
|
|
<small><?php e(t('Components')); ?></small>
|
|
|
|
|
</div>
|
|
|
|
|
<?php if (empty($checks)): ?>
|
|
|
|
|
<?php $emptyState = ['message' => t('No health checks available.'), 'size' => 'compact']; require templatePath('partials/app-empty-state.phtml'); ?>
|
|
|
|
|
<?php else: ?>
|
|
|
|
|
<table>
|
|
|
|
|
<tbody>
|
|
|
|
|
<?php foreach ($checks as $check):
|
|
|
|
|
$status = (string) ($check['status'] ?? 'fail');
|
|
|
|
|
$label = (string) ($check['label'] ?? $check['name'] ?? '');
|
|
|
|
|
$description = (string) ($check['description'] ?? $check['message'] ?? '');
|
|
|
|
|
$variant = $bannerVariants[$status] ?? 'danger';
|
|
|
|
|
$badgeLabel = $statusBadgeLabel[$status] ?? t('Fail');
|
|
|
|
|
?>
|
|
|
|
|
<tr>
|
|
|
|
|
<td>
|
|
|
|
|
<strong><?php e(t($label)); ?></strong>
|
|
|
|
|
<small class="app-status-description"><?php e(t($description)); ?></small>
|
|
|
|
|
</td>
|
|
|
|
|
<td class="app-status-badge-cell">
|
|
|
|
|
<span class="badge" data-variant="<?php e($variant); ?>"><?php e($badgeLabel); ?></span>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
<?php endforeach; ?>
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
<?php endif; ?>
|
|
|
|
|
</div>
|
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
|
|
|
|
2026-04-24 16:32:46 +02:00
|
|
|
<div class="app-stats-table">
|
|
|
|
|
<div class="app-stats-table-header">
|
|
|
|
|
<small><?php e(t('Environment')); ?></small>
|
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
|
|
|
</div>
|
2026-04-24 16:32:46 +02:00
|
|
|
<table>
|
|
|
|
|
<tbody>
|
|
|
|
|
<tr>
|
|
|
|
|
<th scope="row"><?php e(t('PHP version')); ?></th>
|
|
|
|
|
<td><?php e($meta['php_version']); ?></td>
|
|
|
|
|
</tr>
|
|
|
|
|
<tr>
|
|
|
|
|
<th scope="row"><?php e(t('Environment')); ?></th>
|
|
|
|
|
<td><?php e($meta['environment']); ?></td>
|
|
|
|
|
</tr>
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
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
|
|
|
</div>
|