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
Publish Fast Tabler Docker image / build-and-push-fast (push) Successful in 1m57s
This commit is contained in:
1 parent
b581c47c28
commit
b374faa593
3 files changed
+18
-2
No files matched your search
@@ -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 только для одного интерфейса ===
|
||||
|
||||
Reference in new issue
Block a user