feat(MikrotikSpeedTest): add speed test API route and frontend integration; implement caching and error handling for speed test functionality
Publish Fast Tabler Docker image / build-and-push-fast (push) Successful in 1m52s

This commit is contained in:
2026-02-17 23:00:49 +07:00
parent d29f1aef51
commit 9dc931a10b
3 changed files with 303 additions and 6 deletions
+11 -6
View File
@@ -186,7 +186,7 @@ export default function InterfaceSpeedTest() {
interfaceName: selectedInterfaceName,
durationSeconds: speedSettings.durationSeconds,
};
const res = await api.post('/traffic/interface-speed-test', body);
const res = await api.post('/mikrotik/speed-test', body);
const data = res?.data || {};
if (data.ok === false) {
notify.error(
@@ -197,7 +197,9 @@ export default function InterfaceSpeedTest() {
setSpeedResult(data);
} catch (e) {
console.error('[InterfaceSpeedTest] test failed', e);
notify.error(e?.response?.data?.message || e?.message || 'Ошибка замера скорости');
notify.error(
e?.response?.data?.message || e?.message || 'Ошибка замера скорости'
);
} finally {
setRunning(false);
}
@@ -446,14 +448,17 @@ export default function InterfaceSpeedTest() {
<div className="card bg-azure-lt">
<div className="card-body py-2">
<div className="text-muted small mb-1">
Суммарная скорость
TCP скорость (download + upload)
</div>
<div className="fw-bold fs-4">
{formatMbps(speedResult.totalBps)}
{formatMbps(
(speedResult.tcpDownloadBps || 0) +
(speedResult.tcpUploadBps || 0)
)}
</div>
<div className="text-muted small">
RX: {formatMbps(speedResult.rxBps)} · TX:{' '}
{formatMbps(speedResult.txBps)}
Download: {formatMbps(speedResult.tcpDownloadBps)} ·
Upload: {formatMbps(speedResult.tcpUploadBps)}
</div>
</div>
</div>