Some checks failed
🚀 Build & Deploy Image / Determine Build Necessity (push) Failing after 10m14s
🚀 Build & Deploy Image / Build Runtime Base Image (push) Has been skipped
🚀 Build & Deploy Image / Build Docker Image (push) Has been skipped
🚀 Build & Deploy Image / Run Tests & Quality Checks (push) Has been skipped
🚀 Build & Deploy Image / Auto-deploy to Staging (push) Has been skipped
🚀 Build & Deploy Image / Auto-deploy to Production (push) Has been skipped
Security Vulnerability Scan / Check for Dependency Changes (push) Failing after 11m25s
Security Vulnerability Scan / Composer Security Audit (push) Has been cancelled
- Remove middleware reference from Gitea Traefik labels (caused routing issues) - Optimize Gitea connection pool settings (MAX_IDLE_CONNS=30, authentication_timeout=180s) - Add explicit service reference in Traefik labels - Fix intermittent 504 timeouts by improving PostgreSQL connection handling Fixes Gitea unreachability via git.michaelschiemer.de
68 lines
2.2 KiB
PHP
68 lines
2.2 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Application\Admin\System;
|
|
|
|
use App\Application\Admin\Service\AdminLayoutProcessor;
|
|
use App\Application\Admin\System\Service\PhpInfoService;
|
|
use App\Framework\Admin\Attributes\AdminPage;
|
|
use App\Framework\Admin\Attributes\AdminSection;
|
|
use App\Framework\Attributes\Route;
|
|
use App\Framework\DateTime\Clock;
|
|
use App\Framework\Http\Method;
|
|
use App\Framework\Meta\MetaData;
|
|
use App\Framework\Router\Result\ViewResult;
|
|
|
|
#[AdminSection(name: 'System', icon: 'server', order: 1, description: 'System monitoring and configuration')]
|
|
final readonly class PhpInfoController
|
|
{
|
|
public function __construct(
|
|
private PhpInfoService $phpInfoService,
|
|
private AdminLayoutProcessor $layoutProcessor,
|
|
private Clock $clock,
|
|
) {
|
|
}
|
|
|
|
#[AdminPage(title: 'PHP Information', icon: 'code', section: 'System', order: 5)]
|
|
#[Route(path: '/admin/system/phpinfo', method: Method::GET, name: 'admin.system.phpinfo')]
|
|
public function show(): ViewResult
|
|
{
|
|
$phpInfo = $this->phpInfoService->getStructuredInfo();
|
|
|
|
// Prepare data for template
|
|
$generalInfo = [];
|
|
foreach ($phpInfo['general'] as $key => $value) {
|
|
$generalInfo[] = [
|
|
'key' => ucwords(str_replace('_', ' ', $key)),
|
|
'value' => (string)$value,
|
|
];
|
|
}
|
|
|
|
$configInfo = [];
|
|
foreach ($phpInfo['configuration'] as $key => $value) {
|
|
$configInfo[] = [
|
|
'key' => ucwords(str_replace('_', ' ', $key)),
|
|
'value' => (string)$value,
|
|
];
|
|
}
|
|
|
|
$data = [
|
|
'title' => 'PHP Information',
|
|
'general_info' => $generalInfo,
|
|
'config_info' => $configInfo,
|
|
'extensions_count' => $phpInfo['extensions']['count'],
|
|
'extensions_list' => $phpInfo['extensions']['list'],
|
|
'current_year' => $this->clock->now()->format('Y'),
|
|
];
|
|
|
|
$finalData = $this->layoutProcessor->processLayoutFromArray($data);
|
|
|
|
return new ViewResult(
|
|
template: 'phpinfo',
|
|
metaData: new MetaData('PHP Information', 'PHP Information and Configuration'),
|
|
data: $finalData
|
|
);
|
|
}
|
|
}
|