feat(network-map): add force option to speed request for manual refresh and improved testing
Publish Fast Tabler Docker image / build-and-push-fast (push) Successful in 2m13s

This commit is contained in:
2026-02-24 16:22:36 +07:00
parent b09ba5cd77
commit 228a1b9525
+5 -3
View File
@@ -300,9 +300,10 @@ export default function NetworkMapDashboard() {
/**
* Запросить скорость для всех соединений или подмножества.
* Если передать force=true, принудительно выполняет новый speed-test (игнорируя кеш на бэкенде).
*/
const requestSpeeds = useCallback(async (options = {}) => {
const { connections: targetConnections } = options;
const { connections: targetConnections, force = false } = options;
const sourceConnections =
Array.isArray(targetConnections) && targetConnections.length > 0 ? targetConnections : connections;
const withSpeed = sourceConnections.filter(
@@ -320,6 +321,7 @@ export default function NetworkMapDashboard() {
{
serverId: c.speedTestServerId,
interfaceName: c.interfaceName,
forceRefresh: true, // ручной запуск со страницы карты сети всегда должен делать новый замер
},
{ timeout: 120000 }
);
@@ -367,7 +369,7 @@ export default function NetworkMapDashboard() {
const handleRefreshSpeedForConnection = useCallback(
(connection) => {
if (!connection) return;
requestSpeeds({ connections: [connection] });
requestSpeeds({ connections: [connection], force: true });
},
[requestSpeeds]
);
@@ -386,7 +388,7 @@ export default function NetworkMapDashboard() {
};
const handleRefreshSpeeds = () => {
requestSpeeds();
requestSpeeds({ force: true });
};
if (loading) {