refactor(mikrotikInterfaceGenerator, NetworkConfigManager): improve comments for route removal and enhance request logging format in API responses
Publish Fast Tabler Docker image / build-and-push-fast (push) Successful in 2m0s
Publish Fast Tabler Docker image / build-and-push-fast (push) Successful in 2m0s
This commit is contained in:
@@ -281,14 +281,14 @@ async function buildMikrotikRecursiveRoutes(config, servers, options = {}) {
|
||||
if (server?.provider) code += `# Провайдер: ${server.provider}\n`;
|
||||
if (server?.country) code += `# Страна: ${server.country}\n`;
|
||||
code += '\n';
|
||||
code += '# Удаление существующих рекурсивных маршрутов (опционально)\n';
|
||||
code += '/ip route remove [find comment~"Recursive"]\n\n';
|
||||
code += '# Удаление старых рекурсивных маршрутов (comment начинается с "Recursive: ")\n';
|
||||
code += '/ip route remove [find comment~"^Recursive: "] \n\n';
|
||||
} else {
|
||||
operations.push({
|
||||
path: '/ip/route',
|
||||
action: 'remove',
|
||||
params: {},
|
||||
meta: { findComment: 'Recursive' },
|
||||
meta: { findComment: '^Recursive: ' },
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -5439,7 +5439,9 @@ function NetworkConfigManager() {
|
||||
<summary className="text-muted small cursor-pointer">Запросы к MikroTik API ({applyResult.mikrotikRequests.length})</summary>
|
||||
<pre className="bg-dark text-light p-2 rounded small mt-2 mb-0" style={{ maxHeight: '200px', overflow: 'auto', fontSize: '0.75rem' }}>
|
||||
{applyResult.mikrotikRequests.map((req, i) => (
|
||||
<div key={i}>{req.path} {Array.isArray(req.args) ? req.args.join(' ') : ''}</div>
|
||||
<div key={i}>
|
||||
{req.block || req.path} — {req.serverName || ''} ({req.operationCount ?? (Array.isArray(req.args) ? req.args.length : 0)} операций)
|
||||
</div>
|
||||
))}
|
||||
</pre>
|
||||
</details>
|
||||
@@ -5453,7 +5455,9 @@ function NetworkConfigManager() {
|
||||
<summary className="text-muted small cursor-pointer">Запросы к MikroTik API до ошибки ({applyResult.mikrotikRequests.length})</summary>
|
||||
<pre className="bg-dark text-light p-2 rounded small mt-2 mb-0" style={{ maxHeight: '200px', overflow: 'auto', fontSize: '0.75rem' }}>
|
||||
{applyResult.mikrotikRequests.map((req, i) => (
|
||||
<div key={i}>{req.path} {Array.isArray(req.args) ? req.args.join(' ') : ''}</div>
|
||||
<div key={i}>
|
||||
{req.block || req.path} — {req.serverName || ''} ({req.operationCount ?? (Array.isArray(req.args) ? req.args.length : 0)} операций)
|
||||
</div>
|
||||
))}
|
||||
</pre>
|
||||
</details>
|
||||
|
||||
Reference in New Issue
Block a user