diff --git a/public/admin/system.php b/public/admin/system.php
index 6d0458f..0fe23f6 100644
--- a/public/admin/system.php
+++ b/public/admin/system.php
@@ -237,11 +237,12 @@ const ALLOWED_LINES = [50, 100, 200, 500];
const NGINX_CONFIG_LIVE = '/etc/nginx/sites-available/posterg';
const NGINX_CONFIG_LOCAL = APP_ROOT . '/nginx/posterg.conf';
-// Active tab: 'status', 'nginx_config', or a log key
-$activeTab = $_GET['tab'] ?? 'nginx_access';
-if ($activeTab === 'status' || $activeTab === 'nginx_config') {
- // valid as-is
-} elseif (!array_key_exists($activeTab, LOG_FILES)) {
+// Active tab: 'nginx_config', or a log key (status is now always shown above tabs)
+$activeTab = $_GET['tab'] ?? 'nginx_access';
+if ($activeTab === 'status') {
+ // legacy URL — redirect to default log tab, status is always visible
+ $activeTab = 'nginx_access';
+} elseif ($activeTab !== 'nginx_config' && !array_key_exists($activeTab, LOG_FILES)) {
$activeTab = 'nginx_access';
}
@@ -293,7 +294,7 @@ $logLines = null;
$logError = null;
$logFileMeta = null;
-if ($activeTab !== 'status' && $activeTab !== 'nginx_config') {
+if ($activeTab !== 'nginx_config') {
$logPath = LOG_FILES[$activeTab]['path'];
$logLines = readLogTail($logPath, $selectedN, $logError);
if (file_exists($logPath)) {
@@ -361,6 +362,27 @@ $isAdmin = true; $bodyClass = 'admin-body';
$extraCss = ['/assets/css/system.css'];
$extraJsInline = <<<'JS'
(function () {
+ // ── Status section toggle ──────────────────────────────────────────
+ var toggleBtn = document.getElementById('sys-status-toggle');
+ var statusBody = document.getElementById('sys-status-body');
+ if (toggleBtn && statusBody) {
+ toggleBtn.addEventListener('click', function () {
+ var collapsed = statusBody.hidden;
+ statusBody.hidden = !collapsed;
+ toggleBtn.setAttribute('aria-expanded', collapsed ? 'true' : 'false');
+ toggleBtn.textContent = collapsed ? '▲ Réduire' : '▼ Développer';
+ try { localStorage.setItem('sys_status_collapsed', collapsed ? '0' : '1'); } catch(e) {}
+ });
+ // Restore collapsed state
+ try {
+ if (localStorage.getItem('sys_status_collapsed') === '1') {
+ statusBody.hidden = true;
+ toggleBtn.setAttribute('aria-expanded', 'false');
+ toggleBtn.textContent = '▼ Développer';
+ }
+ } catch(e) {}
+ }
+
// ── Instant tab switch on lines-select change ──────────────────────
var sel = document.getElementById('lines-select');
if (sel) {
@@ -425,76 +447,85 @@ require_once APP_ROOT . '/templates/head.php';
Forcer actualisation
+
+
+
+
+
+
+
+
+
+
+
+
= htmlspecialchars($check['detail']) ?>
+
+
+
+
+
+
+
+
+
-