feat(MikrotikConfig): add ping endpoint and enhance applyMikrotikConfig error handling with safe response method
Publish Fast Tabler Docker image / build-and-push-fast (push) Successful in 1m57s

This commit is contained in:
2026-02-03 20:22:19 +07:00
parent b581c47c28
commit b374faa593
3 changed files with 18 additions and 2 deletions
+8 -1
View File
@@ -2279,11 +2279,18 @@ function NetworkConfigManager() {
}
};
const openApplyModal = (serverId) => {
const openApplyModal = async (serverId) => {
setApplyServerId(serverId);
setApplyResult(null);
setApplyDryRun(true);
setApplyModalOpen(true);
try {
const r = await fetch('/api/mikrotik/ping');
const d = await r.json().catch(() => ({}));
console.log('[MikroTik apply] Backend ping:', r.ok ? 'OK' : 'FAIL', d);
} catch (e) {
console.warn('[MikroTik apply] Backend ping failed:', e.message);
}
};
// === Генерация кода MikroTik только для одного интерфейса ===