chore: complete update
This commit is contained in:
96
src/Application/Admin/views/admin/dashboard.php
Normal file
96
src/Application/Admin/views/admin/dashboard.php
Normal file
@@ -0,0 +1,96 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title><?= $title ?></title>
|
||||
<link rel="stylesheet" href="/css/admin.css">
|
||||
</head>
|
||||
<body class="admin-page">
|
||||
<div class="admin-header">
|
||||
<h1>Framework Admin Dashboard</h1>
|
||||
</div>
|
||||
|
||||
<div class="admin-nav">
|
||||
<a href="/admin" class="active">Dashboard</a>
|
||||
<a href="/admin/routes">Routen</a>
|
||||
<a href="/admin/services">Dienste</a>
|
||||
<a href="/admin/environment">Umgebung</a>
|
||||
<a href="/admin/performance">Performance</a>
|
||||
<a href="/admin/redis">Redis</a>
|
||||
<a href="/admin/phpinfo">PHP Info</a>
|
||||
</div>
|
||||
|
||||
<div class="admin-content">
|
||||
<div class="dashboard-stats">
|
||||
<div class="stat-box">
|
||||
<h3>Framework Version</h3>
|
||||
<div class="stat-value"><?= $stats['frameworkVersion'] ?></div>
|
||||
</div>
|
||||
|
||||
<div class="stat-box">
|
||||
<h3>PHP Version</h3>
|
||||
<div class="stat-value"><?= $stats['phpVersion'] ?></div>
|
||||
</div>
|
||||
|
||||
<div class="stat-box">
|
||||
<h3>Speicherverbrauch</h3>
|
||||
<div class="stat-value"><?= $stats['memoryUsage'] ?></div>
|
||||
</div>
|
||||
|
||||
<div class="stat-box">
|
||||
<h3>Max. Speicherverbrauch</h3>
|
||||
<div class="stat-value"><?= $stats['peakMemoryUsage'] ?></div>
|
||||
</div>
|
||||
|
||||
<div class="stat-box">
|
||||
<h3>Server</h3>
|
||||
<div class="stat-value"><?= $stats['serverInfo'] ?></div>
|
||||
</div>
|
||||
|
||||
<div class="stat-box">
|
||||
<h3>Serverzeit</h3>
|
||||
<div class="stat-value"><?= $stats['serverTime'] ?></div>
|
||||
</div>
|
||||
|
||||
<div class="stat-box">
|
||||
<h3>Zeitzone</h3>
|
||||
<div class="stat-value"><?= $stats['timezone'] ?></div>
|
||||
</div>
|
||||
|
||||
<div class="stat-box">
|
||||
<h3>Betriebssystem</h3>
|
||||
<div class="stat-value"><?= $stats['operatingSystem'] ?></div>
|
||||
</div>
|
||||
|
||||
<div class="stat-box">
|
||||
<h3>Server Uptime</h3>
|
||||
<div class="stat-value"><?= $stats['uptime'] ?></div>
|
||||
</div>
|
||||
|
||||
<div class="stat-box">
|
||||
<h3>Aktive Sessions</h3>
|
||||
<div class="stat-value"><?= $stats['sessionCount'] ?></div>
|
||||
</div>
|
||||
|
||||
<div class="stat-box">
|
||||
<h3>Registrierte Dienste</h3>
|
||||
<div class="stat-value"><?= $stats['servicesCount'] ?></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="admin-section">
|
||||
<h2>PHP Erweiterungen</h2>
|
||||
<div class="extensions-list">
|
||||
<?php foreach($stats['loadedExtensions'] as $extension): ?>
|
||||
<span class="extension-badge"><?= $extension ?></span>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="admin-footer">
|
||||
<p>© <?= date('Y') ?> Framework Admin</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
86
src/Application/Admin/views/admin/environment.php
Normal file
86
src/Application/Admin/views/admin/environment.php
Normal file
@@ -0,0 +1,86 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title><?= $title ?></title>
|
||||
<link rel="stylesheet" href="/css/admin.css">
|
||||
</head>
|
||||
<body class="admin-page">
|
||||
<div class="admin-header">
|
||||
<h1>Umgebungsvariablen</h1>
|
||||
</div>
|
||||
|
||||
<div class="admin-nav">
|
||||
<a href="/admin">Dashboard</a>
|
||||
<a href="/admin/routes">Routen</a>
|
||||
<a href="/admin/services">Dienste</a>
|
||||
<a href="/admin/environment" class="active">Umgebung</a>
|
||||
<a href="/admin/performance">Performance</a>
|
||||
<a href="/admin/redis">Redis</a>
|
||||
<a href="/admin/phpinfo">PHP Info</a>
|
||||
</div>
|
||||
|
||||
<div class="admin-content">
|
||||
<div class="admin-tools">
|
||||
<input type="text" id="envFilter" placeholder="Variablen filtern..." class="search-input">
|
||||
<div class="filter-tags">
|
||||
<button class="filter-tag" data-prefix="APP_">APP_</button>
|
||||
<button class="filter-tag" data-prefix="DB_">DB_</button>
|
||||
<button class="filter-tag" data-prefix="REDIS_">REDIS_</button>
|
||||
<button class="filter-tag" data-prefix="RATE_LIMIT_">RATE_LIMIT_</button>
|
||||
<button class="filter-tag" data-prefix="PHP_">PHP_</button>
|
||||
<button class="filter-tag active" data-prefix="">Alle</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<table class="admin-table" id="envTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Variable</th>
|
||||
<th>Wert</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($env as $key => $value): ?>
|
||||
<tr>
|
||||
<td><?= $key ?></td>
|
||||
<td><?= is_array($value) ? json_encode($value) : $value ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="admin-footer">
|
||||
<p>© <?= date('Y') ?> Framework Admin</p>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// Filterung der Umgebungsvariablen
|
||||
document.getElementById('envFilter').addEventListener('input', filterTable);
|
||||
|
||||
// Tag-Filter
|
||||
document.querySelectorAll('.filter-tag').forEach(tag => {
|
||||
tag.addEventListener('click', function() {
|
||||
document.querySelectorAll('.filter-tag').forEach(t => t.classList.remove('active'));
|
||||
this.classList.add('active');
|
||||
|
||||
const prefix = this.getAttribute('data-prefix');
|
||||
document.getElementById('envFilter').value = prefix;
|
||||
filterTable();
|
||||
});
|
||||
});
|
||||
|
||||
function filterTable() {
|
||||
const filterValue = document.getElementById('envFilter').value.toLowerCase();
|
||||
const rows = document.querySelectorAll('#envTable tbody tr');
|
||||
|
||||
rows.forEach(row => {
|
||||
const key = row.cells[0].textContent.toLowerCase();
|
||||
row.style.display = key.includes(filterValue) ? '' : 'none';
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
125
src/Application/Admin/views/admin/performance.view.php
Normal file
125
src/Application/Admin/views/admin/performance.view.php
Normal file
@@ -0,0 +1,125 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title><?= $title ?></title>
|
||||
<link rel="stylesheet" href="/css/admin.css">
|
||||
</head>
|
||||
<body class="admin-page">
|
||||
<div class="admin-header">
|
||||
<h1>Performance-Übersicht</h1>
|
||||
</div>
|
||||
|
||||
<div class="admin-nav">
|
||||
<a href="/admin">Dashboard</a>
|
||||
<a href="/admin/routes">Routen</a>
|
||||
<a href="/admin/services">Dienste</a>
|
||||
<a href="/admin/environment">Umgebung</a>
|
||||
<a href="/admin/performance" class="active">Performance</a>
|
||||
<a href="/admin/redis">Redis</a>
|
||||
<a href="/admin/phpinfo">PHP Info</a>
|
||||
</div>
|
||||
|
||||
<div class="admin-content">
|
||||
<div class="dashboard-stats">
|
||||
<div class="stat-box">
|
||||
<h3>Aktueller Speicherverbrauch</h3>
|
||||
<div class="stat-value"><?= $performance['currentMemoryUsage'] ?></div>
|
||||
</div>
|
||||
|
||||
<div class="stat-box">
|
||||
<h3>Maximaler Speicherverbrauch</h3>
|
||||
<div class="stat-value"><?= $performance['peakMemoryUsage'] ?></div>
|
||||
</div>
|
||||
|
||||
<div class="stat-box">
|
||||
<h3>Speicherlimit</h3>
|
||||
<div class="stat-value"><?= $performance['memoryLimit'] ?></div>
|
||||
</div>
|
||||
|
||||
<div class="stat-box">
|
||||
<h3>Speicherauslastung</h3>
|
||||
<div class="stat-value">
|
||||
<div class="progress-bar">
|
||||
<div class="progress" style="width: <?= $performance['memoryUsagePercentage'] ?>%"></div>
|
||||
</div>
|
||||
<div class="progress-value"><?= $performance['memoryUsagePercentage'] ?>%</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="stat-box">
|
||||
<h3>Systemlast (1/5/15 min)</h3>
|
||||
<div class="stat-value">
|
||||
<?= $performance['loadAverage'][0] ?> /
|
||||
<?= $performance['loadAverage'][1] ?> /
|
||||
<?= $performance['loadAverage'][2] ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="stat-box">
|
||||
<h3>OPCache aktiviert</h3>
|
||||
<div class="stat-value"><?= $performance['opcacheEnabled'] ?></div>
|
||||
</div>
|
||||
|
||||
<?php if (isset($performance['opcacheMemoryUsage'])): ?>
|
||||
<div class="stat-box">
|
||||
<h3>OPCache Speicherverbrauch</h3>
|
||||
<div class="stat-value"><?= $performance['opcacheMemoryUsage'] ?></div>
|
||||
</div>
|
||||
|
||||
<div class="stat-box">
|
||||
<h3>OPCache Cache Hits</h3>
|
||||
<div class="stat-value"><?= $performance['opcacheCacheHits'] ?></div>
|
||||
</div>
|
||||
|
||||
<div class="stat-box">
|
||||
<h3>OPCache Miss Rate</h3>
|
||||
<div class="stat-value"><?= $performance['opcacheMissRate'] ?></div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<div class="stat-box">
|
||||
<h3>Ausführungszeit</h3>
|
||||
<div class="stat-value"><?= $performance['executionTime'] ?></div>
|
||||
</div>
|
||||
|
||||
<div class="stat-box">
|
||||
<h3>Geladene Dateien</h3>
|
||||
<div class="stat-value"><?= $performance['includedFiles'] ?></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="admin-section">
|
||||
<h2>Geladene Dateien</h2>
|
||||
<div class="admin-tools">
|
||||
<input type="text" id="fileFilter" placeholder="Dateien filtern..." class="search-input">
|
||||
</div>
|
||||
|
||||
<div class="file-list" id="fileList">
|
||||
<?php foreach(get_included_files() as $file): ?>
|
||||
<div class="file-item">
|
||||
<?= $file ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="admin-footer">
|
||||
<p>© <?= date('Y') ?> Framework Admin</p>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
document.getElementById('fileFilter').addEventListener('input', function() {
|
||||
const filterValue = this.value.toLowerCase();
|
||||
const items = document.querySelectorAll('#fileList .file-item');
|
||||
|
||||
items.forEach(item => {
|
||||
const text = item.textContent.toLowerCase();
|
||||
item.style.display = text.includes(filterValue) ? '' : 'none';
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
105
src/Application/Admin/views/admin/redis.view.php
Normal file
105
src/Application/Admin/views/admin/redis.view.php
Normal file
@@ -0,0 +1,105 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title><?= $title ?></title>
|
||||
<link rel="stylesheet" href="/css/admin.css">
|
||||
</head>
|
||||
<body class="admin-page">
|
||||
<div class="admin-header">
|
||||
<h1>Redis-Informationen</h1>
|
||||
</div>
|
||||
|
||||
<div class="admin-nav">
|
||||
<a href="/admin">Dashboard</a>
|
||||
<a href="/admin/routes">Routen</a>
|
||||
<a href="/admin/services">Dienste</a>
|
||||
<a href="/admin/environment">Umgebung</a>
|
||||
<a href="/admin/performance">Performance</a>
|
||||
<a href="/admin/redis" class="active">Redis</a>
|
||||
<a href="/admin/phpinfo">PHP Info</a>
|
||||
</div>
|
||||
|
||||
<div class="admin-content">
|
||||
<?php if (isset($redis['status']) && $redis['status'] === 'Verbunden'): ?>
|
||||
<div class="dashboard-stats">
|
||||
<div class="stat-box">
|
||||
<h3>Status</h3>
|
||||
<div class="stat-value status-connected"><?= $redis['status'] ?></div>
|
||||
</div>
|
||||
|
||||
<div class="stat-box">
|
||||
<h3>Version</h3>
|
||||
<div class="stat-value"><?= $redis['version'] ?></div>
|
||||
</div>
|
||||
|
||||
<div class="stat-box">
|
||||
<h3>Uptime</h3>
|
||||
<div class="stat-value"><?= $redis['uptime'] ?></div>
|
||||
</div>
|
||||
|
||||
<div class="stat-box">
|
||||
<h3>Speicherverbrauch</h3>
|
||||
<div class="stat-value"><?= $redis['memory'] ?></div>
|
||||
</div>
|
||||
|
||||
<div class="stat-box">
|
||||
<h3>Max. Speicherverbrauch</h3>
|
||||
<div class="stat-value"><?= $redis['peak_memory'] ?></div>
|
||||
</div>
|
||||
|
||||
<div class="stat-box">
|
||||
<h3>Verbundene Clients</h3>
|
||||
<div class="stat-value"><?= $redis['clients'] ?></div>
|
||||
</div>
|
||||
|
||||
<div class="stat-box">
|
||||
<h3>Anzahl Schlüssel</h3>
|
||||
<div class="stat-value"><?= $redis['keys'] ?></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="admin-section">
|
||||
<h2>Schlüssel (max. 50 angezeigt)</h2>
|
||||
<div class="admin-tools">
|
||||
<input type="text" id="keyFilter" placeholder="Schlüssel filtern..." class="search-input">
|
||||
</div>
|
||||
|
||||
<div class="key-list" id="keyList">
|
||||
<?php if (empty($redis['key_sample'])): ?>
|
||||
<div class="empty-message">Keine Schlüssel vorhanden</div>
|
||||
<?php else: ?>
|
||||
<?php foreach($redis['key_sample'] as $key): ?>
|
||||
<div class="key-item">
|
||||
<?= $key ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<div class="error-message">
|
||||
<h2>Redis-Verbindung fehlgeschlagen</h2>
|
||||
<p><?= $redis['status'] ?? 'Unbekannter Fehler' ?></p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<div class="admin-footer">
|
||||
<p>© <?= date('Y') ?> Framework Admin</p>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
document.getElementById('keyFilter')?.addEventListener('input', function() {
|
||||
const filterValue = this.value.toLowerCase();
|
||||
const items = document.querySelectorAll('#keyList .key-item');
|
||||
|
||||
items.forEach(item => {
|
||||
const text = item.textContent.toLowerCase();
|
||||
item.style.display = text.includes(filterValue) ? '' : 'none';
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
69
src/Application/Admin/views/admin/routes.php
Normal file
69
src/Application/Admin/views/admin/routes.php
Normal file
@@ -0,0 +1,69 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title><?= $title ?></title>
|
||||
<link rel="stylesheet" href="/css/admin.css">
|
||||
</head>
|
||||
<body class="admin-page">
|
||||
<div class="admin-header">
|
||||
<h1>Routen-Übersicht</h1>
|
||||
</div>
|
||||
|
||||
<div class="admin-nav">
|
||||
<a href="/admin">Dashboard</a>
|
||||
<a href="/admin/routes" class="active">Routen</a>
|
||||
<a href="/admin/services">Dienste</a>
|
||||
<a href="/admin/environment">Umgebung</a>
|
||||
<a href="/admin/performance">Performance</a>
|
||||
<a href="/admin/redis">Redis</a>
|
||||
<a href="/admin/phpinfo">PHP Info</a>
|
||||
</div>
|
||||
|
||||
<div class="admin-content">
|
||||
<div class="admin-tools">
|
||||
<input type="text" id="routeFilter" placeholder="Routen filtern..." class="search-input">
|
||||
</div>
|
||||
|
||||
<table class="admin-table" id="routesTable">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Pfad</th>
|
||||
<th>Methode</th>
|
||||
<th>Controller</th>
|
||||
<th>Aktion</th>
|
||||
<th>Name</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($routes as $route): ?>
|
||||
<tr>
|
||||
<td><?= $route->path ?></td>
|
||||
<td><?= $route->method ?></td>
|
||||
<td><?= $route->controllerClass ?></td>
|
||||
<td><?= $route->methodName ?></td>
|
||||
<td><?= $route->name ?? '-' ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="admin-footer">
|
||||
<p>© <?= date('Y') ?> Framework Admin</p>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
document.getElementById('routeFilter').addEventListener('input', function() {
|
||||
const filterValue = this.value.toLowerCase();
|
||||
const rows = document.querySelectorAll('#routesTable tbody tr');
|
||||
|
||||
rows.forEach(row => {
|
||||
const text = row.textContent.toLowerCase();
|
||||
row.style.display = text.includes(filterValue) ? '' : 'none';
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
72
src/Application/Admin/views/admin/services.php
Normal file
72
src/Application/Admin/views/admin/services.php
Normal file
@@ -0,0 +1,72 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title><?= $title ?></title>
|
||||
<link rel="stylesheet" href="/css/admin.css">
|
||||
</head>
|
||||
<body class="admin-page">
|
||||
<div class="admin-header">
|
||||
<h1>Registrierte Dienste</h1>
|
||||
</div>
|
||||
|
||||
<div class="admin-nav">
|
||||
<a href="/admin">Dashboard</a>
|
||||
<a href="/admin/routes">Routen</a>
|
||||
<a href="/admin/services" class="active">Dienste</a>
|
||||
<a href="/admin/environment">Umgebung</a>
|
||||
<a href="/admin/performance">Performance</a>
|
||||
<a href="/admin/redis">Redis</a>
|
||||
<a href="/admin/phpinfo">PHP Info</a>
|
||||
</div>
|
||||
|
||||
<div class="admin-content">
|
||||
<div class="admin-tools">
|
||||
<input type="text" id="serviceFilter" placeholder="Dienste filtern..." class="search-input">
|
||||
<span class="services-count"><?= count($services) ?> Dienste insgesamt</span>
|
||||
</div>
|
||||
|
||||
<div class="service-list" id="serviceList">
|
||||
<?php foreach($services as $service): ?>
|
||||
<div class="service-item">
|
||||
<div class="service-name"><?= $service ?></div>
|
||||
<?php
|
||||
$parts = explode('\\', $service);
|
||||
$category = $parts[1] ?? 'Unknown';
|
||||
$subCategory = $parts[2] ?? '';
|
||||
?>
|
||||
<div class="service-category">
|
||||
<span class="category-badge"><?= $category ?></span>
|
||||
<?php if ($subCategory): ?>
|
||||
<span class="subcategory-badge"><?= $subCategory ?></span>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="admin-footer">
|
||||
<p>© <?= date('Y') ?> Framework Admin</p>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
document.getElementById('serviceFilter').addEventListener('input', function() {
|
||||
const filterValue = this.value.toLowerCase();
|
||||
const items = document.querySelectorAll('#serviceList .service-item');
|
||||
let visibleCount = 0;
|
||||
|
||||
items.forEach(item => {
|
||||
const text = item.textContent.toLowerCase();
|
||||
const isVisible = text.includes(filterValue);
|
||||
item.style.display = isVisible ? '' : 'none';
|
||||
if (isVisible) visibleCount++;
|
||||
});
|
||||
|
||||
document.querySelector('.services-count').textContent =
|
||||
visibleCount + ' von ' + <?= count($services) ?> + ' Diensten';
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user