SSR control center: English UI strings throughout
Widgets, backend module template and flash messages now match the rest of the backend, which is English. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
91c2ceb5b1
commit
fa63871da7
5 files changed
+52
-52
No files matched your search
@@ -88,12 +88,12 @@ final class SsrController
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($paths === []) {
|
if ($paths === []) {
|
||||||
$this->flash('Keine Pfade angegeben.', 'Purge', false);
|
$this->flash('No paths given.', 'Purge', false);
|
||||||
} else {
|
} else {
|
||||||
$result = $this->purgeService->purge($paths, 'module:' . $user);
|
$result = $this->purgeService->purge($paths, 'module:' . $user);
|
||||||
$this->flash(
|
$this->flash(
|
||||||
sprintf('HTTP %d — %s', $result['httpCode'], $result['message']),
|
sprintf('HTTP %d — %s', $result['httpCode'], $result['message']),
|
||||||
$result['success'] ? 'Purge erfolgreich' : 'Purge fehlgeschlagen',
|
$result['success'] ? 'Purge successful' : 'Purge failed',
|
||||||
$result['success']
|
$result['success']
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ use TYPO3\CMS\Dashboard\Widgets\WidgetInterface;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Dashboard tile: purge and health statistics from the two protocol
|
* Dashboard tile: purge and health statistics from the two protocol
|
||||||
* tables. History depth = what vitec:ssr-health sampling (scheduler)
|
* tables. History depth = what vitec:ssr-health sampling (cron, every
|
||||||
* and the purge log hold (14 days).
|
* 5 minutes) and the purge log hold (14 days).
|
||||||
*/
|
*/
|
||||||
final class SsrStatsWidget implements WidgetInterface
|
final class SsrStatsWidget implements WidgetInterface
|
||||||
{
|
{
|
||||||
@@ -38,15 +38,15 @@ final class SsrStatsWidget implements WidgetInterface
|
|||||||
$maxCache = $this->scalar('SELECT MAX(cache_mb) FROM tx_vitec_ssrhealthlog WHERE crdate > ' . $d7);
|
$maxCache = $this->scalar('SELECT MAX(cache_mb) FROM tx_vitec_ssrhealthlog WHERE crdate > ' . $d7);
|
||||||
|
|
||||||
$rows = [
|
$rows = [
|
||||||
['Purges (24 h / 7 Tage)', $purges24h . ' / ' . $purges7d],
|
['Purges (24 h / 7 days)', $purges24h . ' / ' . $purges7d],
|
||||||
['davon Komplett-Purges (7 T.)', (string)$full7d],
|
['of which full purges (7 d)', (string)$full7d],
|
||||||
['Fehlgeschlagene Purges (7 T.)', $failed7d > 0
|
['Failed purges (7 d)', $failed7d > 0
|
||||||
? '<span class="badge badge-danger">' . $failed7d . '</span>'
|
? '<span class="badge badge-danger">' . $failed7d . '</span>'
|
||||||
: '<span class="badge badge-success">0</span>'],
|
: '<span class="badge badge-success">0</span>'],
|
||||||
['Verfügbarkeit (24 h)', htmlspecialchars($uptime)
|
['Availability (24 h)', htmlspecialchars($uptime)
|
||||||
. ' <small>(' . $ok24h . '/' . $samples24h . ' Messungen)</small>'],
|
. ' <small>(' . $ok24h . '/' . $samples24h . ' samples)</small>'],
|
||||||
['∅ Antwortzeit (24 h)', $avgMs !== null ? $avgMs . ' ms' : '-'],
|
['Avg. response time (24 h)', $avgMs !== null ? $avgMs . ' ms' : '-'],
|
||||||
['Max. Cache-Größe (7 T.)', $maxCache !== null ? $maxCache . ' MB' : '-'],
|
['Max. cache size (7 d)', $maxCache !== null ? $maxCache . ' MB' : '-'],
|
||||||
];
|
];
|
||||||
|
|
||||||
$html = '<table class="table table-striped table-sm"><tbody>';
|
$html = '<table class="table table-striped table-sm"><tbody>';
|
||||||
@@ -55,7 +55,7 @@ final class SsrStatsWidget implements WidgetInterface
|
|||||||
}
|
}
|
||||||
$html .= '</tbody></table>';
|
$html .= '</tbody></table>';
|
||||||
if ($samples24h === 0) {
|
if ($samples24h === 0) {
|
||||||
$html .= '<p class="text-muted" style="font-size:11px">Noch keine Messwerte: Scheduler-Task für <code>vitec:ssr-health</code> einrichten (z. B. alle 5 Minuten).</p>';
|
$html .= '<p class="text-muted" style="font-size:11px">No samples yet: the cron job for <code>vitec:ssr-health</code> fills this every 5 minutes.</p>';
|
||||||
}
|
}
|
||||||
return $html;
|
return $html;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,24 +37,24 @@ final class SsrStatusWidget implements WidgetInterface
|
|||||||
};
|
};
|
||||||
|
|
||||||
$rows = [];
|
$rows = [];
|
||||||
$rows[] = ['SSR-Auslieferung', $badge($flagOn, 'AN - Seiten kommen vom VPS', 'AUS - SPA wie bisher')];
|
$rows[] = ['SSR delivery', $badge($flagOn, 'ON - pages served from the VPS', 'OFF - SPA as before')];
|
||||||
if ($health === null) {
|
if ($health === null) {
|
||||||
$rows[] = ['SSR-Server', '<span class="badge badge-danger">NICHT ERREICHBAR</span>'];
|
$rows[] = ['SSR server', '<span class="badge badge-danger">NOT REACHABLE</span>'];
|
||||||
} else {
|
} else {
|
||||||
$rows[] = ['SSR-Server', $badge((bool)($health['ok'] ?? false), 'läuft (' . (int)$health['responseMs'] . ' ms)', 'meldet Fehler')];
|
$rows[] = ['SSR server', $badge((bool)($health['ok'] ?? false), 'running (' . (int)$health['responseMs'] . ' ms)', 'reports errors')];
|
||||||
$rows[] = ['Release', htmlspecialchars((string)($health['release']['release'] ?? '?'))
|
$rows[] = ['Release', htmlspecialchars((string)($health['release']['release'] ?? '?'))
|
||||||
. ' <small>(Commit ' . htmlspecialchars((string)($health['release']['commit'] ?? '?'))
|
. ' <small>(commit ' . htmlspecialchars((string)($health['release']['commit'] ?? '?'))
|
||||||
. ', gebaut ' . htmlspecialchars($this->fmtDate((string)($health['release']['builtAt'] ?? ''))) . ')</small>'];
|
. ', built ' . htmlspecialchars($this->fmtDate((string)($health['release']['builtAt'] ?? ''))) . ')</small>'];
|
||||||
$rows[] = ['Seiten-Cache', (int)($health['cachedPages'] ?? 0) . ' Seiten / ' . (int)($health['cacheMB'] ?? 0) . ' MB'];
|
$rows[] = ['Page cache', (int)($health['cachedPages'] ?? 0) . ' pages / ' . (int)($health['cacheMB'] ?? 0) . ' MB'];
|
||||||
}
|
}
|
||||||
if ($lastPurge !== null) {
|
if ($lastPurge !== null) {
|
||||||
$rows[] = ['Letzter Purge', htmlspecialchars(date('d.m. H:i', (int)$lastPurge['crdate']))
|
$rows[] = ['Last purge', htmlspecialchars(date('m-d H:i', (int)$lastPurge['crdate']))
|
||||||
. ' <small>(' . htmlspecialchars((string)$lastPurge['trigger_source']) . ', '
|
. ' <small>(' . htmlspecialchars((string)$lastPurge['trigger_source']) . ', '
|
||||||
. ($lastPurge['success'] ? 'ok' : 'FEHLER') . ', '
|
. ($lastPurge['success'] ? 'ok' : 'FAILED') . ', '
|
||||||
. htmlspecialchars(mb_strimwidth((string)$lastPurge['paths'], 0, 60, '…')) . ')</small>'];
|
. htmlspecialchars(mb_strimwidth((string)$lastPurge['paths'], 0, 60, '…')) . ')</small>'];
|
||||||
}
|
}
|
||||||
if (!$this->purgeService->isConfigured()) {
|
if (!$this->purgeService->isConfigured()) {
|
||||||
$rows[] = ['Auto-Purge', '<span class="badge badge-warning">nicht konfiguriert (var/vitec-ssr-purge.env fehlt)</span>'];
|
$rows[] = ['Auto purge', '<span class="badge badge-warning">not configured (var/vitec-ssr-purge.env missing)</span>'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$html = '<table class="table table-striped table-sm"><tbody>';
|
$html = '<table class="table table-striped table-sm"><tbody>';
|
||||||
@@ -62,7 +62,7 @@ final class SsrStatusWidget implements WidgetInterface
|
|||||||
$html .= '<tr><th style="width:38%">' . htmlspecialchars($label) . '</th><td>' . $value . '</td></tr>';
|
$html .= '<tr><th style="width:38%">' . htmlspecialchars($label) . '</th><td>' . $value . '</td></tr>';
|
||||||
}
|
}
|
||||||
$html .= '</tbody></table>';
|
$html .= '</tbody></table>';
|
||||||
$html .= '<p class="text-muted" style="font-size:11px">Schalter: Site Management › Settings › VITEC. Modul "VITEC SSR" für Purge & Protokoll.</p>';
|
$html .= '<p class="text-muted" style="font-size:11px">Switch: Site Management › Settings › VITEC. Module "VITEC SSR" for purge & protocol.</p>';
|
||||||
return $html;
|
return $html;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -112,6 +112,6 @@ final class SsrStatusWidget implements WidgetInterface
|
|||||||
private function fmtDate(string $iso): string
|
private function fmtDate(string $iso): string
|
||||||
{
|
{
|
||||||
$ts = strtotime($iso);
|
$ts = strtotime($iso);
|
||||||
return $ts ? date('d.m.Y H:i', $ts) : '?';
|
return $ts ? date('Y-m-d H:i', $ts) : '?';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -35,8 +35,8 @@ services:
|
|||||||
- name: dashboard.widget
|
- name: dashboard.widget
|
||||||
identifier: vitecSsrStatus
|
identifier: vitecSsrStatus
|
||||||
groupNames: systemInfo
|
groupNames: systemInfo
|
||||||
title: 'VITEC: SSR / VPS-Status'
|
title: 'VITEC: SSR / VPS status'
|
||||||
description: 'Live-Zustand des SSR-Servers (Release, Cache, Erreichbarkeit) und der Auslieferungs-Schalter'
|
description: 'Live state of the SSR server (release, cache, reachability) and the delivery switch'
|
||||||
iconIdentifier: 'content-widget-text'
|
iconIdentifier: 'content-widget-text'
|
||||||
height: 'medium'
|
height: 'medium'
|
||||||
width: 'medium'
|
width: 'medium'
|
||||||
@@ -46,8 +46,8 @@ services:
|
|||||||
- name: dashboard.widget
|
- name: dashboard.widget
|
||||||
identifier: vitecSsrStats
|
identifier: vitecSsrStats
|
||||||
groupNames: systemInfo
|
groupNames: systemInfo
|
||||||
title: 'VITEC: SSR-Statistik'
|
title: 'VITEC: SSR statistics'
|
||||||
description: 'Purge-Protokoll und Verfügbarkeit des SSR-Servers (14 Tage Historie)'
|
description: 'Purge protocol and availability of the SSR server (14 days of history)'
|
||||||
iconIdentifier: 'content-widget-number'
|
iconIdentifier: 'content-widget-number'
|
||||||
height: 'medium'
|
height: 'medium'
|
||||||
width: 'medium'
|
width: 'medium'
|
||||||
@@ -1,75 +1,75 @@
|
|||||||
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
|
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
|
||||||
|
|
||||||
<h1>VITEC SSR — Steuerung & Protokoll</h1>
|
<h1>VITEC SSR — Control & Protocol</h1>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<h3>Status</h3>
|
<h3>Status</h3>
|
||||||
<table class="table table-striped">
|
<table class="table table-striped">
|
||||||
<tr>
|
<tr>
|
||||||
<th>SSR-Auslieferung</th>
|
<th>SSR delivery</th>
|
||||||
<td>
|
<td>
|
||||||
<f:if condition="{flagOn}">
|
<f:if condition="{flagOn}">
|
||||||
<f:then><span class="badge badge-success">AN — Seiten kommen vom VPS</span></f:then>
|
<f:then><span class="badge badge-success">ON — pages served from the VPS</span></f:then>
|
||||||
<f:else><span class="badge badge-secondary">AUS — SPA wie bisher</span></f:else>
|
<f:else><span class="badge badge-secondary">OFF — SPA as before</span></f:else>
|
||||||
</f:if>
|
</f:if>
|
||||||
<br><small>Umschalten: Site Management › Settings › VITEC</small>
|
<br><small>Toggle: Site Management › Settings › VITEC</small>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>SSR-Server</th>
|
<th>SSR server</th>
|
||||||
<td>
|
<td>
|
||||||
<f:if condition="{health}">
|
<f:if condition="{health}">
|
||||||
<f:then>
|
<f:then>
|
||||||
<span class="badge badge-success">läuft</span> {health.responseMs} ms<br>
|
<span class="badge badge-success">running</span> {health.responseMs} ms<br>
|
||||||
Release <strong>{health.release.release}</strong>
|
Release <strong>{health.release.release}</strong>
|
||||||
(Commit {health.release.commit})<br>
|
(commit {health.release.commit})<br>
|
||||||
Cache: {health.cachedPages} Seiten / {health.cacheMB} MB
|
Cache: {health.cachedPages} pages / {health.cacheMB} MB
|
||||||
</f:then>
|
</f:then>
|
||||||
<f:else>
|
<f:else>
|
||||||
<span class="badge badge-danger">nicht erreichbar</span> {healthError}
|
<span class="badge badge-danger">not reachable</span> {healthError}
|
||||||
</f:else>
|
</f:else>
|
||||||
</f:if>
|
</f:if>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Purge-Konfiguration</th>
|
<th>Purge configuration</th>
|
||||||
<td>
|
<td>
|
||||||
<f:if condition="{configured}">
|
<f:if condition="{configured}">
|
||||||
<f:then><span class="badge badge-success">ok</span></f:then>
|
<f:then><span class="badge badge-success">ok</span></f:then>
|
||||||
<f:else><span class="badge badge-warning">var/vitec-ssr-purge.env fehlt</span></f:else>
|
<f:else><span class="badge badge-warning">var/vitec-ssr-purge.env missing</span></f:else>
|
||||||
</f:if>
|
</f:if>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<h3>Cache leeren (Purge)</h3>
|
<h3>Purge cache</h3>
|
||||||
<form action="{f:be.uri(route: 'web_vitecssr.purge')}" method="post" class="form-group">
|
<form action="{f:be.uri(route: 'web_vitecssr.purge')}" method="post" class="form-group">
|
||||||
<label for="purge-paths">Pfade (einer je Zeile oder kommagetrennt):</label>
|
<label for="purge-paths">Paths (one per line or comma-separated):</label>
|
||||||
<textarea class="form-control" id="purge-paths" name="paths" rows="3"
|
<textarea class="form-control" id="purge-paths" name="paths" rows="3"
|
||||||
placeholder="/products/aligo /insights/news"></textarea>
|
placeholder="/products/aligo /insights/news"></textarea>
|
||||||
<input type="hidden" name="mode" value="paths">
|
<input type="hidden" name="mode" value="paths">
|
||||||
<div style="margin-top:8px">
|
<div style="margin-top:8px">
|
||||||
<button type="submit" class="btn btn-primary">Diese Pfade purgen</button>
|
<button type="submit" class="btn btn-primary">Purge these paths</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<form action="{f:be.uri(route: 'web_vitecssr.purge')}" method="post"
|
<form action="{f:be.uri(route: 'web_vitecssr.purge')}" method="post"
|
||||||
onsubmit="return confirm('Wirklich den KOMPLETTEN SSR-Cache leeren?');">
|
onsubmit="return confirm('Really purge the ENTIRE SSR cache?');">
|
||||||
<input type="hidden" name="mode" value="all">
|
<input type="hidden" name="mode" value="all">
|
||||||
<button type="submit" class="btn btn-warning">Alles purgen (*)</button>
|
<button type="submit" class="btn btn-warning">Purge everything (*)</button>
|
||||||
<small class="text-muted"> — nötig nach Menü-/Footer-Änderungen bei abgeschaltetem Auto-Purge</small>
|
<small class="text-muted"> — needed after menu/footer changes while auto-purge is off</small>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h3>Purge-Protokoll <small>(letzte 30)</small></h3>
|
<h3>Purge protocol <small>(last 30)</small></h3>
|
||||||
<table class="table table-striped table-sm">
|
<table class="table table-striped table-sm">
|
||||||
<thead><tr><th>Zeit</th><th>Auslöser</th><th>Pfade</th><th>Ergebnis</th><th>Dauer</th></tr></thead>
|
<thead><tr><th>Time</th><th>Trigger</th><th>Paths</th><th>Result</th><th>Duration</th></tr></thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<f:for each="{purgeLog}" as="row">
|
<f:for each="{purgeLog}" as="row">
|
||||||
<tr>
|
<tr>
|
||||||
<td><f:format.date format="d.m.Y H:i:s">@{row.crdate}</f:format.date></td>
|
<td><f:format.date format="Y-m-d H:i:s">@{row.crdate}</f:format.date></td>
|
||||||
<td>{row.trigger_source}</td>
|
<td>{row.trigger_source}</td>
|
||||||
<td><code>{row.paths}</code></td>
|
<td><code>{row.paths}</code></td>
|
||||||
<td>
|
<td>
|
||||||
@@ -84,13 +84,13 @@
|
|||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<h3>Gesundheits-Messungen <small>(letzte 10 — Historie via Scheduler-Task <code>vitec:ssr-health</code>)</small></h3>
|
<h3>Health samples <small>(last 10 — history via cron <code>vitec:ssr-health</code>, every 5 minutes)</small></h3>
|
||||||
<table class="table table-striped table-sm">
|
<table class="table table-striped table-sm">
|
||||||
<thead><tr><th>Zeit</th><th>Status</th><th>Release</th><th>Cache</th><th>Antwortzeit</th></tr></thead>
|
<thead><tr><th>Time</th><th>Status</th><th>Release</th><th>Cache</th><th>Response time</th></tr></thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<f:for each="{healthLog}" as="row">
|
<f:for each="{healthLog}" as="row">
|
||||||
<tr>
|
<tr>
|
||||||
<td><f:format.date format="d.m.Y H:i:s">@{row.crdate}</f:format.date></td>
|
<td><f:format.date format="Y-m-d H:i:s">@{row.crdate}</f:format.date></td>
|
||||||
<td>
|
<td>
|
||||||
<f:if condition="{row.ok}">
|
<f:if condition="{row.ok}">
|
||||||
<f:then><span class="badge badge-success">ok</span></f:then>
|
<f:then><span class="badge badge-success">ok</span></f:then>
|
||||||
@@ -98,7 +98,7 @@
|
|||||||
</f:if>
|
</f:if>
|
||||||
</td>
|
</td>
|
||||||
<td>{row.release_id}</td>
|
<td>{row.release_id}</td>
|
||||||
<td>{row.cached_pages} Seiten / {row.cache_mb} MB</td>
|
<td>{row.cached_pages} pages / {row.cache_mb} MB</td>
|
||||||
<td>{row.response_ms} ms</td>
|
<td>{row.response_ms} ms</td>
|
||||||
</tr>
|
</tr>
|
||||||
</f:for>
|
</f:for>
|
||||||
|
|||||||
Reference in new issue
Block a user