refactor: improve handling of deployable fragments in ApplyRevision and buildPreviewFragments functions. Introduce isDeployableBirdFragment to filter out UI-only preview keys, and update related logic in the API to ensure proper job queuing and response handling for module refresh operations.
CI / changes (push) Successful in 5s
CI / openapi (push) Has been skipped
CI / go (push) Successful in 21s
CI / docker-web (deploy/docker/evobgp-web/Dockerfile, , evobgp-web) (push) Successful in 1m1s
CI / docker-web (deploy/docker/evobgp-web/Dockerfile, evobgp-all, evobgp-web-all) (push) Successful in 1m0s
CI / docker-bird (push) Has been skipped
CI / bird2 (push) Successful in 15s
CI / docker-go (deploy/docker/evobgp-agent/Dockerfile, , evobgp-agent) (push) Successful in 59s
CI / docker-go (evobgp-all, 1, deploy/docker/gobinary/Dockerfile, , evobgp-all) (push) Successful in 1m31s
CI / docker-go (evobgp-api, 1, deploy/docker/gobinary/Dockerfile, , evobgp-api) (push) Successful in 1m22s
CI / docker-go (evobgp-deploy, 0, deploy/docker/gobinary/Dockerfile, , evobgp-deploy) (push) Successful in 1m24s
CI / docker-go (evobgp-ingest, 0, deploy/docker/gobinary/Dockerfile, , evobgp-ingest) (push) Successful in 1m35s
CI / docker-go (evobgp-node, 0, deploy/docker/gobinary/Dockerfile, , evobgp-node) (push) Successful in 1m17s
CI / docker-go (evobgp-render, 0, deploy/docker/gobinary/Dockerfile, , evobgp-render) (push) Successful in 1m25s
CI / docker-go (evobgp-scheduler, 0, deploy/docker/gobinary/Dockerfile, , evobgp-scheduler) (push) Has been cancelled

This commit is contained in:
Denozordec
2026-04-05 23:33:56 +07:00
parent 4a860a088e
commit 693227163a
8 changed files with 288 additions and 30 deletions
@@ -211,8 +211,7 @@
method: 'POST',
headers: { Authorization: `Bearer ${localStorage.getItem('evobgp_api_token') ?? ''}` }
});
if (res.status === 204) toast.message('Refresh не требуется (IP_RANGES)');
else if (res.status === 202) toast.success('Задача поставлена в очередь');
if (res.status === 202) toast.success('Задача поставлена в очередь (render ревизии)');
else toast.error(`HTTP ${res.status}`);
} catch (e) {
toast.error(e instanceof Error ? e.message : String(e));
+7 -2
View File
@@ -157,7 +157,12 @@
async function doApply() {
applying = true;
try {
await apiMutate('/v1/apply', 'POST', {});
const revId = revisions[0]?.id;
if (!revId) {
toast.error('Нет ревизий — сначала refresh модуля или дождитесь задачи render');
return;
}
await apiMutate('/v1/apply', 'POST', { revision_id: revId });
toast.success('Apply запущен на всех спикерах');
applyConfirm = false;
await loadJobs();
@@ -265,7 +270,7 @@
<CardHeader class="flex flex-row items-center justify-between pb-2">
<div>
<CardTitle class="text-base">История ревизий</CardTitle>
<CardDescription>Автоматически создаются при apply</CardDescription>
<CardDescription>Создаются задачей module_refresh (CDN / IP / AS и т.д.); в превью есть полный текст BIRD с инклюдами</CardDescription>
</div>
<Button variant="outline" size="sm" onclick={loadRevisions} disabled={revLoading}>
<RefreshCw class={revLoading ? 'animate-spin' : ''} />