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:
@@ -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