Reduce admin/system-info to a single focused status view: overall status banner, components list from existing health checks, and an environment meta table. Drops the Modules and Permissions tabs — those were dev-diagnostics already available via CLI. - Remove SystemInfoService + its test; wire the action directly to SystemHealthService and build meta inline - Extend SystemHealthService with per-check label + description so the UI speaks in customer terms while the CLI doctor path stays compatible - Rebuild the view on existing app-stats-table + app-empty-state primitives; add a small app-status-banner component for the headline signal - Align help-center nav label and i18n keys (de/en) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
46 lines
1.0 KiB
PHP
46 lines
1.0 KiB
PHP
<?php
|
|
|
|
use MintyPHP\Buffer;
|
|
use MintyPHP\Service\Access\OperationsAuthorizationPolicy;
|
|
use MintyPHP\Service\System\SystemHealthService;
|
|
use MintyPHP\Support\Guard;
|
|
|
|
Guard::requireAbilityOrForbidden(OperationsAuthorizationPolicy::ABILITY_ADMIN_SYSTEM_INFO_VIEW);
|
|
|
|
$checks = app(SystemHealthService::class)->runAll();
|
|
|
|
$overall = 'ok';
|
|
foreach ($checks as $check) {
|
|
if ($check['status'] === 'fail') {
|
|
$overall = 'fail';
|
|
break;
|
|
}
|
|
if ($check['status'] === 'warn') {
|
|
$overall = 'warn';
|
|
}
|
|
}
|
|
|
|
$environment = 'unknown';
|
|
if (defined('APP_ENV')) {
|
|
$environment = (string) constant('APP_ENV');
|
|
} else {
|
|
$envVar = getenv('APP_ENV');
|
|
if (is_string($envVar) && $envVar !== '') {
|
|
$environment = $envVar;
|
|
}
|
|
}
|
|
|
|
$meta = [
|
|
'php_version' => PHP_VERSION,
|
|
'environment' => $environment,
|
|
];
|
|
|
|
$lastChecked = date('Y-m-d H:i:s');
|
|
|
|
Buffer::set('title', t('System status'));
|
|
|
|
$breadcrumbs = [
|
|
['label' => t('Home'), 'path' => 'admin'],
|
|
['label' => t('System status')],
|
|
];
|